Skip to content

Commit

Permalink
Improve initContainers template in common chart
Browse files Browse the repository at this point in the history
  • Loading branch information
alvicsam committed Jun 27, 2023
1 parent 952bff7 commit 3264906
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: A generic helm chart for Kubernetes
type: application
version: 0.6.7
version: 0.6.8
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
15 changes: 11 additions & 4 deletions charts/common/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ spec:
serviceAccountName: {{ include "common.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.initContainers}}
{{- if .Values.initContainers }}
initContainers:
- name: {{ .Values.initContainers.name }}
image: {{ .Values.initContainers.image }}
command: {{ .Values.initContainers.command }}
{{- range $initContainer := .Values.initContainers }}
- name: {{ $initContainer.name }}
image: {{ $initContainer.image }}
command:
{{- toYaml $initContainer.command | nindent 12 }}
{{- with $initContainer.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
Expand Down

0 comments on commit 3264906

Please sign in to comment.