Skip to content

Commit 0005267

Browse files
author
Simon Emms
committed
[installer]: move the post-processing of openvsx stateful sets into installer
1 parent 7b64cd1 commit 0005267

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

install/installer/pkg/common/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const (
4040
ServerComponent = "server"
4141
ServerInstallationAdminPort = 9000
4242
SystemNodeCritical = "system-node-critical"
43+
OpenVSXProxyComponent = "openvsx-proxy"
4344
WSManagerComponent = "ws-manager"
4445
WSManagerBridgeComponent = "ws-manager-bridge"
4546
WSProxyComponent = "ws-proxy"

install/installer/pkg/common/postprocess.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/mikefarah/yq/v4/pkg/yqlib"
1313
logging "gopkg.in/op/go-logging.v1"
1414
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
15+
"k8s.io/utils/pointer"
1516
)
1617

1718
// Processors list of processes executed on each resource document
@@ -21,6 +22,12 @@ var Processors = []Processor{
2122
Type: TypeMetaNetworkPolicy,
2223
Expression: "del(.status)",
2324
},
25+
// Remove "status" from root of OpenVSXProxy stateful sets
26+
{
27+
Type: TypeMetaStatefulSet,
28+
Expression: "del(.status)",
29+
Name: pointer.String(OpenVSXProxyComponent),
30+
},
2431
}
2532

2633
type Processor struct {

install/installer/pkg/components/openvsx-proxy/constants.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
package openvsx_proxy
66

7+
import "github.com/gitpod-io/gitpod/installer/pkg/common"
8+
79
const (
8-
Component = "openvsx-proxy"
10+
Component = common.OpenVSXProxyComponent
911
ContainerPort = 8080
1012
ServicePort = 8080
1113
PortName = "http"

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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)