Skip to content

Commit

Permalink
[installer]: move the post-processing openvsx statefulset to installer
Browse files Browse the repository at this point in the history
This removes the "status" block on the root, which breaks older versions
of Kubernetes
  • Loading branch information
Simon Emms committed Jul 16, 2022
1 parent a59cd5b commit a213fbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions install/installer/pkg/postprocess/postprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import (
"os"

"github.com/gitpod-io/gitpod/installer/pkg/common"
openvsxproxy "github.com/gitpod-io/gitpod/installer/pkg/components/openvsx-proxy"
"github.com/mikefarah/yq/v4/pkg/yqlib"
logging "gopkg.in/op/go-logging.v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
)

// Processors list of processes executed on each resource document
Expand All @@ -22,6 +24,12 @@ var Processors = []Processor{
Type: common.TypeMetaNetworkPolicy,
Expression: "del(.status)",
},
// Remove "status" from root of OpenVSXProxy stateful sets
{
Type: common.TypeMetaStatefulSet,
Expression: "del(.status)",
Name: pointer.String(openvsxproxy.Component),
},
}

type Processor struct {
Expand Down
6 changes: 0 additions & 6 deletions install/kots/manifests/gitpod-installer-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,6 @@ spec:
echo "Gitpod: render Kubernetes manifests"
/app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} --use-experimental-config > "${GITPOD_OBJECTS}/templates/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)' \
"${GITPOD_OBJECTS}/templates/gitpod.yaml"
if [ '{{repl ConfigOptionEquals "reg_incluster" "1" }}' = "true" ];
then
echo "Gitpod: Add the local registry secret to the in-cluster registry secret"
Expand Down

0 comments on commit a213fbb

Please sign in to comment.