Skip to content

Commit 8bdad13

Browse files
author
Andrew Farries
committed
Add WorkspaceManagerBridge config to server
1 parent 1d2bae1 commit 8bdad13

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/gitpod-io/gitpod/installer/pkg/common"
1111
wsmanager "github.com/gitpod-io/gitpod/installer/pkg/components/ws-manager"
12-
"github.com/gitpod-io/gitpod/installer/pkg/config/v1"
12+
"github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"
1313
)
1414

1515
var Objects = common.CompositeRenderFunc(
@@ -20,9 +20,17 @@ var Objects = common.CompositeRenderFunc(
2020
)
2121

2222
func WSManagerList(ctx *common.RenderContext) []WorkspaceCluster {
23+
skipSelf := false
24+
_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
25+
if cfg.WebApp != nil && cfg.WebApp.WorkspaceManagerBridge != nil {
26+
skipSelf = cfg.WebApp.WorkspaceManagerBridge.SkipSelf
27+
}
28+
return nil
29+
})
30+
2331
// Registering a local cluster ws-manager only makes sense when we actually deploy one,
2432
// (ie when we are doing a full self hosted installation rather than a SaaS install to gitpod.io).
25-
if ctx.Config.Kind != config.InstallationFull {
33+
if skipSelf {
2634
return []WorkspaceCluster{}
2735
}
2836

install/installer/pkg/config/v1/experimental/experimental.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ type WorkspaceTemplates struct {
9191
}
9292

9393
type WebAppConfig struct {
94-
PublicAPI *PublicAPIConfig `json:"publicApi,omitempty"`
95-
Server *ServerConfig `json:"server,omitempty"`
96-
ProxyConfig *ProxyConfig `json:"proxy,omitempty"`
97-
UsePodAntiAffinity bool `json:"usePodAntiAffinity"`
94+
PublicAPI *PublicAPIConfig `json:"publicApi,omitempty"`
95+
Server *ServerConfig `json:"server,omitempty"`
96+
ProxyConfig *ProxyConfig `json:"proxy,omitempty"`
97+
WorkspaceManagerBridge *WsManagerBridgeConfig `json:"wsManagerBridge,omitempty"`
98+
UsePodAntiAffinity bool `json:"usePodAntiAffinity"`
9899
}
99100

100101
type WorkspaceDefaults struct {
@@ -121,6 +122,10 @@ type GithubApp struct {
121122
CertSecretName string `json:"certSecretName"`
122123
}
123124

125+
type WsManagerBridgeConfig struct {
126+
SkipSelf bool `json:"skipSelf"`
127+
}
128+
124129
type ServerConfig struct {
125130
WorkspaceDefaults WorkspaceDefaults `json:"workspaceDefaults"`
126131
OAuthServer OAuthServer `json:"oauthServer"`

0 commit comments

Comments
 (0)