blob: debfdb5acf0a452f5475d464685490e0f554c50a [file] [log] [blame]
Tadas Sutkaitis8d037242024-02-08 02:48:21 +02001apiVersion: apps/v1
2kind: Deployment
3metadata:
4 name: {{ include "godaddy-webhook.fullname" . }}
5 labels:
6{{ include "godaddy-webhook.labels" . | indent 4 }}
7spec:
8 replicas: {{ .Values.replicaCount }}
9 selector:
10 matchLabels:
11 app.kubernetes.io/name: {{ include "godaddy-webhook.name" . }}
12 app.kubernetes.io/instance: {{ .Release.Name }}
13 template:
14 metadata:
15 labels:
16 app.kubernetes.io/name: {{ include "godaddy-webhook.name" . }}
17 app.kubernetes.io/instance: {{ .Release.Name }}
18 spec:
19 serviceAccountName: {{ include "godaddy-webhook.fullname" . }}
20 {{- with .Values.imagePullSecrets }}
21 imagePullSecrets:
22 {{- toYaml . | nindent 8 }}
23 {{- end }}
24 containers:
25 - name: {{ .Chart.Name }}
26 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
27 imagePullPolicy: {{ .Values.image.pullPolicy }}
28 args:
29 - --tls-cert-file=/tls/tls.crt
30 - --tls-private-key-file=/tls/tls.key
31 - --secure-port={{ default 443 .Values.pod.securePort }}
32 env:
33 - name: GROUP_NAME
34 value: {{ .Values.groupName | quote }}
35 - name: LOGGING_LEVEL
36 value: {{ .Values.logging.level }}
37 - name: LOGGING_FORMAT
38 value: {{ .Values.logging.format }}
39 - name: LOGGING_TIMESTAMP
40 value: {{ .Values.logging.timestamp | quote }}
41 ports:
42 - name: https
43 containerPort: {{ default 443 .Values.pod.securePort }}
44 protocol: TCP
45 livenessProbe:
46 httpGet:
47 scheme: HTTPS
48 path: /healthz
49 port: https
50 readinessProbe:
51 httpGet:
52 scheme: HTTPS
53 path: /healthz
54 port: https
55 volumeMounts:
56 - name: certs
57 mountPath: /tls
58 readOnly: true
59 resources:
60 {{- toYaml .Values.resources | nindent 12 }}
61 volumes:
62 - name: certs
63 secret:
64 secretName: {{ include "godaddy-webhook.servingCertificate" . }}
65 {{- with .Values.nodeSelector }}
66 nodeSelector:
67 {{- toYaml . | nindent 8 }}
68 {{- end }}
69 {{- with .Values.affinity }}
70 affinity:
71 {{- toYaml . | nindent 8 }}
72 {{- end }}
73 {{- with .Values.tolerations }}
74 tolerations:
75 {{- toYaml . | nindent 8 }}
76 {{- end }}