11apiVersion : apps/v1
2- kind : Deployment
2+ kind : StatefulSet
33metadata :
44 name : {{ include "defguard-gateway.fullname" . }}
55 labels :
66 {{- include "defguard-gateway.labels" . | nindent 4 }}
77spec :
8+ podManagementPolicy : Parallel
89 replicas : {{ .Values.replicaCount }}
910 selector :
1011 matchLabels :
1112 {{- include "defguard-gateway.selectorLabels" . | nindent 6 }}
13+ serviceName : {{ include "defguard-gateway.fullname" . }}-grpc-headless
1214 template :
1315 metadata :
1416 {{- with .Values.podAnnotations }}
@@ -27,18 +29,24 @@ spec:
2729 {{- toYaml .Values.podSecurityContext | nindent 8 }}
2830 containers :
2931 - name : {{ .Chart.Name }}
32+ {{- if .Values.healthCheck.enabled }}
33+ env :
34+ - name : HEALTH_PORT
35+ value : {{ .Values.healthCheck.port }}
36+ {{- end }}
3037 envFrom :
3138 - configMapRef :
3239 name : {{ include "defguard-gateway.fullname" . }}-config
3340 {{- if .Values.additionalEnvFromConfigMap }}
3441 - configMapRef :
3542 name : {{ .Values.additionalEnvFromConfigMap }}
3643 {{- end }}
37- securityContext :
38- {{- toYaml .Values.securityContext | nindent 12 }}
3944 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4045 imagePullPolicy : {{ .Values.image.pullPolicy }}
4146 ports :
47+ - name : grpc
48+ containerPort : {{ .Values.service.grpc.port }}
49+ protocol : TCP
4250 - name : wireguard
4351 containerPort : {{ .Values.service.wireguard.port }}
4452 protocol : UDP
@@ -62,23 +70,11 @@ spec:
6270 timeoutSeconds : {{ .Values.healthCheck.readinessProbe.timeoutSeconds }}
6371 failureThreshold : {{ .Values.healthCheck.readinessProbe.failureThreshold }}
6472 {{- end }}
65- {{- if .Values.token }}
66- env :
67- - name : DEFGUARD_TOKEN
68- value : {{ .Values.token }}
69- {{- else if .Values.existingTokenSecret }}
70- env :
71- - name : DEFGUARD_TOKEN
72- valueFrom :
73- secretKeyRef :
74- name : {{ .Values.existingTokenSecret }}
75- key : {{ .Values.existingTokenSecretKey }}
76- {{- end }}
77- {{- if .Values.healthCheck.enabled }}
78- env :
79- - name : HEALTH_PORT
80- value : {{ .Values.healthCheck.port }}
81- {{- end }}
73+ securityContext :
74+ {{- toYaml .Values.securityContext | nindent 12 }}
75+ volumeMounts :
76+ - name : data
77+ mountPath : /etc/defguard
8278 {{- with .Values.nodeSelector }}
8379 nodeSelector :
8480 {{- toYaml . | nindent 8 }}
9187 tolerations :
9288 {{- toYaml . | nindent 8 }}
9389 {{- end }}
90+ volumeClaimTemplates :
91+ - metadata :
92+ name : data
93+ spec :
94+ accessModes :
95+ - ReadWriteOnce
96+ {{- with .Values.persistence.storageClassName }}
97+ storageClassName : {{ . }}
98+ {{- end }}
99+ resources :
100+ requests :
101+ storage : {{ .Values.persistence.size }}
0 commit comments