diff --git a/install/installer/pkg/components/openvsx-proxy/configmap.go b/install/installer/pkg/components/openvsx-proxy/configmap.go index ac2657eef2e0d2..4de958a49a2a82 100644 --- a/install/installer/pkg/components/openvsx-proxy/configmap.go +++ b/install/installer/pkg/components/openvsx-proxy/configmap.go @@ -22,7 +22,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { LogDebug: false, CacheDurationRegular: util.Duration(time.Minute), CacheDurationBackup: util.Duration(time.Hour * 72), - URLUpstream: "https://open-vsx.org", // todo(sje): make configurable + URLUpstream: ctx.Config.OpenVSX.URL, URLLocal: fmt.Sprintf("https://open-vsx.%s", ctx.Config.Domain), MaxIdleConns: 1000, MaxIdleConnsPerHost: 1000, diff --git a/install/installer/pkg/config/v1/config.go b/install/installer/pkg/config/v1/config.go index 7730c5ac2c2302..9b784bc7c14ddc 100644 --- a/install/installer/pkg/config/v1/config.go +++ b/install/installer/pkg/config/v1/config.go @@ -55,6 +55,7 @@ func (v version) Defaults(in interface{}) error { cfg.Workspace.Runtime.FSShiftMethod = FSShiftFuseFS cfg.Workspace.Runtime.ContainerDSocket = "/run/containerd/containerd.sock" cfg.Workspace.Runtime.ContainerDRuntimeDir = "/var/lib/containerd/io.containerd.runtime.v2.task/k8s.io" + cfg.OpenVSX.URL = "https://open-vsx.org" return nil } @@ -82,6 +83,8 @@ type Config struct { Workspace Workspace `json:"workspace" validate:"required"` + OpenVSX OpenVSX `json:"openVSX"` + AuthProviders []ObjectRef `json:"authProviders" validate:"dive"` BlockNewUsers BlockNewUsers `json:"blockNewUsers"` License *ObjectRef `json:"license,omitempty"` @@ -229,6 +232,10 @@ type Workspace struct { Templates *WorkspaceTemplates `json:"templates,omitempty"` } +type OpenVSX struct { + URL string `json:"url" validate:"url"` +} + type FSShiftMethod string const ( diff --git a/install/installer/pkg/config/v1/load.go b/install/installer/pkg/config/v1/load.go index 576ce9cbc3c49d..ac5795d46e3905 100644 --- a/install/installer/pkg/config/v1/load.go +++ b/install/installer/pkg/config/v1/load.go @@ -50,6 +50,9 @@ func LoadMock() *Config { Kind: ObjectRefSecret, Name: "https-certs", }, + OpenVSX: OpenVSX{ + URL: "https://open-vsx.org", + }, Workspace: Workspace{ Runtime: WorkspaceRuntime{ FSShiftMethod: FSShiftFuseFS,