-
Notifications
You must be signed in to change notification settings - Fork 348
/
deployment.yaml
96 lines (96 loc) · 2.94 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "jaeger-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "jaeger-operator.labels" . | indent 4 }}
{{- with .Values.extraLabels }}
{{ . | toYaml | indent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "jaeger-operator.labels" . | indent 6 }}
template:
metadata:
name: {{ include "jaeger-operator.fullname" . }}
labels:
{{ include "jaeger-operator.labels" . | indent 8 }}
{{- with .Values.extraLabels }}
{{ . | toYaml | indent 8 }}
{{- end }}
spec:
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ include "jaeger-operator.serviceAccountName" . }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- if and .Values.image.imagePullSecrets (not .Values.serviceAccount.create ) }}
imagePullSecrets:
{{- range .Values.image.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
containers:
- name: {{ include "jaeger-operator.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 8383
name: metrics
- containerPort: 9443
name: webhook-server
protocol: TCP
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
args: ["start"]
env:
- name: WATCH_NAMESPACE
{{- if .Values.rbac.clusterRole }}
value: ""
{{- else }}
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: {{ include "jaeger-operator.fullname" . | quote }}
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 12 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: {{ default "jaeger-operator-service-cert" .Values.certs.certificate.secretName }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}