Skip to content

Commit b29d24c

Browse files
committed
Convert proxy StatefulSet
1 parent 35fd0ca commit b29d24c

4 files changed

Lines changed: 47 additions & 4 deletions

File tree

charts/defguard-proxy/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: defguard-proxy
33
description: Defguard proxy is a public-facing proxy for core Defguard service
44

55
type: application
6-
version: 0.8.3
7-
appVersion: 1.6.3
6+
version: 2.0.0
7+
appVersion: 2.0.0

charts/defguard-proxy/templates/deployment.yaml renamed to charts/defguard-proxy/templates/statefulset.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
apiVersion: apps/v1
2-
kind: Deployment
2+
kind: StatefulSet
33
metadata:
44
name: {{ include "defguard-proxy.fullname" . }}
55
labels:
66
{{- include "defguard-proxy.labels" . | nindent 4 }}
77
spec:
8+
serviceName: {{ include "defguard-proxy.fullname" . }}-web
89
{{- if not .Values.autoscaling.enabled }}
910
replicas: {{ .Values.replicaCount }}
1011
{{- end }}
@@ -40,6 +41,9 @@ spec:
4041
{{- toYaml .Values.securityContext | nindent 12 }}
4142
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4243
imagePullPolicy: {{ .Values.image.pullPolicy }}
44+
volumeMounts:
45+
- name: data
46+
mountPath: /etc/defguard
4347
ports:
4448
- name: http
4549
containerPort: {{ .Values.service.web.port }}
@@ -69,3 +73,15 @@ spec:
6973
tolerations:
7074
{{- toYaml . | nindent 8 }}
7175
{{- end }}
76+
volumeClaimTemplates:
77+
- metadata:
78+
name: data
79+
spec:
80+
accessModes:
81+
- ReadWriteOnce
82+
{{- with .Values.persistence.storageClassName }}
83+
storageClassName: {{ . }}
84+
{{- end }}
85+
resources:
86+
requests:
87+
storage: {{ .Values.persistence.size }}

charts/defguard-proxy/values.schema.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,28 @@
256256
"title": "podSecurityContext",
257257
"type": "object"
258258
},
259+
"persistence": {
260+
"additionalProperties": false,
261+
"description": "defguard-proxy persistent storage for configuration files",
262+
"properties": {
263+
"size": {
264+
"default": "32Mi",
265+
"title": "size",
266+
"type": "string"
267+
},
268+
"storageClassName": {
269+
"default": "",
270+
"title": "storageClassName",
271+
"type": "string"
272+
}
273+
},
274+
"required": [
275+
"size",
276+
"storageClassName"
277+
],
278+
"title": "persistence",
279+
"type": "object"
280+
},
259281
"publicUrl": {
260282
"default": "http://enrollment.local",
261283
"description": "this should be a URL based on defguard-proxy.ingress.web.host",
@@ -429,6 +451,7 @@
429451
"podAnnotations",
430452
"podLabels",
431453
"podSecurityContext",
454+
"persistence",
432455
"securityContext",
433456
"replicaCount",
434457
"resources",
@@ -437,4 +460,4 @@
437460
"additionalEnvFromConfigMap"
438461
],
439462
"type": "object"
440-
}
463+
}

charts/defguard-proxy/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ securityContext: {}
5454
replicaCount: 1
5555
# defguard-proxy pod resource configuration
5656
resources: {}
57+
# defguard-proxy persistent storage configuration
58+
persistence:
59+
size: 32Mi
60+
storageClassName: ""
5761
# defguard-proxy service configuration
5862
service:
5963
grpc:

0 commit comments

Comments
 (0)