Skip to content

Commit 09bb1b2

Browse files
authored
[installer] Use mk2 tls certificates for server (#17317)
1 parent 233ec94 commit 09bb1b2

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

install/installer/pkg/components/server/deployment.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
"github.com/gitpod-io/gitpod/installer/pkg/components/spicedb"
1818
"github.com/gitpod-io/gitpod/installer/pkg/components/usage"
1919
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
20+
wsmanagermk2 "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-mk2"
2021

2122
"github.com/gitpod-io/gitpod/installer/pkg/common"
2223
wsmanagerbridge "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-bridge"
@@ -240,11 +241,19 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
240241

241242
addWsManagerTls := common.WithLocalWsManager(ctx)
242243
if addWsManagerTls {
244+
secretName := wsmanager.TLSSecretNameClient
245+
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
246+
if cfg.Workspace != nil && cfg.Workspace.UseWsmanagerMk2 {
247+
secretName = wsmanagermk2.TLSSecretNameClient
248+
}
249+
return nil
250+
})
251+
243252
volumes = append(volumes, corev1.Volume{
244253
Name: "ws-manager-client-tls-certs",
245254
VolumeSource: corev1.VolumeSource{
246255
Secret: &corev1.SecretVolumeSource{
247-
SecretName: wsmanager.TLSSecretNameClient,
256+
SecretName: secretName,
248257
},
249258
},
250259
})

install/installer/pkg/components/ws-manager-bridge/deployment.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
1212
"github.com/gitpod-io/gitpod/installer/pkg/common"
1313
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
14+
wsmanagermk2 "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-mk2"
15+
"github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"
1416

1517
appsv1 "k8s.io/api/apps/v1"
1618
corev1 "k8s.io/api/core/v1"
@@ -35,11 +37,19 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
3537

3638
addWsManagerTls := common.WithLocalWsManager(ctx)
3739
if addWsManagerTls {
40+
secretName := wsmanager.TLSSecretNameClient
41+
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
42+
if cfg.Workspace != nil && cfg.Workspace.UseWsmanagerMk2 {
43+
secretName = wsmanagermk2.TLSSecretNameClient
44+
}
45+
return nil
46+
})
47+
3848
volumes = append(volumes, corev1.Volume{
3949
Name: "ws-manager-client-tls-certs",
4050
VolumeSource: corev1.VolumeSource{
4151
Secret: &corev1.SecretVolumeSource{
42-
SecretName: wsmanager.TLSSecretNameClient,
52+
SecretName: secretName,
4353
},
4454
},
4555
})

0 commit comments

Comments
 (0)