Skip to content

Commit b21e31a

Browse files
Simon Emmsroboquat
Simon Emms
authored andcommitted
[kots]: apply customization file to Installer
1 parent 09dbf29 commit b21e31a

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

install/kots/manifests/gitpod-installation-status.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
containers:
3131
- name: installation-status
3232
# This will normally be the release tag
33-
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-azure-minio-gateway.0"
33+
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-kots-customization.1"
3434
command:
3535
- /bin/sh
3636
- -c

install/kots/manifests/gitpod-installer-job.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
containers:
2929
- name: installer
3030
# This will normally be the release tag
31-
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-azure-minio-gateway.0"
31+
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-kots-customization.1"
3232
volumeMounts:
3333
- mountPath: /config-patch
3434
name: config-patch
@@ -261,6 +261,18 @@ spec:
261261
done
262262
fi
263263
264+
if [ '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}' = "true" ];
265+
then
266+
if [ '{{repl ConfigOptionNotEquals "customization_patch" "" }}' = "true" ];
267+
then
268+
CUSTOMIZATION='{{repl ConfigOptionData "customization_patch" | Base64Encode }}'
269+
echo "Gitpod: Applying customization patch ${CUSTOMIZATION}"
270+
271+
# Apply the customization property - if something else is set, this will be ignored
272+
yq e -i ".customization = $(echo "${CUSTOMIZATION}" | base64 -d | yq e -o json '.customization' - | jq -rc) // []" "${CONFIG_FILE}"
273+
fi
274+
fi
275+
264276
echo "Gitpod: Patch Gitpod config"
265277
base64 -d "${CONFIG_PATCH_FILE}" > /tmp/patch.yaml
266278
config_patch=$(cat /tmp/patch.yaml)

install/kots/manifests/kots-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,21 @@ spec:
379379
default: "0"
380380
help_text: Enables additional customization options. Enable only when you know what you are doing!
381381

382+
- name: customization_patch
383+
title: Gitpod customization patch (YAML file)
384+
type: file
385+
required: false
386+
when: '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}'
387+
help_text: |
388+
A file configured to override annotations, labels and environment variables in components. See our
389+
[advanced documentation](https://www.gitpod.io/docs/self-hosted/latest/advanced/customization) for
390+
more details and the format.
391+
392+
Labels are an immutable property in Kubernetes, so you may need to uninstall your Gitpod instance
393+
before applying - run `helm uninstall -n {{repl Namespace }} gitpod`.
394+
395+
**WARNING** this should not be run if using in-cluster database and/or object storage.
396+
382397
- name: config_patch
383398
title: Gitpod config patch (YAML file)
384399
type: file

0 commit comments

Comments
 (0)