From a56f7388a0e598ccb000039081e367ee5ab85415 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 10:31:11 +0100 Subject: [PATCH 01/12] Migrate test3 to AppDefinition v1beta11 sidecars on clean main-based branch --- .../templates/appdefinition.yaml | 31 +++++++++++++++-- .../values.yaml | 33 ++++++++++++++----- 2 files changed, 54 insertions(+), 10 deletions(-) diff --git a/charts/theia-appdefinitions/templates/appdefinition.yaml b/charts/theia-appdefinitions/templates/appdefinition.yaml index 2225114..560b8f3 100644 --- a/charts/theia-appdefinitions/templates/appdefinition.yaml +++ b/charts/theia-appdefinitions/templates/appdefinition.yaml @@ -1,5 +1,5 @@ {{- range .Values.apps }} -{{- $existingApp := lookup "theia.cloud/v1beta10" "AppDefinition" $.Release.Namespace .name }} +{{- $existingApp := lookup "theia.cloud/v1beta11" "AppDefinition" $.Release.Namespace .name }} {{- $existingSpec := dict }} {{- if $existingApp }} {{- $existingSpec = get $existingApp "spec" | default dict }} @@ -14,7 +14,7 @@ {{- $maxInstances = get $existingSpec "maxInstances" }} {{- end }} --- -apiVersion: theia.cloud/v1beta10 +apiVersion: theia.cloud/v1beta11 kind: AppDefinition metadata: name: {{ .name }} @@ -54,4 +54,31 @@ spec: options: {{- toYaml .options | nindent 4 }} {{- end }} + {{- if .sidecars }} + sidecars: + {{- range .sidecars }} + - name: {{ .name }} + image: {{ .image }} + port: {{ .port | default 5000 }} + {{- if .languages }} + languages: + {{- range .languages }} + - {{ . }} + {{- end }} + {{- end }} + {{- if .cpuLimit }} + cpuLimit: {{ .cpuLimit }} + {{- end }} + {{- if .memoryLimit }} + memoryLimit: {{ .memoryLimit }} + {{- end }} + {{- if .cpuRequest }} + cpuRequest: {{ .cpuRequest }} + {{- end }} + {{- if .memoryRequest }} + memoryRequest: {{ .memoryRequest }} + {{- end }} + mountWorkspace: {{ .mountWorkspace | default true }} + {{- end }} + {{- end }} {{- end }} diff --git a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml index 4afaaca..3bd4fec 100644 --- a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml +++ b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml @@ -105,10 +105,12 @@ theia-cloud: label: Python rust-latest: label: Rust - java-ls-test: - label: Java LS Test + java-17-no-ls: + label: Java 17 No-LS (Sidecar) + rust-no-ls: + label: Rust No-LS (Sidecar) infoTitle: "🚀 Welcome to Test3 IDE Environment" - infoText: "This is a testing environment for Theia Cloud. Select your programming language and start coding in seconds!" + infoText: "Test environment for Theia with external language server architecture (PR #70). The IDE runs separately from the language server for improved performance and modularity." loadingText: "⚡ Setting up your development workspace..." footerLinks: attribution: @@ -139,11 +141,26 @@ theia-cloud: theia-appdefinitions: apps: - - name: java-ls-test - image: ghcr.io/eduide/eduide/theia-no-ls - imageTag: pr-46 - options: - langserver-image: ghcr.io/eduide/eduide/langserver-java:pr-46 + - name: java-17-no-ls + image: ghcr.io/ls1intum/theia/java-17-no-ls + imageTag: latest + minInstances: 1 + sidecars: + - name: langserver + image: ghcr.io/ls1intum/theia/langserver-java:latest + port: 5000 + languages: [java] + mountWorkspace: true + - name: rust-no-ls + image: ghcr.io/ls1intum/theia/rust-no-ls + imageTag: latest + minInstances: 1 + sidecars: + - name: langserver + image: ghcr.io/ls1intum/theia/langserver-rust:latest + port: 5000 + languages: [rust] + mountWorkspace: true monitoring: targetNamespaces: From ddd6a0e4dd352785b4b3367488809b33008a4473 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 11:01:58 +0100 Subject: [PATCH 02/12] ci: bump theia-cloud-crds base version to 1.2.0-next.1 Aligns with EduIDE-Helm PR #11 which adds v1beta11 support. With helm_chart_tag=pr-11, CI will now resolve theia-cloud-crds:1.2.0-next.1.pr-11 from GHCR. --- .github/workflows/deploy-theia.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-theia.yml b/.github/workflows/deploy-theia.yml index 6c2f5d9..a038f88 100644 --- a/.github/workflows/deploy-theia.yml +++ b/.github/workflows/deploy-theia.yml @@ -162,7 +162,7 @@ jobs: set -euo pipefail THEIA_CLOUD_BASE_VERSION="1.4.0-next.0" - THEIA_CLOUD_CRDS_VERSION="1.2.0-next.0" + THEIA_CLOUD_CRDS_VERSION="1.2.0-next.1" if [ -n "${{ inputs.helm_chart_tag }}" ]; then normalize_preview_version() { From 36e2400ede79e693869fc5b8e2154a1dfc01baaf Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 11:06:58 +0100 Subject: [PATCH 03/12] ci(test3): override conversion-webhook image to PR build Points theia-cloud-crds at the eduide-fork conversion-webhook image (conversion-webhook:pr-70) which includes the v1beta11 AppDefinition mapper required for the sidecar redesign. --- .../theia-crds-helm-values.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml b/deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml index 2dbe04f..5668dbe 100644 --- a/deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml +++ b/deployments/test3.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml @@ -1,2 +1,4 @@ -# -- The cluster issuer to use for the certificate clusterIssuer: theia-cloud-selfsigned-issuer + +conversion: + image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70 From 20d3c61b06889145b9be106f8931bd49f2c50000 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 11:41:23 +0100 Subject: [PATCH 04/12] chore(test3): remove stale pr-46 preloading images theia-no-ls:pr-46 and langserver-java:pr-46 no longer exist in the registry. The no-ls AppDefinitions reference images from ls1intum/theia directly, so these preloading entries served no purpose. --- deployments/test3.theia-test.artemis.cit.tum.de/values.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml index 3bd4fec..4061442 100644 --- a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml +++ b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml @@ -69,8 +69,6 @@ theia-cloud: - ghcr.io/eduide/eduide/ocaml:latest - ghcr.io/eduide/eduide/rust:latest - ghcr.io/eduide/eduide/python:latest - - ghcr.io/eduide/eduide/theia-no-ls:pr-46 - - ghcr.io/eduide/eduide/langserver-java:pr-46 imagePullPolicy: Always From d316777982cdd01466e0c2eb5dea1b620827be4a Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 11:54:00 +0100 Subject: [PATCH 05/12] fix: correct garbage-collector image path to ghcr.io/eduide/garbage-collector --- charts/theia-cloud-combined/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/theia-cloud-combined/values.yaml b/charts/theia-cloud-combined/values.yaml index 2210712..cc92b94 100644 --- a/charts/theia-cloud-combined/values.yaml +++ b/charts/theia-cloud-combined/values.yaml @@ -153,7 +153,7 @@ theia-appdefinitions: theia-workspace-garbage-collector: replicaCount: 1 image: - repository: ghcr.io/eduide/eduide/garbage-collector + repository: ghcr.io/eduide/garbage-collector tag: latest pullPolicy: Always From 6e19887a886dfe075609d22da9aabdb3bcc53cd0 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 14:29:20 +0100 Subject: [PATCH 06/12] fix(test3): align sidecar appdefinitions with reviewer findings - preserve explicit mountWorkspace=false in Helm template (avoid default overriding false) - support sidecar imageTag/defaultImageTag fallback when sidecar image has no explicit tag - set landing default app to a defined sidecar app and remove stale additionalApps entries - remove hardcoded latest tags in sidecar appdefs to honor defaultImageTag overrides - preload no-ls IDE + sidecar langserver images used by test3 --- .../templates/appdefinition.yaml | 13 ++++++++-- .../values.yaml | 24 ++++++------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/charts/theia-appdefinitions/templates/appdefinition.yaml b/charts/theia-appdefinitions/templates/appdefinition.yaml index 560b8f3..e4ca501 100644 --- a/charts/theia-appdefinitions/templates/appdefinition.yaml +++ b/charts/theia-appdefinitions/templates/appdefinition.yaml @@ -58,7 +58,12 @@ spec: sidecars: {{- range .sidecars }} - name: {{ .name }} - image: {{ .image }} + {{- $sidecarImage := .image }} + {{- if or (contains "@sha256:" $sidecarImage) (regexMatch ".*:[^/]+$" $sidecarImage) }} + image: {{ $sidecarImage }} + {{- else }} + image: {{ $sidecarImage }}:{{ .imageTag | default $.Values.defaultImageTag | default "latest" }} + {{- end }} port: {{ .port | default 5000 }} {{- if .languages }} languages: @@ -78,7 +83,11 @@ spec: {{- if .memoryRequest }} memoryRequest: {{ .memoryRequest }} {{- end }} - mountWorkspace: {{ .mountWorkspace | default true }} + {{- if hasKey . "mountWorkspace" }} + mountWorkspace: {{ .mountWorkspace }} + {{- else }} + mountWorkspace: true + {{- end }} {{- end }} {{- end }} {{- end }} diff --git a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml index c6f8c89..fb98374 100644 --- a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml +++ b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml @@ -69,6 +69,10 @@ theia-cloud: - ghcr.io/eduide/eduide/ocaml:latest - ghcr.io/eduide/eduide/rust:latest - ghcr.io/eduide/eduide/python:latest + - ghcr.io/ls1intum/theia/java-17-no-ls:latest + - ghcr.io/ls1intum/theia/rust-no-ls:latest + - ghcr.io/ls1intum/theia/langserver-java:latest + - ghcr.io/ls1intum/theia/langserver-rust:latest imagePullPolicy: Always @@ -88,21 +92,9 @@ theia-cloud: # 2. (Optional) If you removed the 'hardcoded png' logic in the template, # you might need this. If you used my simplified template, this is ignored. logoFileExtension: "png" - appDefinition: "java-17-latest" + appDefinition: "java-17-no-ls" ephemeralStorage: true additionalApps: - java-17-latest: - label: Java 17 - c-latest: - label: C - javascript-latest: - label: Javascript - ocaml-latest: - label: Ocaml - python-latest: - label: Python - rust-latest: - label: Rust java-17-no-ls: label: Java 17 No-LS (Sidecar) rust-no-ls: @@ -141,21 +133,19 @@ theia-appdefinitions: apps: - name: java-17-no-ls image: ghcr.io/ls1intum/theia/java-17-no-ls - imageTag: latest minInstances: 1 sidecars: - name: langserver - image: ghcr.io/ls1intum/theia/langserver-java:latest + image: ghcr.io/ls1intum/theia/langserver-java port: 5000 languages: [java] mountWorkspace: true - name: rust-no-ls image: ghcr.io/ls1intum/theia/rust-no-ls - imageTag: latest minInstances: 1 sidecars: - name: langserver - image: ghcr.io/ls1intum/theia/langserver-rust:latest + image: ghcr.io/ls1intum/theia/langserver-rust port: 5000 languages: [rust] mountWorkspace: true From 6665fb5b6387c535fb5bdd5e60af7c2939b489fd Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 15:06:34 +0100 Subject: [PATCH 07/12] fix(test3): switch no-ls and langserver images to eduide registry - replace ls1intum/theia image references with ghcr.io/eduide/eduide for no-ls IDE and sidecar images - align test3 appdefinitions and preloading with PR-tagged image pipeline --- .../values.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml index fb98374..c8559c1 100644 --- a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml +++ b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml @@ -69,10 +69,10 @@ theia-cloud: - ghcr.io/eduide/eduide/ocaml:latest - ghcr.io/eduide/eduide/rust:latest - ghcr.io/eduide/eduide/python:latest - - ghcr.io/ls1intum/theia/java-17-no-ls:latest - - ghcr.io/ls1intum/theia/rust-no-ls:latest - - ghcr.io/ls1intum/theia/langserver-java:latest - - ghcr.io/ls1intum/theia/langserver-rust:latest + - ghcr.io/eduide/eduide/java-17-no-ls:latest + - ghcr.io/eduide/eduide/rust-no-ls:latest + - ghcr.io/eduide/eduide/langserver-java:latest + - ghcr.io/eduide/eduide/langserver-rust:latest imagePullPolicy: Always @@ -132,20 +132,20 @@ theia-cloud: theia-appdefinitions: apps: - name: java-17-no-ls - image: ghcr.io/ls1intum/theia/java-17-no-ls + image: ghcr.io/eduide/eduide/java-17-no-ls minInstances: 1 sidecars: - name: langserver - image: ghcr.io/ls1intum/theia/langserver-java + image: ghcr.io/eduide/eduide/langserver-java port: 5000 languages: [java] mountWorkspace: true - name: rust-no-ls - image: ghcr.io/ls1intum/theia/rust-no-ls + image: ghcr.io/eduide/eduide/rust-no-ls minInstances: 1 sidecars: - name: langserver - image: ghcr.io/ls1intum/theia/langserver-rust + image: ghcr.io/eduide/eduide/langserver-rust port: 5000 languages: [rust] mountWorkspace: true From 606c591245645a6d801182eeffd818fd00716fee Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Mon, 16 Mar 2026 15:15:54 +0100 Subject: [PATCH 08/12] ci(deploy): tag no-ls and sidecar preloading images with ide_images_tag - add explicit workflow overrides for preloading image indices 7..10 - ensure java-17-no-ls/rust-no-ls and langserver-java/langserver-rust track IDE tag input --- .github/workflows/deploy-theia.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy-theia.yml b/.github/workflows/deploy-theia.yml index a038f88..1fa35b7 100644 --- a/.github/workflows/deploy-theia.yml +++ b/.github/workflows/deploy-theia.yml @@ -251,4 +251,8 @@ jobs: --set "theia-cloud.preloading.images[4]=ghcr.io/eduide/eduide/ocaml:${IDE_IMAGES_TAG}" \ --set "theia-cloud.preloading.images[5]=ghcr.io/eduide/eduide/rust:${IDE_IMAGES_TAG}" \ --set "theia-cloud.preloading.images[6]=ghcr.io/eduide/eduide/python:${IDE_IMAGES_TAG}" \ + --set "theia-cloud.preloading.images[7]=ghcr.io/eduide/eduide/java-17-no-ls:${IDE_IMAGES_TAG}" \ + --set "theia-cloud.preloading.images[8]=ghcr.io/eduide/eduide/rust-no-ls:${IDE_IMAGES_TAG}" \ + --set "theia-cloud.preloading.images[9]=ghcr.io/eduide/eduide/langserver-java:${IDE_IMAGES_TAG}" \ + --set "theia-cloud.preloading.images[10]=ghcr.io/eduide/eduide/langserver-rust:${IDE_IMAGES_TAG}" \ --set theia-appdefinitions.defaultImageTag="${IDE_IMAGES_TAG}" From 6244c3857c5823d3ea8f64977054d7aa5f867c81 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Tue, 17 Mar 2026 07:11:21 +0100 Subject: [PATCH 09/12] add conversion images --- .../theia-crds-helm-values.yml | 3 +++ .../theia-crds-helm-values.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml b/deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml index 2dbe04f..3a28892 100644 --- a/deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml +++ b/deployments/test1.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml @@ -1,2 +1,5 @@ # -- The cluster issuer to use for the certificate clusterIssuer: theia-cloud-selfsigned-issuer + +conversion: + image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70 diff --git a/deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml b/deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml index 2dbe04f..3a28892 100644 --- a/deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml +++ b/deployments/test2.theia-test.artemis.cit.tum.de/theia-crds-helm-values.yml @@ -1,2 +1,5 @@ # -- The cluster issuer to use for the certificate clusterIssuer: theia-cloud-selfsigned-issuer + +conversion: + image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70 From 5d1f00c472288edd3e99e5db6f444ec89afa6839 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Tue, 17 Mar 2026 07:26:43 +0100 Subject: [PATCH 10/12] conversion webhook --- .../theia-crds-helm-values.yml | 3 +++ .../theia.artemis.cit.tum.de/theia-crds-helm-values.yml | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml b/deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml index 2dbe04f..3a28892 100644 --- a/deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml +++ b/deployments/theia-staging.artemis.cit.tum.de/theia-crds-helm-values.yml @@ -1,2 +1,5 @@ # -- The cluster issuer to use for the certificate clusterIssuer: theia-cloud-selfsigned-issuer + +conversion: + image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70 diff --git a/deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml b/deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml index a075626..3a28892 100644 --- a/deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml +++ b/deployments/theia.artemis.cit.tum.de/theia-crds-helm-values.yml @@ -1,2 +1,5 @@ # -- The cluster issuer to use for the certificate -clusterIssuer: theia-cloud-selfsigned-issuer \ No newline at end of file +clusterIssuer: theia-cloud-selfsigned-issuer + +conversion: + image: ghcr.io/eduide/eduide-cloud/conversion-webhook:pr-70 From 47b5b91eb2344534c05e0b204400d9f5055f504f Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Tue, 17 Mar 2026 07:49:45 +0100 Subject: [PATCH 11/12] fix(test3): switch operator storageClassName to longhorn for RWX support --- deployments/test3.theia-test.artemis.cit.tum.de/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml index c8559c1..a13716c 100644 --- a/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml +++ b/deployments/test3.theia-test.artemis.cit.tum.de/values.yaml @@ -47,7 +47,7 @@ theia-cloud: #eagerStart: false replicas: 1 sessionsPerUser: 10 - storageClassName: csi-rbd-sc + storageClassName: longhorn resources: requests: ephemeral-storage: "128Mi" From 57c6981dd949885b1e01065d9034e7d5822abd65 Mon Sep 17 00:00:00 2001 From: CodeByNikolas Date: Tue, 17 Mar 2026 08:19:02 +0100 Subject: [PATCH 12/12] fix(ci): empty tag inputs no longer override values.yaml image settings - Change theia_cloud_tag and ide_images_tag defaults from 'latest' to '' - Update input descriptions to clarify empty means no override - deploy-pr.yml: forward empty tags as-is (remove || 'latest' fallback) - deploy-theia.yml: apply --set image overrides only when tag is non-empty, otherwise leave values.yaml settings untouched; add set -euo pipefail --- .github/workflows/deploy-pr.yml | 20 ++++---- .github/workflows/deploy-theia.yml | 73 ++++++++++++++++++------------ 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/.github/workflows/deploy-pr.yml b/.github/workflows/deploy-pr.yml index 07de104..3b5f325 100644 --- a/.github/workflows/deploy-pr.yml +++ b/.github/workflows/deploy-pr.yml @@ -24,13 +24,13 @@ on: - test2 - test3 theia_cloud_tag: - description: 'Theia Cloud components tag (operator, service, landing-page)' + description: 'Theia Cloud components tag (operator, service, landing-page). Leave empty to use the tag defined in values.yaml (no override).' required: false - default: 'latest' + default: '' ide_images_tag: - description: 'IDE images tag (appdefinitions and preloading)' + description: 'IDE images tag (appdefinitions and preloading). Leave empty to use the tag defined in values.yaml (no override).' required: false - default: 'latest' + default: '' helm_chart_tag: description: 'Preview OCI tag from theia-cloud-helm to use (for example pr-123)' required: false @@ -47,8 +47,8 @@ jobs: uses: ./.github/workflows/deploy-theia.yml with: environment: test1 - theia_cloud_tag: ${{ inputs.theia_cloud_tag || 'latest' }} - ide_images_tag: ${{ inputs.ide_images_tag || 'latest' }} + theia_cloud_tag: ${{ inputs.theia_cloud_tag }} + ide_images_tag: ${{ inputs.ide_images_tag }} helm_chart_tag: ${{ inputs.helm_chart_tag || '' }} deploy_shared_gateway: false shared_gateway_values_file: deployments/shared-gateway/values.yaml @@ -65,8 +65,8 @@ jobs: uses: ./.github/workflows/deploy-theia.yml with: environment: test2 - theia_cloud_tag: ${{ inputs.theia_cloud_tag || 'latest' }} - ide_images_tag: ${{ inputs.ide_images_tag || 'latest' }} + theia_cloud_tag: ${{ inputs.theia_cloud_tag }} + ide_images_tag: ${{ inputs.ide_images_tag }} helm_chart_tag: ${{ inputs.helm_chart_tag || '' }} deploy_shared_gateway: false shared_gateway_values_file: deployments/shared-gateway/values.yaml @@ -83,8 +83,8 @@ jobs: uses: ./.github/workflows/deploy-theia.yml with: environment: test3 - theia_cloud_tag: ${{ inputs.theia_cloud_tag || 'latest' }} - ide_images_tag: ${{ inputs.ide_images_tag || 'latest' }} + theia_cloud_tag: ${{ inputs.theia_cloud_tag }} + ide_images_tag: ${{ inputs.ide_images_tag }} helm_chart_tag: ${{ inputs.helm_chart_tag || '' }} deploy_shared_gateway: false shared_gateway_values_file: deployments/shared-gateway/values.yaml diff --git a/.github/workflows/deploy-theia.yml b/.github/workflows/deploy-theia.yml index 1fa35b7..35153f9 100644 --- a/.github/workflows/deploy-theia.yml +++ b/.github/workflows/deploy-theia.yml @@ -46,15 +46,15 @@ on: required: true type: string theia_cloud_tag: - description: "Image tag for Theia Cloud components (operator, service, landing-page)" + description: "Image tag for Theia Cloud components (operator, service, landing-page). Leave empty to use the tag defined in values.yaml (no override)." required: false type: string - default: "latest" + default: "" ide_images_tag: - description: "Image tag for IDE images (appdefinitions and preloading)" + description: "Image tag for IDE images (appdefinitions and preloading). Leave empty to use the tag defined in values.yaml (no override)." required: false type: string - default: "latest" + default: "" helm_chart_tag: description: "Published OCI preview tag to use for upstream helm charts (e.g. pr-123)" required: false @@ -219,6 +219,8 @@ jobs: env: KUBECONFIG: ${{ github.workspace }}/kubeconfig run: | + set -euo pipefail + # Prepare SSL certificates for ingress # Note: Secrets are already base64 encoded, but we need to write them to files echo "${{ secrets.THEIA_WILDCARD_CERTIFICATE_CERT }}" | base64 -w 0 > wildcard.crt @@ -229,30 +231,45 @@ jobs: THEIA_CLOUD_TAG="${{ inputs.theia_cloud_tag }}" IDE_IMAGES_TAG="${{ inputs.ide_images_tag }}" + # Build base helm command with always-present flags + HELM_CMD=(helm upgrade --install theia-cloud-combined ./charts/theia-cloud-combined + --namespace ${{ vars.NAMESPACE }} + --create-namespace + -f ${{ vars.HELM_VALUES_PATH }}/values.yaml + --set-string theia-certificates.adminApiToken="${ADMIN_API_TOKEN_B64}" + --set theia-certificates.wildcardCertificate="$(cat wildcard.crt)" + --set theia-certificates.wildcardKey="$(cat wildcard.key)" + --set theia-cloud.keycloak.cookieSecret="${{ secrets.THEIA_KEYCLOAK_COOKIE_SECRET }}") + + # Only override Theia Cloud component images when a tag is explicitly provided + if [ -n "${THEIA_CLOUD_TAG}" ]; then + HELM_CMD+=( + --set theia-cloud.landingPage.image="ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}" + --set theia-cloud.operator.image="ghcr.io/eduide/eduide-cloud/operator:${THEIA_CLOUD_TAG}" + --set theia-cloud.service.image="ghcr.io/eduide/eduide-cloud/service:${THEIA_CLOUD_TAG}" + --set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}" + ) + fi + + # Only override IDE images when a tag is explicitly provided + if [ -n "${IDE_IMAGES_TAG}" ]; then + HELM_CMD+=( + --set "theia-cloud.preloading.images[1]=ghcr.io/eduide/eduide/java-17:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[2]=ghcr.io/eduide/eduide/c:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[3]=ghcr.io/eduide/eduide/javascript:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[4]=ghcr.io/eduide/eduide/ocaml:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[5]=ghcr.io/eduide/eduide/rust:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[6]=ghcr.io/eduide/eduide/python:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[7]=ghcr.io/eduide/eduide/java-17-no-ls:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[8]=ghcr.io/eduide/eduide/rust-no-ls:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[9]=ghcr.io/eduide/eduide/langserver-java:${IDE_IMAGES_TAG}" + --set "theia-cloud.preloading.images[10]=ghcr.io/eduide/eduide/langserver-rust:${IDE_IMAGES_TAG}" + --set theia-appdefinitions.defaultImageTag="${IDE_IMAGES_TAG}" + ) + fi + # Install/upgrade the Helm chart with all configuration # --install: Create if it doesn't exist, upgrade if it does # --create-namespace: Create the namespace if it doesn't exist - # Image tags controlled by two variables: THEIA_CLOUD_TAG and IDE_IMAGES_TAG - helm upgrade --install theia-cloud-combined ./charts/theia-cloud-combined \ - --namespace ${{ vars.NAMESPACE }} \ - --create-namespace \ - -f ${{ vars.HELM_VALUES_PATH }}/values.yaml \ - --set-string theia-certificates.adminApiToken="${ADMIN_API_TOKEN_B64}" \ - --set theia-certificates.wildcardCertificate="$(cat wildcard.crt)" \ - --set theia-certificates.wildcardKey="$(cat wildcard.key)" \ - --set theia-cloud.keycloak.cookieSecret="${{ secrets.THEIA_KEYCLOAK_COOKIE_SECRET }}" \ - --set theia-cloud.landingPage.image="ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}" \ - --set theia-cloud.operator.image="ghcr.io/eduide/eduide-cloud/operator:${THEIA_CLOUD_TAG}" \ - --set theia-cloud.service.image="ghcr.io/eduide/eduide-cloud/service:${THEIA_CLOUD_TAG}" \ - --set "theia-cloud.preloading.images[0]=ghcr.io/eduide/eduide-cloud/landing-page:${THEIA_CLOUD_TAG}" \ - --set "theia-cloud.preloading.images[1]=ghcr.io/eduide/eduide/java-17:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[2]=ghcr.io/eduide/eduide/c:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[3]=ghcr.io/eduide/eduide/javascript:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[4]=ghcr.io/eduide/eduide/ocaml:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[5]=ghcr.io/eduide/eduide/rust:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[6]=ghcr.io/eduide/eduide/python:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[7]=ghcr.io/eduide/eduide/java-17-no-ls:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[8]=ghcr.io/eduide/eduide/rust-no-ls:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[9]=ghcr.io/eduide/eduide/langserver-java:${IDE_IMAGES_TAG}" \ - --set "theia-cloud.preloading.images[10]=ghcr.io/eduide/eduide/langserver-rust:${IDE_IMAGES_TAG}" \ - --set theia-appdefinitions.defaultImageTag="${IDE_IMAGES_TAG}" + # Image tag overrides are applied only when non-empty; otherwise values.yaml settings are preserved + "${HELM_CMD[@]}"