Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions install/installer/pkg/config/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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 (
Expand Down
3 changes: 3 additions & 0 deletions install/installer/pkg/config/v1/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down