Skip to content

Commit

Permalink
fix: added extraInitContainer to Kratos chart (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajunca committed Mar 15, 2021
1 parent 90a642e commit 0377e05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion helm/charts/kratos/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.kratos.autoMigrate }}
{{- if or .Values.kratos.autoMigrate .Values.deployment.extraInitContainers}}
initContainers:
{{- if .Values.deployment.extraInitContainers }}
{{ tpl .Values.deployment.extraInitContainers . | indent 8 }}
{{- end }}
{{- if .Values.kratos.autoMigrate }}
-
name: {{ .Chart.Name }}-automigrate
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -107,6 +111,7 @@ spec:
- secretRef:
name: {{ .Values.deployment.environmentSecretsName }}
{{- end}}
{{- end}}
{{- end}}
volumes:
{{- if .Values.deployment.extraVolumes }}
Expand Down
5 changes: 5 additions & 0 deletions helm/charts/kratos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ deployment:
# mountPath: "/etc/postgresql-tls"
# readOnly: true

# If you want to add extra init containers. These are processed before the migration init container.
# extraInitContainers: |
# - name: ...
# image: ...

annotations: {}
# If you do want to specify annotations, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'annotations:'.
Expand Down

0 comments on commit 0377e05

Please sign in to comment.