Archived
1
0

introduce extraInitContainers to helm chart

New extraInitContainers configuration added.
It allows to pass template with a list of containers to execute before
main code-server container started. Main container will only start when
all init containers are  completed (exited with 0 code).

 Additionally changes the way extraContainers is used - instead of
 toYaml use tpl, because this allows to
 reference any values from extraContainers string.
This commit is contained in:
Timur Sultanaev
2021-05-14 22:59:01 +02:00
parent 6e9e891684
commit 1ffca5751c
3 changed files with 59 additions and 1 deletions

View File

@ -43,10 +43,13 @@ spec:
volumeMounts:
- name: data
mountPath: /home/coder
{{- if .Values.extraInitContainers }}
{{ tpl .Values.extraInitContainers . | indent 6}}
{{- end }}
{{- end }}
containers:
{{- if .Values.extraContainers }}
{{ toYaml .Values.extraContainers | indent 8}}
{{ tpl .Values.extraContainers . | indent 8}}
{{- end }}
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"