Skip to content

Commit 16a23fd

Browse files
corneliusludmannroboquat
authored andcommitted
[ws-scheduler] Set supervisor ref for ghosts
1 parent c52f8a0 commit 16a23fd

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

chart/templates/ws-scheduler-configmap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ data:
5050
}
5151
},
5252
"workspaceImage": "{{ template "gitpod.comp.imageFull" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.defaultImage) }}",
53-
"ideImage": "{{ template "gitpod.comp.imageFull" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.theiaImage) }}",
53+
"ideImage": "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage) }}:{{ .Values.components.workspace.codeImage.stableVersion }}",
54+
"supervisorImage": "{{ template "gitpod.comp.imageFull" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.supervisor) }}",
5455
"maxGhostWorkspaces": {{ $comp.scaler.maxGhostWorkspaces | default 0 }},
5556
"schedulerInterval": "{{ $comp.scaler.schedulerInterval | default "5s" }}",
5657
"renewal": {

components/ee/ws-scheduler/pkg/scaler/driver.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ const (
3434

3535
// WorkspaceManagerPrescaleDriverConfig configures a ws-manager based prescale driver
3636
type WorkspaceManagerPrescaleDriverConfig struct {
37-
WsManager WorkspaceManagerConfig `json:"wsman"`
38-
GhostOwner string `json:"ghostOwner"`
39-
WorkspaceImage string `json:"workspaceImage"`
40-
IDEImage string `json:"ideImage"`
41-
FeatureFlags []api.WorkspaceFeatureFlag `json:"featureFlags"`
37+
WsManager WorkspaceManagerConfig `json:"wsman"`
38+
GhostOwner string `json:"ghostOwner"`
39+
WorkspaceImage string `json:"workspaceImage"`
40+
IDEImage string `json:"ideImage"`
41+
SupervisorImage string `json:"supervisorImage"`
42+
FeatureFlags []api.WorkspaceFeatureFlag `json:"featureFlags"`
4243

4344
MaxGhostWorkspaces int `json:"maxGhostWorkspaces"`
4445
SchedulerInterval util.Duration `json:"schedulerInterval"`
@@ -291,7 +292,8 @@ func (wspd *WorkspaceManagerPrescaleDriver) startGhostWorkspaces(ctx context.Con
291292
},
292293
DeprecatedIdeImage: wspd.Config.IDEImage,
293294
IdeImage: &api.IDEImage{
294-
WebRef: wspd.Config.IDEImage,
295+
WebRef: wspd.Config.IDEImage,
296+
SupervisorRef: wspd.Config.SupervisorImage,
295297
},
296298
Initializer: &csapi.WorkspaceInitializer{
297299
Spec: &csapi.WorkspaceInitializer_Empty{

installer/pkg/components/ws-scheduler/configmap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
8383
},
8484
WorkspaceImage: common.ImageName("", workspace.DefaultWorkspaceImage, workspace.DefaultWorkspaceImageVersion),
8585
IDEImage: common.ImageName(ctx.Config.Repository, workspace.IDEImageRepo, ctx.VersionManifest.Components.Workspace.CodeImage.Version),
86+
SupervisorImage: common.ImageName(ctx.Config.Repository, workspace.SupervisorImage, ctx.VersionManifest.Components.Workspace.Supervisor.Version),
8687
FeatureFlags: nil,
8788
MaxGhostWorkspaces: 10,
8889
SchedulerInterval: util.Duration(time.Second * 5),

0 commit comments

Comments
 (0)