Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Add and use supervisor image config #6669

Merged
merged 1 commit into from
Nov 18, 2021
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
3 changes: 2 additions & 1 deletion chart/templates/server-ide-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ data:
"ideVersion": "{{ .Values.components.workspace.codeImage.stableVersion }}",
"ideImageRepo": "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage) }}",
"ideImageAliases": {{ (include "ide-images-aliases" (dict "root" . "gp" $.Values)) | fromYaml | toJson }},
"desktopIdeImageAliases": {{ (include "desktop-ide-images-aliases" (dict "root" . "gp" $.Values)) | fromYaml | toJson }}
"desktopIdeImageAliases": {{ (include "desktop-ide-images-aliases" (dict "root" . "gp" $.Values)) | fromYaml | toJson }},
"supervisorImage": "{{ template "gitpod.comp.imageFull" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.supervisor) }}"
}
{{- end }}
3 changes: 3 additions & 0 deletions components/gitpod-protocol/src/workspace-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,7 @@ export interface WorkspaceInstanceConfiguration {

// desktopIdeImage is the ref of the desktop IDE image this instance uses.
desktopIdeImage?: string

// supervisorImage is the ref of the supervisor image this instance uses.
supervisorImage?: string;
}
10 changes: 8 additions & 2 deletions components/server/src/ide-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface RawIDEConfig {
ideImageRepo: string;
ideImageAliases?: { [index: string]: string };
desktopIdeImageAliases?: { [index: string]: string };
supervisorImage: string;
}
const scheme = {
"type": "object",
Expand All @@ -36,10 +37,14 @@ const scheme = {
"type": "object",
"additionalProperties": { "type": "string" }
},
"supervisorImage": {
"type": "string"
},
},
"required": [
"ideVersion",
"ideImageRepo"
"ideImageRepo",
"supervisorImage",
]
};

Expand All @@ -49,6 +54,7 @@ export interface IDEConfig {
ideImageAliases: { [index: string]: string };
desktopIdeImageAliases: { [index: string]: string };
ideImage: string;
supervisorImage: string;
}

@injectable()
Expand Down Expand Up @@ -120,7 +126,7 @@ export class IDEConfigService {
},
desktopIdeImageAliases: {
...raw.desktopIdeImageAliases
}
},
}
}

Expand Down
2 changes: 2 additions & 0 deletions components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ export class WorkspaceStarter {
const configuration: WorkspaceInstanceConfiguration = {
theiaVersion: ideConfig.ideVersion,
ideImage: ideConfig.ideImage,
supervisorImage: ideConfig.supervisorImage,
};

const ideChoice = user.additionalData?.ideSettings?.defaultIde;
Expand Down Expand Up @@ -745,6 +746,7 @@ export class WorkspaceStarter {
const startWorkspaceSpecIDEImage = new IDEImage();
startWorkspaceSpecIDEImage.setWebRef(ideImage);
startWorkspaceSpecIDEImage.setDesktopRef(instance.configuration?.desktopIdeImage || "");
startWorkspaceSpecIDEImage.setSupervisorRef(instance.configuration?.supervisorImage || "");
spec.setIdeImage(startWorkspaceSpecIDEImage);
spec.setDeprecatedIdeImage(ideImage);
spec.setWorkspaceImage(instance.workspaceImage);
Expand Down