Skip to content

Commit d6dad48

Browse files
author
Simon Emms
committed
[installer]: move the post-processing openvsx statefulset to installer
This removes the "status" block on the root, which breaks older versions of Kubernetes
1 parent 90254f3 commit d6dad48

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

install/installer/pkg/postprocess/postprocess.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import (
1010
"strings"
1111

1212
"github.com/gitpod-io/gitpod/installer/pkg/common"
13+
openvsxproxy "github.com/gitpod-io/gitpod/installer/pkg/components/openvsx-proxy"
1314
"github.com/mikefarah/yq/v4/pkg/yqlib"
1415
logging "gopkg.in/op/go-logging.v1"
1516
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
17+
"k8s.io/utils/pointer"
1618
)
1719

1820
// Processors list of processes executed on each resource document
@@ -22,6 +24,12 @@ var Processors = []Processor{
2224
Type: common.TypeMetaNetworkPolicy,
2325
Expression: "del(.status)",
2426
},
27+
// Remove "status" from root of OpenVSXProxy stateful sets
28+
{
29+
Type: common.TypeMetaStatefulSet,
30+
Expression: "del(.status)",
31+
Name: pointer.String(openvsxproxy.Component),
32+
},
2533
}
2634

2735
type Processor struct {

install/kots/manifests/gitpod-installation-status.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
containers:
3131
- name: installation-status
3232
# This will normally be the release tag
33-
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-clusterip.8"
33+
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-post-process.4"
3434
command:
3535
- /bin/sh
3636
- -c

install/kots/manifests/gitpod-installer-job.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
containers:
2929
- name: installer
3030
# This will normally be the release tag
31-
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-clusterip.8"
31+
image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-installer-post-process.4"
3232
volumeMounts:
3333
- mountPath: /config-patch
3434
name: config-patch
@@ -311,12 +311,6 @@ spec:
311311
echo "Gitpod: render Kubernetes manifests"
312312
/app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} --use-experimental-config > "${GITPOD_OBJECTS}/templates/gitpod.yaml"
313313
314-
# Workaround for #8532 and #8529
315-
echo "Gitpod: Remove the StatefulSet status object for OpenVSX Proxy"
316-
yq eval-all --inplace \
317-
'del(select(.kind == "StatefulSet" and .metadata.name == "openvsx-proxy").status)' \
318-
"${GITPOD_OBJECTS}/templates/gitpod.yaml"
319-
320314
if [ '{{repl ConfigOptionEquals "reg_incluster" "1" }}' = "true" ];
321315
then
322316
echo "Gitpod: Add the local registry secret to the in-cluster registry secret"

0 commit comments

Comments
 (0)