From fdf1358eade064cfbacfa087fb226ca769f83739 Mon Sep 17 00:00:00 2001 From: Simon Emms Date: Tue, 8 Mar 2022 10:52:38 +0000 Subject: [PATCH] [kots]: add workaround for 8529 The Go library has a misconfiguration which adds in "replicas" and "availableReplicas" to the OpenVSX Proxy StatefulSet. This can cause validation issues dependent upon the version of Kubernetes that's being used. This removes the block from the rendered Kubernetes objects which is the expected behaviour. --- install/kots/manifests/gitpod-installer-job.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/install/kots/manifests/gitpod-installer-job.yaml b/install/kots/manifests/gitpod-installer-job.yaml index 11b177fd411dc8..0e9157e22844e4 100644 --- a/install/kots/manifests/gitpod-installer-job.yaml +++ b/install/kots/manifests/gitpod-installer-job.yaml @@ -178,11 +178,20 @@ spec: echo "Gitpod: ${CONFIG_PATCH_FILE}=${config_patch}" yq eval-all --inplace 'select(fileIndex == 0) * select(fileIndex == 1)' "${CONFIG_FILE}" /tmp/patch.yaml - echo "Gitpod: Generate the Kubernetes objects and apply" + echo "Gitpod: Generate the Kubernetes objects" config=$(cat "${CONFIG_FILE}") echo "Gitpod: ${CONFIG_FILE}=${config}" - /app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} | kubectl apply -f - + /app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} > /tmp/gitpod.yaml + + # Workaround for #8532 and #8529 + echo "Gitpod: Remove the StatefulSet status object for OpenVSX Proxy" + yq eval-all --inplace \ + 'del(select(.kind == "StatefulSet" and .metadata.name == "openvsx-proxy").status)' \ + /tmp/gitpod.yaml + + echo "Gitpod: Apply the Kubernetes objects" + kubectl apply -f /tmp/gitpod.yaml echo "Gitpod: Installer job finished - goodbye" volumes: