Skip to content

Commit

Permalink
[installer] Remove messagebus WEB-618 (gitpod-io#18216)
Browse files Browse the repository at this point in the history
* [server] Publish events during workspace starter

* retest

* fix

* fix

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* [server] Publish events during workspace starter

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* retest

* fix

* [installer] Remove messagebus

* fix

* fix
  • Loading branch information
easyCZ authored Jul 24, 2023
1 parent 8266f61 commit a778e6d
Show file tree
Hide file tree
Showing 23 changed files with 4 additions and 885 deletions.
2 changes: 1 addition & 1 deletion dev/preview/workflow/preview/deploy-gitpod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ rm -f "${INSTALLER_RENDER_PATH}"
# =========================
# Wait for objects to be ready
# =========================
for item in deployment.apps/blobserve deployment.apps/content-service deployment.apps/dashboard deployment.apps/ide-metrics deployment.apps/ide-proxy deployment.apps/ide-service deployment.apps/image-builder-mk3 deployment.apps/minio deployment.apps/node-labeler deployment.apps/proxy deployment.apps/public-api-server deployment.apps/redis deployment.apps/server deployment.apps/spicedb deployment.apps/usage deployment.apps/ws-manager-mk2 deployment.apps/ws-manager-bridge deployment.apps/ws-proxy statefulset.apps/messagebus statefulset.apps/mysql statefulset.apps/openvsx-proxy daemonset.apps/agent-smith daemonset.apps/fluent-bit daemonset.apps/registry-facade daemonset.apps/ws-daemon; do
for item in deployment.apps/blobserve deployment.apps/content-service deployment.apps/dashboard deployment.apps/ide-metrics deployment.apps/ide-proxy deployment.apps/ide-service deployment.apps/image-builder-mk3 deployment.apps/minio deployment.apps/node-labeler deployment.apps/proxy deployment.apps/public-api-server deployment.apps/redis deployment.apps/server deployment.apps/spicedb deployment.apps/usage deployment.apps/ws-manager-mk2 deployment.apps/ws-manager-bridge deployment.apps/ws-proxy statefulset.apps/mysql statefulset.apps/openvsx-proxy daemonset.apps/agent-smith daemonset.apps/fluent-bit daemonset.apps/registry-facade daemonset.apps/ws-daemon; do
kubectl --kubeconfig "${PREVIEW_K3S_KUBE_PATH}" --context "${PREVIEW_K3S_KUBE_CONTEXT}" rollout status "${item}" --namespace="${PREVIEW_NAMESPACE}"
done

Expand Down
62 changes: 0 additions & 62 deletions install/installer/pkg/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,48 +236,6 @@ func AnalyticsEnv(cfg *config.Config) (res []corev1.EnvVar) {
}}
}

func MessageBusEnv(cfg *config.Config) (res []corev1.EnvVar) {
clusterObj := corev1.LocalObjectReference{Name: InClusterMessageQueueName}
tlsObj := corev1.LocalObjectReference{Name: InClusterMessageQueueTLS}

credsSecret := clusterObj
if cfg.MessageBus != nil && cfg.MessageBus.Credentials != nil {
credsSecret = corev1.LocalObjectReference{Name: cfg.MessageBus.Credentials.Name}
}

return []corev1.EnvVar{{
Name: "MESSAGEBUS_USERNAME",
ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: clusterObj,
Key: "username",
}},
}, {
Name: "MESSAGEBUS_PASSWORD",
ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: credsSecret,
Key: "rabbitmq-password",
}},
}, {
Name: "MESSAGEBUS_CA",
ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: tlsObj,
Key: "ca.crt",
}},
}, {
Name: "MESSAGEBUS_CERT",
ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: tlsObj,
Key: "tls.crt",
}},
}, {
Name: "MESSAGEBUS_KEY",
ValueFrom: &corev1.EnvVarSource{SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: tlsObj,
Key: "tls.key",
}},
}}
}

func DatabaseEnv(cfg *config.Config) (res []corev1.EnvVar) {
var (
secretRef corev1.LocalObjectReference
Expand Down Expand Up @@ -508,26 +466,6 @@ func DatabaseWaiterContainer(ctx *RenderContext) *corev1.Container {
}
}

func MessageBusWaiterContainer(ctx *RenderContext) *corev1.Container {
return &corev1.Container{
Name: "msgbus-waiter",
Image: ctx.ImageName(ctx.Config.Repository, "service-waiter", ctx.VersionManifest.Components.ServiceWaiter.Version),
Args: []string{
"-v",
"messagebus",
},
SecurityContext: &corev1.SecurityContext{
Privileged: pointer.Bool(false),
AllowPrivilegeEscalation: pointer.Bool(false),
RunAsUser: pointer.Int64(31001),
},
Env: MergeEnv(
MessageBusEnv(&ctx.Config),
ProxyEnv(&ctx.Config),
),
}
}

func RedisWaiterContainer(ctx *RenderContext) *corev1.Container {
return &corev1.Container{
Name: "redis-waiter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/gitpod-io/gitpod/installer/pkg/components/minio"
"github.com/gitpod-io/gitpod/installer/pkg/components/proxy"
public_api_server "github.com/gitpod-io/gitpod/installer/pkg/components/public-api-server"
"github.com/gitpod-io/gitpod/installer/pkg/components/rabbitmq"
"github.com/gitpod-io/gitpod/installer/pkg/components/redis"
"github.com/gitpod-io/gitpod/installer/pkg/components/server"
"github.com/gitpod-io/gitpod/installer/pkg/components/spicedb"
Expand All @@ -29,7 +28,6 @@ var Objects = common.CompositeRenderFunc(
migrations.Objects,
minio.Objects,
proxy.Objects,
rabbitmq.Objects,
server.Objects,
wsmanagerbridge.Objects,
public_api_server.Objects,
Expand All @@ -42,5 +40,4 @@ var Objects = common.CompositeRenderFunc(
var Helm = common.CompositeHelmFunc(
database.Helm,
minio.Helm,
rabbitmq.Helm,
)
54 changes: 0 additions & 54 deletions install/installer/pkg/components/rabbitmq/certs/msgbus-ca.key

This file was deleted.

32 changes: 0 additions & 32 deletions install/installer/pkg/components/rabbitmq/certs/msgbus-ca.pem

This file was deleted.

30 changes: 0 additions & 30 deletions install/installer/pkg/components/rabbitmq/certs/msgbus-client.crt

This file was deleted.

51 changes: 0 additions & 51 deletions install/installer/pkg/components/rabbitmq/certs/msgbus-client.pem

This file was deleted.

Loading

0 comments on commit a778e6d

Please sign in to comment.