From f892ba4ac6dd4908833a9ea527aacfff2a9ea53a Mon Sep 17 00:00:00 2001 From: Alejandro de Brito Fontes Date: Fri, 22 Sep 2023 23:27:49 +0000 Subject: [PATCH] Cleanup installer --- License.third-party.go.txt | 1 - install/installer/docs/overview.md | 1 - install/installer/pkg/common/common.go | 19 ------------------- install/installer/pkg/common/constants.go | 2 -- install/installer/pkg/common/toleration.go | 19 ------------------- .../image-builder-mk3/networkpolicy.go | 7 ------- .../components/image-builder-mk3/tlssecret.go | 8 -------- .../components/registry-facade/daemonset.go | 1 - .../pkg/components/ws-daemon/daemonset.go | 2 -- .../installer/pkg/config/versions/versions.go | 5 ----- 10 files changed, 65 deletions(-) delete mode 100644 install/installer/pkg/common/toleration.go diff --git a/License.third-party.go.txt b/License.third-party.go.txt index 10971cc3ec1f5e..f1d5a090baa2ff 100644 --- a/License.third-party.go.txt +++ b/License.third-party.go.txt @@ -194,7 +194,6 @@ github.com/prometheus/procfs Apa github.com/prometheus/pushgateway Apache License 2.0 github.com/PuerkitoBio/purell BSD 3-Clause "New" or "Revised" License github.com/PuerkitoBio/urlesc BSD 3-Clause "New" or "Revised" License -github.com/rabbitmq/amqp091-go BSD 2-Clause "Simplified" License github.com/ramr/go-reaper MIT License github.com/redis/go-redis BSD 2-Clause "Simplified" License github.com/relvacode/iso8601 MIT License diff --git a/install/installer/docs/overview.md b/install/installer/docs/overview.md index 3c5db1b96d181d..fdd068e5715731 100644 --- a/install/installer/docs/overview.md +++ b/install/installer/docs/overview.md @@ -198,7 +198,6 @@ yq eval-all --inplace \ - All Gitpod components - Container registry* - MySQL database* -- RabbitMQ - Minio object storage* \* By default, these dependencies are installed if the `inCluster` setting diff --git a/install/installer/pkg/common/common.go b/install/installer/pkg/common/common.go index 111ef187d8ef0c..78f00b274f76bd 100644 --- a/install/installer/pkg/common/common.go +++ b/install/installer/pkg/common/common.go @@ -597,25 +597,6 @@ var ( tcpProtocol := corev1.ProtocolTCP return &tcpProtocol }() - PrometheusIngressRule = networkingv1.NetworkPolicyIngressRule{ - Ports: []networkingv1.NetworkPolicyPort{ - { - Protocol: TCPProtocol, - Port: &intstr.IntOrString{IntVal: baseserver.BuiltinMetricsPort}, - }, - }, - From: []networkingv1.NetworkPolicyPeer{ - { - // todo(sje): add these labels to the prometheus instance - PodSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "app": "prometheus", - "component": "server", - }, - }, - }, - }, - } ) var DeploymentStrategy = appsv1.DeploymentStrategy{ diff --git a/install/installer/pkg/common/constants.go b/install/installer/pkg/common/constants.go index 9f3cb482af6e2b..487f0aea3ad305 100644 --- a/install/installer/pkg/common/constants.go +++ b/install/installer/pkg/common/constants.go @@ -20,7 +20,6 @@ const ( DockerRegistryName = "registry" GitpodContainerRegistry = "eu.gcr.io/gitpod-core-dev/build" InClusterDbSecret = "mysql" - InClusterMessageQueueName = "rabbitmq" KubeRBACProxyRepo = "quay.io" KubeRBACProxyImage = "brancz/kube-rbac-proxy" KubeRBACProxyTag = "v0.14.2" @@ -45,7 +44,6 @@ const ( SystemNodeCritical = "system-node-critical" PublicApiComponent = "public-api-server" UsageComponent = "usage" - WSManagerComponent = "ws-manager" WSManagerMk2Component = "ws-manager-mk2" WSManagerBridgeComponent = "ws-manager-bridge" WSProxyComponent = "ws-proxy" diff --git a/install/installer/pkg/common/toleration.go b/install/installer/pkg/common/toleration.go deleted file mode 100644 index 2f25b2ac11b844..00000000000000 --- a/install/installer/pkg/common/toleration.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2023 Gitpod GmbH. All rights reserved. -// Licensed under the GNU Affero General Public License (AGPL). -// See License.AGPL.txt in the project root for license information. - -package common - -import ( - corev1 "k8s.io/api/core/v1" -) - -func GPUToleration() []corev1.Toleration { - return []corev1.Toleration{ - { - Effect: corev1.TaintEffectNoSchedule, - Key: "nvidia.com/gpu", - Operator: corev1.TolerationOpExists, - }, - } -} diff --git a/install/installer/pkg/components/image-builder-mk3/networkpolicy.go b/install/installer/pkg/components/image-builder-mk3/networkpolicy.go index 800903e87b81ac..dfd24622698163 100644 --- a/install/installer/pkg/components/image-builder-mk3/networkpolicy.go +++ b/install/installer/pkg/components/image-builder-mk3/networkpolicy.go @@ -28,13 +28,6 @@ func networkpolicy(ctx *common.RenderContext) ([]runtime.Object, error) { }, }, }, - { - PodSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "component": common.WSManagerComponent, - }, - }, - }, { PodSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ diff --git a/install/installer/pkg/components/image-builder-mk3/tlssecret.go b/install/installer/pkg/components/image-builder-mk3/tlssecret.go index dd9a1e124cbec0..2c9626cc83a2fd 100644 --- a/install/installer/pkg/components/image-builder-mk3/tlssecret.go +++ b/install/installer/pkg/components/image-builder-mk3/tlssecret.go @@ -8,7 +8,6 @@ import ( "fmt" "github.com/gitpod-io/gitpod/installer/pkg/common" - "github.com/gitpod-io/gitpod/installer/pkg/config/v1" certmanagerv1 "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/jetstack/cert-manager/pkg/apis/meta/v1" @@ -17,13 +16,6 @@ import ( ) func tlssecret(ctx *common.RenderContext) ([]runtime.Object, error) { - // Only enable TLS in workspace clusters. This check can be removed - // once image-builder-mk3 has been removed from application clusters - // (https://github.com/gitpod-io/gitpod/issues/7845). - if ctx.Config.Kind != config.InstallationWorkspace { - return nil, nil - } - serverAltNames := []string{ fmt.Sprintf("%s.%s.svc", Component, ctx.Namespace), fmt.Sprintf("%s.%s.svc.cluster.local", Component, ctx.Namespace), diff --git a/install/installer/pkg/components/registry-facade/daemonset.go b/install/installer/pkg/components/registry-facade/daemonset.go index 5bbd8570a0d89a..1ed9083ea6b078 100644 --- a/install/installer/pkg/components/registry-facade/daemonset.go +++ b/install/installer/pkg/components/registry-facade/daemonset.go @@ -303,7 +303,6 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { }, common.CAVolume(), }, volumes...), - Tolerations: common.GPUToleration(), }, }, UpdateStrategy: common.DaemonSetRolloutStrategy(), diff --git a/install/installer/pkg/components/ws-daemon/daemonset.go b/install/installer/pkg/components/ws-daemon/daemonset.go index 7658d8a90434a8..44fdbcee09efd5 100644 --- a/install/installer/pkg/components/ws-daemon/daemonset.go +++ b/install/installer/pkg/components/ws-daemon/daemonset.go @@ -205,8 +205,6 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { }, } - tolerations = append(tolerations, common.GPUToleration()...) - podSpec := corev1.PodSpec{ Volumes: volumes, InitContainers: initContainers, diff --git a/install/installer/pkg/config/versions/versions.go b/install/installer/pkg/config/versions/versions.go index 1e1a97f0049062..6898aec0ba1451 100644 --- a/install/installer/pkg/config/versions/versions.go +++ b/install/installer/pkg/config/versions/versions.go @@ -16,7 +16,6 @@ type Versioned struct { type Components struct { AgentSmith Versioned `json:"agentSmith"` Blobserve Versioned `json:"blobserve"` - CAUpdater Versioned `json:"caUpdater"` ContentService Versioned `json:"contentService"` Dashboard Versioned `json:"dashboard"` DBMigrations Versioned `json:"dbMigrations"` @@ -30,8 +29,6 @@ type Components struct { Versioned BuilderImage Versioned `json:"builderImage"` } `json:"imageBuilderMk3"` - // Deprecated. - IntegrationTests Versioned `json:"integrationTests"` OpenVSXProxy Versioned `json:"openVSXProxy"` Proxy Versioned `json:"proxy"` PublicAPIServer Versioned `json:"public-api-server"` @@ -84,8 +81,6 @@ type Components struct { NodeLabeler Versioned `json:"node-labeler"` } -// var embedded embed.FS - func Embedded() (*Manifest, error) { return loadEmbedded() }