Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d4cbc69

Browse files
committedMay 20, 2021
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.
1 parent 6e9e891 commit d4cbc69

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎ci/helm-chart/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ and their default values.
6565
| extraArgs | list | `[]` | |
6666
| extraConfigmapMounts | list | `[]` | |
6767
| extraContainers | string | `""` | |
68+
| extraInitContainers | string | `""` | |
6869
| extraSecretMounts | list | `[]` | |
6970
| extraVars | list | `[]` | |
7071
| extraVolumeMounts | list | `[]` | |

‎ci/helm-chart/templates/deployment.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ spec:
4343
volumeMounts:
4444
- name: data
4545
mountPath: /home/coder
46+
{{- if .Values.extraInitContainers }}
47+
{{ tpl .Values.extraInitContainers . | indent 6}}
48+
{{- end }}
4649
{{- end }}
4750
containers:
4851
{{- if .Values.extraContainers }}
49-
{{ toYaml .Values.extraContainers | indent 8}}
52+
{{ tpl .Values.extraContainers . | indent 8}}
5053
{{- end }}
5154
- name: {{ .Chart.Name }}
5255
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

0 commit comments

Comments
 (0)
Please sign in to comment.