diff --git a/install/kots/manifests/gitpod-installation-status.yaml b/install/kots/manifests/gitpod-installation-status.yaml index 6f18594d7b23d5..39fbf8a2761941 100644 --- a/install/kots/manifests/gitpod-installation-status.yaml +++ b/install/kots/manifests/gitpod-installation-status.yaml @@ -30,7 +30,7 @@ spec: containers: - name: installation-status # This will normally be the release tag - image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-azure-minio-gateway.0" + image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-kots-customization.1" command: - /bin/sh - -c diff --git a/install/kots/manifests/gitpod-installer-job.yaml b/install/kots/manifests/gitpod-installer-job.yaml index 0b18ea4198195f..effeafd3773f38 100644 --- a/install/kots/manifests/gitpod-installer-job.yaml +++ b/install/kots/manifests/gitpod-installer-job.yaml @@ -28,7 +28,7 @@ spec: containers: - name: installer # This will normally be the release tag - image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-azure-minio-gateway.0" + image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-kots-customization.1" volumeMounts: - mountPath: /config-patch name: config-patch @@ -261,6 +261,18 @@ spec: done fi + if [ '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}' = "true" ]; + then + if [ '{{repl ConfigOptionNotEquals "customization_patch" "" }}' = "true" ]; + then + CUSTOMIZATION='{{repl ConfigOptionData "customization_patch" | Base64Encode }}' + echo "Gitpod: Applying customization patch ${CUSTOMIZATION}" + + # Apply the customization property - if something else is set, this will be ignored + yq e -i ".customization = $(echo "${CUSTOMIZATION}" | base64 -d | yq e -o json '.customization' - | jq -rc) // []" "${CONFIG_FILE}" + fi + fi + echo "Gitpod: Patch Gitpod config" base64 -d "${CONFIG_PATCH_FILE}" > /tmp/patch.yaml config_patch=$(cat /tmp/patch.yaml) diff --git a/install/kots/manifests/kots-config.yaml b/install/kots/manifests/kots-config.yaml index 1d69bd529d3cd9..0eeae85e9f0206 100644 --- a/install/kots/manifests/kots-config.yaml +++ b/install/kots/manifests/kots-config.yaml @@ -379,6 +379,21 @@ spec: default: "0" help_text: Enables additional customization options. Enable only when you know what you are doing! + - name: customization_patch + title: Gitpod customization patch (YAML file) + type: file + required: false + when: '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}' + help_text: | + A file configured to override annotations, labels and environment variables in components. See our + [advanced documentation](https://www.gitpod.io/docs/self-hosted/latest/advanced/customization) for + more details and the format. + + Labels are an immutable property in Kubernetes, so you may need to uninstall your Gitpod instance + before applying - run `helm uninstall -n {{repl Namespace }} gitpod`. + + **WARNING** this should not be run if using in-cluster database and/or object storage. + - name: config_patch title: Gitpod config patch (YAML file) type: file