File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2
+ # Licensed under the MIT License. See License-MIT.txt in the project root for license information.
3
+
4
+ apiVersion : v1
5
+ kind : ConfigMap
6
+ metadata :
7
+ name : gitpod-custom-labels
8
+ labels :
9
+ app : gitpod
10
+ component : gitpod-installer
11
+ data :
12
+ customization.yaml : |
13
+ - apiVersion: "*"
14
+ kind: "*"
15
+ metadata:
16
+ name: "*"
17
+ labels:
18
+ "kots.io/app-slug": "{{repl LicenseFieldValue "appSlug" }}"
19
+ "kots.io/backup": "velero"
Original file line number Diff line number Diff line change 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
49
52
value : /run/containerd/io.containerd.runtime.v2.task/k8s.io
50
53
- name : CONTAINERD_SOCKET_AL
51
54
value : /run/containerd/containerd.sock
55
+ - name : CUSTOM_LABELS_FILES
56
+ value : /custom-labels/customization.yaml
52
57
- name : GITPOD_OBJECTS
53
58
value : /tmp/gitpod
54
59
command :
@@ -273,6 +278,7 @@ spec:
273
278
yq e -i ".components.proxy.service.serviceType = \"{{repl ConfigOption "component_proxy_service_serviceType" }}\"" "${CONFIG_FILE}"
274
279
fi
275
280
281
+ yq e -i ".customization = []" "${CONFIG_FILE}"
276
282
if [ '{{repl ConfigOptionNotEquals "customization_patch" "" }}' = "true" ];
277
283
then
278
284
CUSTOMIZATION='{{repl ConfigOptionData "customization_patch" | Base64Encode }}'
@@ -285,6 +291,9 @@ spec:
285
291
echo "Gitpod: No advanced configuration applied"
286
292
fi
287
293
294
+ echo "Gitpod: Apply the backup labels"
295
+ yq e -i ".customization += $(yq '.' -o json "${CUSTOM_LABELS_FILES}")" "${CONFIG_FILE}"
296
+
288
297
echo "Gitpod: Update platform telemetry value"
289
298
yq eval-all --inplace '.experimental.telemetry.data.platform = "{{repl Distribution }}"' "${CONFIG_FILE}"
290
299
@@ -361,6 +370,9 @@ spec:
361
370
- name : config-patch
362
371
configMap :
363
372
name : gitpod-config-patch
373
+ - name : custom-labels
374
+ configMap :
375
+ name : gitpod-custom-labels
364
376
- name : node-fs0
365
377
hostPath :
366
378
path : /
You can’t perform that action at this time.
0 commit comments