From 1d71d58dae2bd59a13c2278a8a31873f715c618d Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Tue, 8 Nov 2022 07:53:27 +0000 Subject: [PATCH] [kots]: allow configuration the installer timeout --- install/installer/scripts/kots-install.sh | 3 +++ .../manifests/gitpod-installation-status.yaml | 2 +- .../kots/manifests/gitpod-installer-job.yaml | 2 +- .../kots/manifests/gitpod-kots-config.yaml | 1 + install/kots/manifests/kots-config.yaml | 20 +++++++++++++++++++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/install/installer/scripts/kots-install.sh b/install/installer/scripts/kots-install.sh index 99bacf67870a10..27272afec9e0a9 100755 --- a/install/installer/scripts/kots-install.sh +++ b/install/installer/scripts/kots-install.sh @@ -177,6 +177,9 @@ EOF # If certificate secret already exists, set the timeout to 5m CERT_SECRET=$(kubectl get secrets -n "${NAMESPACE}" https-certificates -o jsonpath='{.metadata.name}' || echo '') HELM_TIMEOUT="5m" + if [ "${ADVANCED_MODE_ENABLED}" = "1" ]; then + HELM_TIMEOUT="${INSTALLER_TIMEOUT}" + fi if [ "${CERT_SECRET}" = "" ]; then HELM_TIMEOUT="1h" fi diff --git a/install/kots/manifests/gitpod-installation-status.yaml b/install/kots/manifests/gitpod-installation-status.yaml index d3798b7a9cf5fe..6d45003804a262 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-installer-version-script.2" + image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-fixes.0" envFrom: - configMapRef: name: gitpod-kots-config diff --git a/install/kots/manifests/gitpod-installer-job.yaml b/install/kots/manifests/gitpod-installer-job.yaml index 0465beac13c8f8..c592208e3f9e54 100644 --- a/install/kots/manifests/gitpod-installer-job.yaml +++ b/install/kots/manifests/gitpod-installer-job.yaml @@ -39,7 +39,7 @@ spec: containers: - name: installer # This will normally be the release tag - image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-version-script.2" + image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-fixes.0" volumeMounts: - mountPath: /mnt/node0 name: node-fs0 diff --git a/install/kots/manifests/gitpod-kots-config.yaml b/install/kots/manifests/gitpod-kots-config.yaml index d53a90faee1c67..5f829491e75ded 100644 --- a/install/kots/manifests/gitpod-kots-config.yaml +++ b/install/kots/manifests/gitpod-kots-config.yaml @@ -74,6 +74,7 @@ data: ADVANCED_MODE_ENABLED: repl{{ ConfigOption "advanced_mode_enabled" | quote }} COMPONENT_PROXY_SERVICE_TYPE: repl{{ ConfigOption "component_proxy_service_serviceType" | quote }} CUSTOMIZATION_PATCH_ENABLED: repl{{ ConfigOptionNotEquals "customization_patch" "" | quote }} # Use comparison not value + INSTALLER_TIMEOUT: repl{{ ConfigOption "installer_timeout" | quote }} # Customizations CONFIG_PATCH: repl{{ ConfigOptionData "config_patch" | default "" | quote }} diff --git a/install/kots/manifests/kots-config.yaml b/install/kots/manifests/kots-config.yaml index 3a5c9744103a44..b6c7cabdcdf24d 100644 --- a/install/kots/manifests/kots-config.yaml +++ b/install/kots/manifests/kots-config.yaml @@ -392,6 +392,26 @@ spec: default: "0" help_text: Enables advanced customization options. Enable only when you know what you are doing! + - name: installer_timeout + title: Installer timeout + type: select_one + default: 5m + when: '{{repl ConfigOptionEquals "advanced_mode_enabled" "1" }}' + help_text: Override the timeout for the Installer. + items: + - name: 5m + title: 5 minutes + - name: 10m + title: 10 minutes + - name: 30m + title: 30 minutes + - name: 1h + title: 1 hour + - name: 90m + title: 90 minutes + - name: 2h + title: 2 hours + - name: customization_patch title: Gitpod customization patch (YAML file) type: file