33
33
- mountPath : /config-patch
34
34
name : config-patch
35
35
readOnly : true
36
+ - mountPath : /custom-labels
37
+ name : custom-labels
38
+ readOnly : true
36
39
- mountPath : /mnt/node0
37
40
name : node-fs0
38
41
readOnly : true
@@ -273,6 +276,7 @@ spec:
273
276
yq e -i ".components.proxy.service.serviceType = \"{{repl ConfigOption "component_proxy_service_serviceType" }}\"" "${CONFIG_FILE}"
274
277
fi
275
278
279
+ yq e -i ".customization = []" "${CONFIG_FILE}"
276
280
if [ '{{repl ConfigOptionNotEquals "customization_patch" "" }}' = "true" ];
277
281
then
278
282
CUSTOMIZATION='{{repl ConfigOptionData "customization_patch" | Base64Encode }}'
@@ -285,6 +289,9 @@ spec:
285
289
echo "Gitpod: No advanced configuration applied"
286
290
fi
287
291
292
+ echo "Gitpod: Apply the backup labels"
293
+ yq e -i '.customization += load("/custom-labels/customization.yaml")' "${CONFIG_FILE}"
294
+
288
295
echo "Gitpod: Update platform telemetry value"
289
296
yq eval-all --inplace '.experimental.telemetry.data.platform = "{{repl Distribution }}"' "${CONFIG_FILE}"
290
297
@@ -294,6 +301,9 @@ spec:
294
301
echo "Gitpod: ${CONFIG_PATCH_FILE}=${config_patch}"
295
302
yq eval-all --inplace 'select(fileIndex == 0) * select(fileIndex == 1)' "${CONFIG_FILE}" /tmp/patch.yaml
296
303
304
+ echo "Gitpod: Escape all keys - this avoids any collisions in the customizations/patch"
305
+ yq e -i '.' -o json -I 0 "${CONFIG_FILE}"
306
+
297
307
echo "Gitpod: Generate the Kubernetes objects"
298
308
config=$(cat "${CONFIG_FILE}")
299
309
echo "Gitpod: ${CONFIG_FILE}=${config}"
@@ -361,6 +371,9 @@ spec:
361
371
- name : config-patch
362
372
configMap :
363
373
name : gitpod-config-patch
374
+ - name : custom-labels
375
+ configMap :
376
+ name : gitpod-custom-labels
364
377
- name : node-fs0
365
378
hostPath :
366
379
path : /
0 commit comments