Skip to content

Commit

Permalink
Fixed initContainer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hfjn committed Feb 2, 2024
1 parent 47c51de commit 57b45a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
7 changes: 0 additions & 7 deletions charts/generic-service/ci/initContainer-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,3 @@ initContainers:
image: docker/whalesay
command: ["cowsay"]
args: ["hi"]

initContainerTemplates:
- |
name: init2
image: docker/whalesay:{{ .Values.image.tag }}
command: ["cowsay"]
args: ["hi"]
15 changes: 15 additions & 0 deletions charts/generic-service/ci/initContainerTemplates-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# InitContainer test

name: test
fullname: my-test

image:
repository: jwilder/whoami
tag: latest

initContainerTemplates:
- |
name: init2
image: docker/whalesay:{{ .Values.image.tag }}
command: ["cowsay"]
args: ["hi"]
2 changes: 1 addition & 1 deletion charts/generic-service/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ spec:
{{- end }}
{{- end }}

{{ if .Values.initContainers }}
{{ if or .Values.initContainers .Values.initContainerTemplates }}
initContainers:
{{- range .Values.initContainers }}
- securityContext: {{- $.Values.securityContext.container | toYaml | nindent 12 }}
Expand Down

0 comments on commit 57b45a6

Please sign in to comment.