Skip to content

Commit 52c2d2c

Browse files
committed
allow omitting the identity migration pre-upgrade hook
1 parent baa03d9 commit 52c2d2c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

charts/ziti-router/templates/pre-upgrade-configmap.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
{{if not .Values.omitIdentityMigration}}
22
---
33
apiVersion: v1
44
kind: ConfigMap
@@ -78,4 +78,5 @@ data:
7878
{{ include "ziti-router.fullname" . }}-identity
7979
else
8080
echo "INFO: identity secret does not exist"
81-
fi
81+
fi
82+
{{end}}

charts/ziti-router/templates/pre-upgrade-job.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{if not .Values.omitIdentityMigration}}
2+
---
13
apiVersion: batch/v1
24
kind: Job
35
metadata:
@@ -72,3 +74,4 @@ spec:
7274
{{- else }}
7375
emptyDir: {}
7476
{{- end }}
77+
{{end}}

charts/ziti-router/templates/pre-upgrade-serviceaccount.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
1+
{{if not .Values.omitIdentityMigration}}
2+
---
23
apiVersion: v1
34
kind: ServiceAccount
45
metadata:
@@ -40,3 +41,4 @@ subjects:
4041
- kind: ServiceAccount
4142
name: {{ include "ziti-router.fullname" . }}-hook-serviceaccount
4243
namespace: {{ .Release.Namespace }}
44+
{{end}}

charts/ziti-router/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ tolerations: []
360360
# -- deployment template spec affinity
361361
affinity: {}
362362

363+
# -- omit migration of identity secret to persistent volume
364+
# Previous versions of this chart stored the router identity in a secret resource. A migration is provided by the execution of a pre-upgrade hook.
365+
# If want to omit this migration (pre-upgrade hook) set this value to true.
366+
omitIdentityMigration: false
367+
363368
## Enable persistence using Persistent Volume Claims
364369
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
365370
##

0 commit comments

Comments
 (0)