Skip to content

Commit

Permalink
allow omitting the identity migration pre-upgrade hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jan94 committed Jan 22, 2025
1 parent baa03d9 commit 52c2d2c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions charts/ziti-router/templates/pre-upgrade-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

{{if not .Values.omitIdentityMigration}}
---
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -78,4 +78,5 @@ data:
{{ include "ziti-router.fullname" . }}-identity
else
echo "INFO: identity secret does not exist"
fi
fi
{{end}}
3 changes: 3 additions & 0 deletions charts/ziti-router/templates/pre-upgrade-job.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{if not .Values.omitIdentityMigration}}
---
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -72,3 +74,4 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
{{end}}
4 changes: 3 additions & 1 deletion charts/ziti-router/templates/pre-upgrade-serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

{{if not .Values.omitIdentityMigration}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -40,3 +41,4 @@ subjects:
- kind: ServiceAccount
name: {{ include "ziti-router.fullname" . }}-hook-serviceaccount
namespace: {{ .Release.Namespace }}
{{end}}
5 changes: 5 additions & 0 deletions charts/ziti-router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,11 @@ tolerations: []
# -- deployment template spec affinity
affinity: {}

# -- omit migration of identity secret to persistent volume
# 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.
# If want to omit this migration (pre-upgrade hook) set this value to true.
omitIdentityMigration: false

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
Expand Down

0 comments on commit 52c2d2c

Please sign in to comment.