@@ -65,6 +65,7 @@ and their default values.
65
65
| extraArgs | list | ` [] ` | |
66
66
| extraConfigmapMounts | list | ` [] ` | |
67
67
| extraContainers | string | ` "" ` | |
68
+ | extraInitContainers | string | ` "" ` | |
68
69
| extraSecretMounts | list | ` [] ` | |
69
70
| extraVars | list | ` [] ` | |
70
71
| extraVolumeMounts | list | ` [] ` | |
@@ -115,3 +116,47 @@ $ helm upgrade --install code-server ci/helm-chart -f values.yaml
115
116
```
116
117
117
118
> ** Tip** : You can use the default [ values.yaml] ( values.yaml )
119
+
120
+ # Extra Containers
121
+
122
+ There are two parameters which allow to add more containers to pod.
123
+ Use ` extraContainers ` to add regular containers
124
+ and ` extraInitContainers ` to add init containers. You can read more
125
+ about init containers in [ k8s documentation] ( https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ ) .
126
+
127
+ Both parameters accept strings and use them as a templates
128
+
129
+ Example of using ` extraInitContainers ` :
130
+
131
+ ``` yaml
132
+ extraInitContainers : |
133
+ - name: customization
134
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
135
+ imagePullPolicy: IfNotPresent
136
+ env:
137
+ - name: SERVICE_URL
138
+ value: https://open-vsx.org/vscode/gallery
139
+ - name: ITEM_URL
140
+ value: https://open-vsx.org/vscode/item
141
+ command:
142
+ - sh
143
+ - -c
144
+ - |
145
+ code-server --install-extension ms-python.python
146
+ code-server --install-extension golang.Go
147
+ volumeMounts:
148
+ - name: data
149
+ mountPath: /home/coder
150
+
151
+ ` ` `
152
+
153
+ With this yaml in file ` init.yaml`, you can execute
154
+
155
+ ` ` ` console
156
+ $ helm upgrade --install code-server \
157
+ ci/helm-chart \
158
+ --values init.yaml
159
+ ` ` `
160
+
161
+ to deploy code-server with python and golang extensions preinstalled
162
+ before main container have started.
0 commit comments