Skip to content

Commit

Permalink
feat: Add ability to specify initContainers
Browse files Browse the repository at this point in the history
  • Loading branch information
czuares committed Jan 30, 2025
1 parent 976e3c2 commit a65978c
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/zitadel/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: zitadel
description: A Helm chart for ZITADEL
type: application
appVersion: v2.67.2
version: 8.11.2
version: 8.11.3
kubeVersion: '>= 1.21.0-0'
icon: https://zitadel.com/zitadel-logo-dark.svg
maintainers:
Expand Down
7 changes: 7 additions & 0 deletions charts/zitadel/templates/debug_replicaset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
enableServiceLinks: false
initContainers:
{{- if .Values.zitadel.initContainers }}
{{- toYaml .Values.zitadel.initContainers | nindent 8 }}
{{- end }}
{{- if .Values.zitadel.debug.initContainers }}
{{- toYaml .Values.zitadel.debug.initContainers | nindent 8 }}
{{- end }}
containers:
{{- if .Values.zitadel.extraContainers }}
{{- toYaml .Values.zitadel.extraContainers | nindent 8 }}
Expand Down
5 changes: 4 additions & 1 deletion charts/zitadel/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 14 }}
{{- if .Values.zitadel.selfSignedCert.enabled }}
initContainers:
{{- if .Values.zitadel.initContainers }}
{{- toYaml .Values.zitadel.initContainers | nindent 8 }}
{{- end }}
{{- if .Values.zitadel.selfSignedCert.enabled }}
- name: generate-self-signed-cert
image: alpine/openssl
env:
Expand Down
7 changes: 7 additions & 0 deletions charts/zitadel/templates/initjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
enableServiceLinks: false
restartPolicy: OnFailure
initContainers:
{{- if .Values.zitadel.initContainers }}
{{- toYaml .Values.zitadel.initContainers | nindent 8 }}
{{- end }}
{{- if .Values.initJob.initContainers }}
{{- toYaml .Values.initJob.initContainers | nindent 8 }}
{{- end }}
containers:
{{- if .Values.zitadel.extraContainers }}
{{- toYaml .Values.zitadel.extraContainers | nindent 8 }}
Expand Down
7 changes: 7 additions & 0 deletions charts/zitadel/templates/setupjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
enableServiceLinks: false
restartPolicy: OnFailure
initContainers:
{{- if .Values.zitadel.initContainers }}
{{- toYaml .Values.zitadel.initContainers | nindent 8 }}
{{- end }}
{{- if .Values.setupJob.initContainers }}
{{- toYaml .Values.setupJob.initContainers | nindent 8 }}
{{- end }}
containers:
{{- if .Values.zitadel.extraContainers }}
{{- toYaml .Values.zitadel.extraContainers | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/zitadel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ zitadel:
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-weight: "1"
initContainers: []
extraContainers: []

# initContainers allow you to add any init containers you wish to use globally.
# Additionally, they follow the same structure as extraContainers
initContainers: []
# extraContainers allows you to add any sidecar containers you wish to use globally.
# Currently this is the Zitadel Deployment, Setup Job**, Init Job** and debug_replicaset** **If Enabled
extraContainers: []
Expand Down Expand Up @@ -221,6 +225,7 @@ initJob:
resources: {}
backoffLimit: 5
activeDeadlineSeconds: 300
initContainers: []
extraContainers: []
podAnnotations: {}
podAdditionalLabels: {}
Expand All @@ -239,6 +244,7 @@ setupJob:
helm.sh/hook-weight: "2"
resources: {}
activeDeadlineSeconds: 300
initContainers: []
extraContainers: []
podAnnotations: {}
podAdditionalLabels: {}
Expand Down

0 comments on commit a65978c

Please sign in to comment.