diff --git a/install/kots/manifests/gitpod-installer-job.yaml b/install/kots/manifests/gitpod-installer-job.yaml index 11b177fd411dc8..cebcabf399f899 100644 --- a/install/kots/manifests/gitpod-installer-job.yaml +++ b/install/kots/manifests/gitpod-installer-job.yaml @@ -182,7 +182,32 @@ spec: config=$(cat "${CONFIG_FILE}") echo "Gitpod: ${CONFIG_FILE}=${config}" - /app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} | kubectl apply -f - + echo "Gitpod: Create a Helm template directory" + rm -Rf "${GITPOD_OBJECTS}" + mkdir -p "${GITPOD_OBJECTS}/templates" + cat <> "${GITPOD_OBJECTS}/Chart.yaml" + apiVersion: v2 + name: gitpod-kots + description: Always ready-to-code + Version: "1.0.0" + appVersion: "$(/app/installer version | yq e '.version' -)" + EOF + + /app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} > "${GITPOD_OBJECTS}/templates/gitpod.yaml" + + # The long timeout is to ensure the TLS cert is created (if required) + helm upgrade \ + --atomic \ + --cleanup-on-fail \ + --create-namespace \ + --install \ + --namespace="{{repl Namespace }}" \ + --reset-values \ + --timeout 1h \ + --wait \ + --wait-for-jobs \ + gitpod \ + "${GITPOD_OBJECTS}" echo "Gitpod: Installer job finished - goodbye" volumes: