mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
[installer] Use mk2 tls certificates for server (#17317)
This commit is contained in:
parent
233ec9457a
commit
09bb1b218c
@ -17,6 +17,7 @@ import (
|
|||||||
"github.com/gitpod-io/gitpod/installer/pkg/components/spicedb"
|
"github.com/gitpod-io/gitpod/installer/pkg/components/spicedb"
|
||||||
"github.com/gitpod-io/gitpod/installer/pkg/components/usage"
|
"github.com/gitpod-io/gitpod/installer/pkg/components/usage"
|
||||||
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
|
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
|
||||||
|
wsmanagermk2 "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-mk2"
|
||||||
|
|
||||||
"github.com/gitpod-io/gitpod/installer/pkg/common"
|
"github.com/gitpod-io/gitpod/installer/pkg/common"
|
||||||
wsmanagerbridge "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-bridge"
|
wsmanagerbridge "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-bridge"
|
||||||
@ -240,11 +241,19 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
|
|||||||
|
|
||||||
addWsManagerTls := common.WithLocalWsManager(ctx)
|
addWsManagerTls := common.WithLocalWsManager(ctx)
|
||||||
if addWsManagerTls {
|
if addWsManagerTls {
|
||||||
|
secretName := wsmanager.TLSSecretNameClient
|
||||||
|
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
|
||||||
|
if cfg.Workspace != nil && cfg.Workspace.UseWsmanagerMk2 {
|
||||||
|
secretName = wsmanagermk2.TLSSecretNameClient
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
|
||||||
volumes = append(volumes, corev1.Volume{
|
volumes = append(volumes, corev1.Volume{
|
||||||
Name: "ws-manager-client-tls-certs",
|
Name: "ws-manager-client-tls-certs",
|
||||||
VolumeSource: corev1.VolumeSource{
|
VolumeSource: corev1.VolumeSource{
|
||||||
Secret: &corev1.SecretVolumeSource{
|
Secret: &corev1.SecretVolumeSource{
|
||||||
SecretName: wsmanager.TLSSecretNameClient,
|
SecretName: secretName,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import (
|
|||||||
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
|
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
|
||||||
"github.com/gitpod-io/gitpod/installer/pkg/common"
|
"github.com/gitpod-io/gitpod/installer/pkg/common"
|
||||||
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
|
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
|
||||||
|
wsmanagermk2 "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager-mk2"
|
||||||
|
"github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"
|
||||||
|
|
||||||
appsv1 "k8s.io/api/apps/v1"
|
appsv1 "k8s.io/api/apps/v1"
|
||||||
corev1 "k8s.io/api/core/v1"
|
corev1 "k8s.io/api/core/v1"
|
||||||
@ -35,11 +37,19 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
|
|||||||
|
|
||||||
addWsManagerTls := common.WithLocalWsManager(ctx)
|
addWsManagerTls := common.WithLocalWsManager(ctx)
|
||||||
if addWsManagerTls {
|
if addWsManagerTls {
|
||||||
|
secretName := wsmanager.TLSSecretNameClient
|
||||||
|
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
|
||||||
|
if cfg.Workspace != nil && cfg.Workspace.UseWsmanagerMk2 {
|
||||||
|
secretName = wsmanagermk2.TLSSecretNameClient
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
|
||||||
volumes = append(volumes, corev1.Volume{
|
volumes = append(volumes, corev1.Volume{
|
||||||
Name: "ws-manager-client-tls-certs",
|
Name: "ws-manager-client-tls-certs",
|
||||||
VolumeSource: corev1.VolumeSource{
|
VolumeSource: corev1.VolumeSource{
|
||||||
Secret: &corev1.SecretVolumeSource{
|
Secret: &corev1.SecretVolumeSource{
|
||||||
SecretName: wsmanager.TLSSecretNameClient,
|
SecretName: secretName,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user