Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup installer #18784

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion License.third-party.go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion install/installer/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions install/installer/pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -597,25 +596,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{
Expand Down
2 changes: 0 additions & 2 deletions install/installer/pkg/common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
26 changes: 0 additions & 26 deletions install/installer/pkg/common/networkpolicies.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,3 @@ func AllowKubeDnsEgressRule() v1.NetworkPolicyEgressRule {

return dnsEgressRule
}

func AllowWSManagerEgressRule() v1.NetworkPolicyEgressRule {
var tcp = corev1.ProtocolTCP

dnsEgressRule := v1.NetworkPolicyEgressRule{
Ports: []v1.NetworkPolicyPort{
{
Protocol: &tcp,
Port: &intstr.IntOrString{
IntVal: 8080,
},
},
},
To: []v1.NetworkPolicyPeer{{
PodSelector: &metav1.LabelSelector{
MatchLabels: map[string]string{
"app": AppName,
"component": WSManagerComponent,
},
},
NamespaceSelector: &metav1.LabelSelector{},
}},
}

return dnsEgressRule
}
19 changes: 0 additions & 19 deletions install/installer/pkg/common/toleration.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) {
},
common.CAVolume(),
}, volumes...),
Tolerations: common.GPUToleration(),
},
},
UpdateStrategy: common.DaemonSetRolloutStrategy(),
Expand Down
2 changes: 0 additions & 2 deletions install/installer/pkg/components/ws-daemon/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) {
},
}

tolerations = append(tolerations, common.GPUToleration()...)

podSpec := corev1.PodSpec{
Volumes: volumes,
InitContainers: initContainers,
Expand Down
7 changes: 0 additions & 7 deletions install/installer/pkg/config/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ type Config struct {

Database Database `json:"database" validate:"required"`

// Deprecated.
MessageBus *MessageBus `json:"messageBus,omitempty"`

ObjectStorage ObjectStorage `json:"objectStorage" validate:"required"`

ContainerRegistry ContainerRegistry `json:"containerRegistry" validate:"required"`
Expand Down Expand Up @@ -186,10 +183,6 @@ type Tracing struct {
SecretName *string `json:"secretName,omitempty"`
}

type MessageBus struct {
Credentials *ObjectRef `json:"credentials"`
}

type Database struct {
InCluster *bool `json:"inCluster,omitempty"`
External *DatabaseExternal `json:"external,omitempty"`
Expand Down
7 changes: 0 additions & 7 deletions install/installer/pkg/config/v1/deprecations.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ var deprecatedFields = map[string]deprecatedField{
return nil
},
},
// No MapValue can exist as this requires a secret rather than passing in the value
"experimental.common.staticMessagebusPassword": {
Selector: func(cfg *Config) (bool, any) {
val := cfg.Experimental.Common.StaticMessagebusPassword
return val != "", "***" // Redact the password
},
},
"experimental.ide.resolveLatest": {
Selector: func(cfg *Config) (bool, any) {
val := cfg.Experimental.IDE.ResolveLatest
Expand Down
2 changes: 0 additions & 2 deletions install/installer/pkg/config/v1/experimental/experimental.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ type Config struct {
type CommonConfig struct {
// Deprecated.
PodConfig map[string]*PodConfig `json:"podConfig,omitempty"`
// Deprecated use a secret instead in messageBus.credentials
StaticMessagebusPassword string `json:"staticMessagebusPassword"`
}

type PodConfig struct {
Expand Down
5 changes: 0 additions & 5 deletions install/installer/pkg/config/versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -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"`
Expand Down Expand Up @@ -84,8 +81,6 @@ type Components struct {
NodeLabeler Versioned `json:"node-labeler"`
}

// var embedded embed.FS

func Embedded() (*Manifest, error) {
return loadEmbedded()
}