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 18, 2022
1 parent 04ea6c3 commit 35b9060
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 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
2 changes: 1 addition & 1 deletion install/kots/manifests/gitpod-installation-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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-clusterip.8"
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-post-process.4"
command:
- /bin/sh
- -c
Expand Down
8 changes: 1 addition & 7 deletions install/kots/manifests/gitpod-installer-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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-installer-clusterip.8"
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-post-process.4"
volumeMounts:
- mountPath: /config-patch
name: config-patch
Expand Down 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 35b9060

Please sign in to comment.