From 1392456cab248a34367bbf5df7d4bf1223190487 Mon Sep 17 00:00:00 2001 From: Andrew Obuchowicz Date: Wed, 5 Jul 2023 10:49:52 -0400 Subject: [PATCH] chore: remove mentions of Theia in test data Fix #1028 Signed-off-by: Andrew Obuchowicz --- ...se.yaml => generic-ide-merge-usecase.yaml} | 100 ++++++------- ...se.yaml => generic-ide-merge-usecase.yaml} | 100 ++++++------- ...se.yaml => generic-ide-merge-usecase.yaml} | 100 ++++++------- .../testdata/k8s-ref/nodejs-workspace.yaml | 138 +++++++----------- ...se.yaml => generic-ide-merge-usecase.yaml} | 100 ++++++------- .../spec-contributions/nodejs-workspace.yaml | 138 +++++++----------- .../testdata/postStart/no_postStart.yaml | 2 +- 7 files changed, 313 insertions(+), 365 deletions(-) rename pkg/library/flatten/testdata/container-contributions/{theia-merge-usecase.yaml => generic-ide-merge-usecase.yaml} (83%) rename pkg/library/flatten/testdata/implicit-container-contributions/{theia-merge-usecase.yaml => generic-ide-merge-usecase.yaml} (83%) rename pkg/library/flatten/testdata/implicit-spec-contributions/{theia-merge-usecase.yaml => generic-ide-merge-usecase.yaml} (83%) rename pkg/library/flatten/testdata/spec-contributions/{theia-merge-usecase.yaml => generic-ide-merge-usecase.yaml} (82%) diff --git a/pkg/library/flatten/testdata/container-contributions/theia-merge-usecase.yaml b/pkg/library/flatten/testdata/container-contributions/generic-ide-merge-usecase.yaml similarity index 83% rename from pkg/library/flatten/testdata/container-contributions/theia-merge-usecase.yaml rename to pkg/library/flatten/testdata/container-contributions/generic-ide-merge-usecase.yaml index e64282c52..2bc86d804 100644 --- a/pkg/library/flatten/testdata/container-contributions/theia-merge-usecase.yaml +++ b/pkg/library/flatten/testdata/container-contributions/generic-ide-merge-usecase.yaml @@ -1,4 +1,4 @@ -name: "Merges Theia IDE contribution" +name: "Merges generic IDE contribution" input: devworkspace: @@ -18,15 +18,15 @@ input: targetPort: 8080 memoryLimit: 2Gi mountSources: true - - name: theia-ide + - name: generic-ide plugin: - uri: theia-ide.yaml + uri: generic-ide.yaml devfileResources: - theia-ide.yaml: + generic-ide.yaml: schemaVersion: 2.1.0 metadata: - name: theia-ide + name: generic-ide commands: - id: init-container-command apply: @@ -35,7 +35,7 @@ input: preStart: - init-container-command components: - - name: theia-ide-contributions + - name: generic-ide-contributions attributes: controller.devfile.io/container-contribution: true container: @@ -46,7 +46,7 @@ input: env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools memoryLimit: 512Mi volumeMounts: @@ -55,29 +55,29 @@ input: - name: remote-endpoint path: /remote-endpoint image: quay.io/devfile/universal-developer-image@sha256:53cec58dd190dd1e06100478ae879d7c28abd8fc883d5fdf5be3eb6e943fe5e7 - - name: theia-ide + - name: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: ide-local + path: /home/ide/.ide mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: ide attributes: type: main cookiesAuthEnabled: true @@ -109,7 +109,7 @@ input: exposure: public secure: false protocol: https - - name: theia-dev + - name: ide-dev attributes: type: ide-dev discoverable: false @@ -117,21 +117,21 @@ input: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: ide-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: ide-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: ide-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -149,11 +149,11 @@ input: secure: false protocol: wss attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: plugins volume: {} - - name: theia-local + - name: ide-local volume: {} - name: che-machine-exec container: @@ -170,10 +170,10 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-runtime-injector container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -190,7 +190,7 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-endpoint volume: ephemeral: true @@ -201,7 +201,7 @@ output: components: - name: tools attributes: - controller.devfile.io/merged-contributions: "theia-ide" + controller.devfile.io/merged-contributions: "generic-ide" container: image: quay.io/devfile/universal-developer-image:latest env: @@ -211,7 +211,7 @@ output: value: /tmp/.cache - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools args: - sh @@ -227,33 +227,33 @@ output: path: /remote-endpoint memoryLimit: 2560Mi # 2Gi = 2048Mi + 512Mi mountSources: true - - name: theia-ide + - name: generic-ide attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: ide-local + path: /home/ide/.ide mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: ide attributes: type: main cookiesAuthEnabled: true @@ -285,7 +285,7 @@ output: exposure: public secure: false protocol: https - - name: theia-dev + - name: ide-dev attributes: type: ide-dev discoverable: false @@ -293,21 +293,21 @@ output: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: ide-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: ide-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: ide-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -326,17 +326,17 @@ output: protocol: wss - name: plugins attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - - name: theia-local + - name: ide-local attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - name: che-machine-exec attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: image: quay.io/eclipse/che-machine-exec:next command: @@ -351,11 +351,11 @@ output: cpuRequest: 30m - name: remote-runtime-injector attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -372,13 +372,13 @@ output: cpuRequest: 30m - name: remote-endpoint attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: ephemeral: true commands: - id: init-container-command attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide apply: component: remote-runtime-injector events: diff --git a/pkg/library/flatten/testdata/implicit-container-contributions/theia-merge-usecase.yaml b/pkg/library/flatten/testdata/implicit-container-contributions/generic-ide-merge-usecase.yaml similarity index 83% rename from pkg/library/flatten/testdata/implicit-container-contributions/theia-merge-usecase.yaml rename to pkg/library/flatten/testdata/implicit-container-contributions/generic-ide-merge-usecase.yaml index 15aa880bb..82030fa53 100644 --- a/pkg/library/flatten/testdata/implicit-container-contributions/theia-merge-usecase.yaml +++ b/pkg/library/flatten/testdata/implicit-container-contributions/generic-ide-merge-usecase.yaml @@ -1,4 +1,4 @@ -name: "Merges Theia IDE contribution" +name: "Merges generic IDE contribution" input: devworkspace: @@ -16,15 +16,15 @@ input: targetPort: 8080 memoryLimit: 2Gi mountSources: true - - name: theia-ide + - name: generic-ide plugin: - uri: theia-ide.yaml + uri: generic-ide.yaml devfileResources: - theia-ide.yaml: + generic-ide.yaml: schemaVersion: 2.1.0 metadata: - name: theia-ide + name: generic-ide commands: - id: init-container-command apply: @@ -33,7 +33,7 @@ input: preStart: - init-container-command components: - - name: theia-ide-contributions + - name: generic-ide-contributions attributes: controller.devfile.io/container-contribution: true container: @@ -44,7 +44,7 @@ input: env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools memoryLimit: 512Mi volumeMounts: @@ -53,29 +53,29 @@ input: - name: remote-endpoint path: /remote-endpoint image: quay.io/devfile/universal-developer-image@sha256:53cec58dd190dd1e06100478ae879d7c28abd8fc883d5fdf5be3eb6e943fe5e7 - - name: theia-ide + - name: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: ide-local + path: /home/ide/.ide mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: ide attributes: type: main cookiesAuthEnabled: true @@ -107,7 +107,7 @@ input: exposure: public secure: false protocol: https - - name: theia-dev + - name: ide-dev attributes: type: ide-dev discoverable: false @@ -115,21 +115,21 @@ input: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: ide-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: ide-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: ide-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -147,11 +147,11 @@ input: secure: false protocol: wss attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: plugins volume: {} - - name: theia-local + - name: ide-local volume: {} - name: che-machine-exec container: @@ -168,10 +168,10 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-runtime-injector container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -188,7 +188,7 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-endpoint volume: ephemeral: true @@ -199,7 +199,7 @@ output: components: - name: tools attributes: - controller.devfile.io/merged-contributions: "theia-ide" + controller.devfile.io/merged-contributions: "generic-ide" container: image: quay.io/devfile/universal-developer-image:latest env: @@ -209,7 +209,7 @@ output: value: /tmp/.cache - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools args: - sh @@ -225,33 +225,33 @@ output: path: /remote-endpoint memoryLimit: 2560Mi # 2Gi = 2048Mi + 512Mi mountSources: true - - name: theia-ide + - name: generic-ide attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: ide-local + path: /home/ide/.ide mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: ide attributes: type: main cookiesAuthEnabled: true @@ -283,7 +283,7 @@ output: exposure: public secure: false protocol: https - - name: theia-dev + - name: ide-dev attributes: type: ide-dev discoverable: false @@ -291,21 +291,21 @@ output: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: ide-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: ide-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: ide-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -324,17 +324,17 @@ output: protocol: wss - name: plugins attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - - name: theia-local + - name: ide-local attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - name: che-machine-exec attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: image: quay.io/eclipse/che-machine-exec:next command: @@ -349,11 +349,11 @@ output: cpuRequest: 30m - name: remote-runtime-injector attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -370,13 +370,13 @@ output: cpuRequest: 30m - name: remote-endpoint attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: ephemeral: true commands: - id: init-container-command attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide apply: component: remote-runtime-injector events: diff --git a/pkg/library/flatten/testdata/implicit-spec-contributions/theia-merge-usecase.yaml b/pkg/library/flatten/testdata/implicit-spec-contributions/generic-ide-merge-usecase.yaml similarity index 83% rename from pkg/library/flatten/testdata/implicit-spec-contributions/theia-merge-usecase.yaml rename to pkg/library/flatten/testdata/implicit-spec-contributions/generic-ide-merge-usecase.yaml index 008cbb5f8..f2bde6714 100644 --- a/pkg/library/flatten/testdata/implicit-spec-contributions/theia-merge-usecase.yaml +++ b/pkg/library/flatten/testdata/implicit-spec-contributions/generic-ide-merge-usecase.yaml @@ -1,4 +1,4 @@ -name: "Merges Theia IDE contribution" +name: "Merges generic IDE contribution" input: devworkspace: @@ -17,14 +17,14 @@ input: memoryLimit: 2Gi mountSources: true contributions: - - name: theia-ide - uri: theia-ide.yaml + - name: generic-ide + uri: generic-ide.yaml devfileResources: - theia-ide.yaml: + generic-ide.yaml: schemaVersion: 2.1.0 metadata: - name: theia-ide + name: generic-ide commands: - id: init-container-command apply: @@ -33,7 +33,7 @@ input: preStart: - init-container-command components: - - name: theia-ide-contributions + - name: generic-ide-contributions attributes: controller.devfile.io/container-contribution: true container: @@ -44,7 +44,7 @@ input: env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools memoryLimit: 512Mi volumeMounts: @@ -53,29 +53,29 @@ input: - name: remote-endpoint path: /remote-endpoint image: quay.io/devfile/universal-developer-image@sha256:53cec58dd190dd1e06100478ae879d7c28abd8fc883d5fdf5be3eb6e943fe5e7 - - name: theia-ide + - name: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: ide-local + path: /home/ide/.ide mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: ide attributes: type: main cookiesAuthEnabled: true @@ -107,7 +107,7 @@ input: exposure: public secure: false protocol: https - - name: theia-dev + - name: ide-dev attributes: type: ide-dev discoverable: false @@ -115,21 +115,21 @@ input: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: ide-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: ide-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: ide-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -147,11 +147,11 @@ input: secure: false protocol: wss attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: plugins volume: {} - - name: theia-local + - name: ide-local volume: {} - name: che-machine-exec container: @@ -168,10 +168,10 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-runtime-injector container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -188,7 +188,7 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-endpoint volume: ephemeral: true @@ -199,7 +199,7 @@ output: components: - name: tools attributes: - controller.devfile.io/merged-contributions: "theia-ide" + controller.devfile.io/merged-contributions: "generic-ide" container: image: quay.io/devfile/universal-developer-image:latest env: @@ -209,7 +209,7 @@ output: value: /tmp/.cache - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools args: - sh @@ -225,33 +225,33 @@ output: path: /remote-endpoint memoryLimit: 2560Mi # 2Gi = 2048Mi + 512Mi mountSources: true - - name: theia-ide + - name: generic-ide attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: ide-local + path: /home/ide/.ide mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: ide attributes: type: main cookiesAuthEnabled: true @@ -283,7 +283,7 @@ output: exposure: public secure: false protocol: https - - name: theia-dev + - name: ide-dev attributes: type: ide-dev discoverable: false @@ -291,21 +291,21 @@ output: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: ide-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: ide-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: ide-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -324,17 +324,17 @@ output: protocol: wss - name: plugins attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - - name: theia-local + - name: ide-local attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - name: che-machine-exec attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: image: quay.io/eclipse/che-machine-exec:next command: @@ -349,11 +349,11 @@ output: cpuRequest: 30m - name: remote-runtime-injector attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -370,13 +370,13 @@ output: cpuRequest: 30m - name: remote-endpoint attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: ephemeral: true commands: - id: init-container-command attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide apply: component: remote-runtime-injector events: diff --git a/pkg/library/flatten/testdata/k8s-ref/nodejs-workspace.yaml b/pkg/library/flatten/testdata/k8s-ref/nodejs-workspace.yaml index 2fbc22ef1..8cb0888bd 100644 --- a/pkg/library/flatten/testdata/k8s-ref/nodejs-workspace.yaml +++ b/pkg/library/flatten/testdata/k8s-ref/nodejs-workspace.yaml @@ -1,4 +1,4 @@ -name: "Theia and NodeJS plugin workspace" +name: "Generic IDE and NodeJS plugin workspace" input: devworkspace: @@ -8,10 +8,10 @@ input: remotes: origin: "https://github.com/che-samples/web-nodejs-sample.git" components: - - name: che-theia + - name: generic-ide plugin: kubernetes: - name: theia-next + name: ide-next namespace: devworkspace-plugins - name: machine-exec plugin: @@ -77,11 +77,11 @@ input: ] } devworkspaceResources: - theia-next: + ide-next: kind: DevWorkspaceTemplate apiVersion: workspace.devfile.io/v1alpha2 metadata: - name: theia-next + name: ide-next annotations: "controller.devfile.io/allow-import-from": "*" spec: @@ -90,12 +90,9 @@ input: volume: {} - name: remote-endpoint volume: {} # TODO: Fix this once ephemeral volumes are supported - - name: vsx-installer # Mainly reads the container objects and searches for those - # with che-theia.eclipse.org/vscode-extensions attributes to get VSX urls - # Those found in the dedicated containers components are with a sidecar, - # Those found in the che-theia container are without a sidecar. + - name: vsx-installer attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper container: args: @@ -106,9 +103,9 @@ input: TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) &&\ WORKSPACE=$(curl -fsS --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer ${TOKEN}" $KUBE_API_ENDPOINT) &&\ IFS=$'\n' &&\ - for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"che-theia.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ - dest=$(echo "$container" | sed 's|.*{"name":"THEIA_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ - urls=$(echo "$container" | sed 's|.*"che-theia.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ + for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"generic-ide.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ + dest=$(echo "$container" | sed 's|.*{"name":"IDE_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ + urls=$(echo "$container" | sed 's|.*"generic-ide.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ mkdir -p $dest ;\ unset IFS &&\ for url in $(echo $urls | sed 's/[",]/ /g' - ); do \ @@ -121,10 +118,10 @@ input: name: plugins - name: remote-runtime-injector attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper container: #### corresponds to `initContainer` definition in old meta.yaml. - image: "quay.io/eclipse/che-theia-endpoint-runtime-binary:7.20.0" + image: "quay.io/eclipse/generic-ide-endpoint-runtime-binary:7.20.0" volumeMounts: - path: "/remote-endpoint" name: remote-endpoint @@ -133,26 +130,21 @@ input: value: /remote-endpoint/plugin-remote-endpoint - name: REMOTE_ENDPOINT_VOLUME_NAME value: remote-endpoint - - name: theia-ide + - name: ide-ide attributes: - "app.kubernetes.io/name": che-theia.eclipse.org + "app.kubernetes.io/name": generic-ide.eclipse.org "app.kubernetes.io/part-of": che.eclipse.org "app.kubernetes.io/component": editor - - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the vscode-pull-request-github vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://github.com/microsoft/vscode-pull-request-github/releases/download/v0.8.0/vscode-pull-request-github-0.8.0.vsix container: - image: "quay.io/eclipse/che-theia:next" + image: "quay.io/eclipse/generic-ide:next" env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: "3130" - - name: THEIA_HOST + - name: IDE_HOST value: 0.0.0.0 volumeMounts: - path: "/plugins" @@ -160,7 +152,7 @@ input: mountSources: true memoryLimit: "512M" endpoints: - - name: "theia" + - name: "ide" exposure: public targetPort: 3100 secure: true @@ -175,27 +167,27 @@ input: attributes: type: webview unique: "true" - - name: "theia-dev" + - name: "ide-dev" exposure: public targetPort: 3130 protocol: http attributes: type: ide-dev - - name: "theia-redir-1" + - name: "ide-redir-1" exposure: public targetPort: 13131 protocol: http - - name: "theia-redir-2" + - name: "ide-redir-2" exposure: public targetPort: 13132 protocol: http - - name: "theia-redir-3" + - name: "ide-redir-3" exposure: public targetPort: 13133 protocol: http commands: # Commands coming from plugin editor - - id: inject-theia-in-remote-sidecar + - id: inject-ide-in-remote-sidecar apply: component: remote-runtime-injector - id: copy-vsx @@ -203,7 +195,7 @@ input: component: vsx-installer events: preStart: - - inject-theia-in-remote-sidecar + - inject-ide-in-remote-sidecar - copy-vsx machine-exec: @@ -214,7 +206,7 @@ input: annotations: "controller.devfile.io/allow-import-from": "*" labels: - "devworkspace.devfile.io/editor-compatibility": "che-theia" + "devworkspace.devfile.io/editor-compatibility": "generic-ide" spec: components: - name: che-machine-exec @@ -247,26 +239,21 @@ input: annotations: "controller.devfile.io/allow-import-from": "*" labels: - "devworkspace.devfile.io/editor-compatibility": "che-theia" + "devworkspace.devfile.io/editor-compatibility": "generic-ide" spec: components: - name: sidecar-typescript attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": vscode-plugin - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the typescript vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://download.jboss.org/jbosstools/vscode/3rdparty/ms-code.typescript/che-typescript-language-1.35.1.vsix - container: image: "quay.io/eclipse/che-sidecar-node:10-0cb5d78" memoryLimit: '512Mi' env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/vscode-typescript volumeMounts: - path: "/remote-endpoint" @@ -285,27 +272,22 @@ output: components: - - name: theia-ide + - name: ide-ide attributes: - "app.kubernetes.io/name": che-theia.eclipse.org + "app.kubernetes.io/name": generic-ide.eclipse.org "app.kubernetes.io/part-of": che.eclipse.org "app.kubernetes.io/component": editor - - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the vscode-pull-request-github vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://github.com/microsoft/vscode-pull-request-github/releases/download/v0.8.0/vscode-pull-request-github-0.8.0.vsix - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" container: - image: "quay.io/eclipse/che-theia:next" + image: "quay.io/eclipse/generic-ide:next" env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: "3130" - - name: THEIA_HOST + - name: IDE_HOST value: 0.0.0.0 volumeMounts: - path: "/plugins" @@ -313,7 +295,7 @@ output: mountSources: true memoryLimit: "512M" endpoints: - - name: "theia" + - name: "ide" exposure: public targetPort: 3100 secure: true @@ -328,38 +310,35 @@ output: attributes: type: webview unique: "true" - - name: "theia-dev" + - name: "ide-dev" exposure: public targetPort: 3130 protocol: http attributes: type: ide-dev - - name: "theia-redir-1" + - name: "ide-redir-1" exposure: public targetPort: 13131 protocol: http - - name: "theia-redir-2" + - name: "ide-redir-2" exposure: public targetPort: 13132 protocol: http - - name: "theia-redir-3" + - name: "ide-redir-3" exposure: public targetPort: 13133 protocol: http - name: plugins attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" volume: {} - - name: vsx-installer # Mainly reads the container objects and searches for those - # with che-theia.eclipse.org/vscode-extensions attributes to get VSX urls - # Those found in the dedicated containers components are with a sidecar, - # Those found in the che-theia container are without a sidecar. + - name: vsx-installer attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" container: args: - /bin/sh @@ -369,9 +348,9 @@ output: TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) &&\ WORKSPACE=$(curl -fsS --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer ${TOKEN}" $KUBE_API_ENDPOINT) &&\ IFS=$'\n' &&\ - for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"che-theia.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ - dest=$(echo "$container" | sed 's|.*{"name":"THEIA_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ - urls=$(echo "$container" | sed 's|.*"che-theia.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ + for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"generic-ide.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ + dest=$(echo "$container" | sed 's|.*{"name":"IDE_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ + urls=$(echo "$container" | sed 's|.*"generic-ide.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ mkdir -p $dest ;\ unset IFS &&\ for url in $(echo $urls | sed 's/[",]/ /g' - ); do \ @@ -385,17 +364,17 @@ output: - name: remote-endpoint attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" volume: {} # ephemeral: true #### We should add it in the Devfile 2.0 spec ! Not critical to implement at start though - name: remote-runtime-injector attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" container: #### corresponds to `initContainer` definition in old meta.yaml. - image: "quay.io/eclipse/che-theia-endpoint-runtime-binary:7.20.0" + image: "quay.io/eclipse/generic-ide-endpoint-runtime-binary:7.20.0" volumeMounts: - path: "/remote-endpoint" name: remote-endpoint @@ -429,14 +408,9 @@ output: type: terminal - name: sidecar-typescript attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": vscode-plugin - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the typescript vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://download.jboss.org/jbosstools/vscode/3rdparty/ms-code.typescript/che-typescript-language-1.35.1.vsix - controller.devfile.io/imported-by: "typescript" container: @@ -445,7 +419,7 @@ output: env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/vscode-typescript volumeMounts: - path: "/remote-endpoint" @@ -467,14 +441,14 @@ output: commands: # Commands coming from plugin editor - - id: inject-theia-in-remote-sidecar + - id: inject-ide-in-remote-sidecar attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" apply: component: remote-runtime-injector - id: copy-vsx attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" apply: component: vsx-installer @@ -521,5 +495,5 @@ output: events: preStart: - - inject-theia-in-remote-sidecar + - inject-ide-in-remote-sidecar - copy-vsx diff --git a/pkg/library/flatten/testdata/spec-contributions/theia-merge-usecase.yaml b/pkg/library/flatten/testdata/spec-contributions/generic-ide-merge-usecase.yaml similarity index 82% rename from pkg/library/flatten/testdata/spec-contributions/theia-merge-usecase.yaml rename to pkg/library/flatten/testdata/spec-contributions/generic-ide-merge-usecase.yaml index 365479f99..c3e0aa900 100644 --- a/pkg/library/flatten/testdata/spec-contributions/theia-merge-usecase.yaml +++ b/pkg/library/flatten/testdata/spec-contributions/generic-ide-merge-usecase.yaml @@ -1,4 +1,4 @@ -name: "Merges Theia IDE contribution" +name: "Merges generic IDE contribution" input: devworkspace: @@ -19,14 +19,14 @@ input: memoryLimit: 2Gi mountSources: true contributions: - - name: theia-ide - uri: theia-ide.yaml + - name: generic-ide + uri: generic-ide.yaml devfileResources: - theia-ide.yaml: + generic-ide.yaml: schemaVersion: 2.1.0 metadata: - name: theia-ide + name: generic-ide commands: - id: init-container-command apply: @@ -35,7 +35,7 @@ input: preStart: - init-container-command components: - - name: theia-ide-contributions + - name: generic-ide-contributions attributes: controller.devfile.io/container-contribution: true container: @@ -46,7 +46,7 @@ input: env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools memoryLimit: 512Mi volumeMounts: @@ -55,29 +55,29 @@ input: - name: remote-endpoint path: /remote-endpoint image: quay.io/devfile/universal-developer-image@sha256:53cec58dd190dd1e06100478ae879d7c28abd8fc883d5fdf5be3eb6e943fe5e7 - - name: theia-ide + - name: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: generic-local + path: /home/generic/.generic mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: generic attributes: type: main cookiesAuthEnabled: true @@ -109,7 +109,7 @@ input: exposure: public secure: false protocol: https - - name: theia-dev + - name: generic-dev attributes: type: ide-dev discoverable: false @@ -117,21 +117,21 @@ input: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: generic-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: generic-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: generic-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -149,11 +149,11 @@ input: secure: false protocol: wss attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: plugins volume: {} - - name: theia-local + - name: generic-local volume: {} - name: che-machine-exec container: @@ -170,10 +170,10 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-runtime-injector container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -190,7 +190,7 @@ input: cpuRequest: 30m attributes: app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org - name: remote-endpoint volume: ephemeral: true @@ -201,7 +201,7 @@ output: components: - name: tools attributes: - controller.devfile.io/merged-contributions: "theia-ide" + controller.devfile.io/merged-contributions: "generic-ide" container: image: quay.io/devfile/universal-developer-image:latest env: @@ -211,7 +211,7 @@ output: value: /tmp/.cache - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/tools args: - sh @@ -227,33 +227,33 @@ output: path: /remote-endpoint memoryLimit: 2560Mi # 2Gi = 2048Mi + 512Mi mountSources: true - - name: theia-ide + - name: generic-ide attributes: - app.kubernetes.io/component: che-theia - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/component: generic-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: - image: quay.io/eclipse/che-theia:next + image: quay.io/eclipse/generic-ide:next env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: '3130' - - name: THEIA_HOST + - name: IDE_HOST value: 127.0.0.1 volumeMounts: - name: plugins path: /plugins - - name: theia-local - path: /home/theia/.theia + - name: generic-local + path: /home/generic/.generic mountSources: true memoryLimit: 512M cpuLimit: 1500m cpuRequest: 100m endpoints: - - name: theia + - name: generic attributes: type: main cookiesAuthEnabled: true @@ -285,7 +285,7 @@ output: exposure: public secure: false protocol: https - - name: theia-dev + - name: generic-dev attributes: type: ide-dev discoverable: false @@ -293,21 +293,21 @@ output: targetPort: 3130 exposure: public protocol: http - - name: theia-redirect-1 + - name: generic-redirect-1 attributes: discoverable: false urlRewriteSupported: true targetPort: 13131 exposure: public protocol: http - - name: theia-redirect-2 + - name: generic-redirect-2 attributes: discoverable: false urlRewriteSupported: true targetPort: 13132 exposure: public protocol: http - - name: theia-redirect-3 + - name: generic-redirect-3 attributes: discoverable: false urlRewriteSupported: true @@ -326,17 +326,17 @@ output: protocol: wss - name: plugins attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - - name: theia-local + - name: generic-local attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: {} - name: che-machine-exec attributes: app.kubernetes.io/component: machine-exec - app.kubernetes.io/part-of: che-theia.eclipse.org - controller.devfile.io/imported-by: theia-ide + app.kubernetes.io/part-of: generic-ide.eclipse.org + controller.devfile.io/imported-by: generic-ide container: image: quay.io/eclipse/che-machine-exec:next command: @@ -351,11 +351,11 @@ output: cpuRequest: 30m - name: remote-runtime-injector attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide app.kubernetes.io/component: remote-runtime-injector - app.kubernetes.io/part-of: che-theia.eclipse.org + app.kubernetes.io/part-of: generic-ide.eclipse.org container: - image: quay.io/eclipse/che-theia-endpoint-runtime-binary:next + image: quay.io/eclipse/generic-ide-endpoint-runtime-binary:next env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint @@ -372,13 +372,13 @@ output: cpuRequest: 30m - name: remote-endpoint attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide volume: ephemeral: true commands: - id: init-container-command attributes: - controller.devfile.io/imported-by: theia-ide + controller.devfile.io/imported-by: generic-ide apply: component: remote-runtime-injector events: diff --git a/pkg/library/flatten/testdata/spec-contributions/nodejs-workspace.yaml b/pkg/library/flatten/testdata/spec-contributions/nodejs-workspace.yaml index 8ad2ca9cf..281d7e670 100644 --- a/pkg/library/flatten/testdata/spec-contributions/nodejs-workspace.yaml +++ b/pkg/library/flatten/testdata/spec-contributions/nodejs-workspace.yaml @@ -1,4 +1,4 @@ -name: "Theia and NodeJS plugin workspace" +name: "generic IDE and NodeJS plugin workspace" input: devworkspace: @@ -58,9 +58,9 @@ input: ] } contributions: - - name: che-theia + - name: generic-ide kubernetes: - name: theia-next + name: ide-next namespace: devworkspace-plugins - name: machine-exec kubernetes: @@ -76,11 +76,11 @@ input: memoryLimit: 512Mi devworkspaceResources: - theia-next: + ide-next: kind: DevWorkspaceTemplate apiVersion: workspace.devfile.io/v1alpha2 metadata: - name: theia-next + name: ide-next annotations: "controller.devfile.io/allow-import-from": "*" spec: @@ -89,12 +89,9 @@ input: volume: {} - name: remote-endpoint volume: {} # TODO: Fix this once ephemeral volumes are supported - - name: vsx-installer # Mainly reads the container objects and searches for those - # with che-theia.eclipse.org/vscode-extensions attributes to get VSX urls - # Those found in the dedicated containers components are with a sidecar, - # Those found in the che-theia container are without a sidecar. + - name: vsx-installer attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper container: args: @@ -105,9 +102,9 @@ input: TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) &&\ WORKSPACE=$(curl -fsS --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer ${TOKEN}" $KUBE_API_ENDPOINT) &&\ IFS=$'\n' &&\ - for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"che-theia.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ - dest=$(echo "$container" | sed 's|.*{"name":"THEIA_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ - urls=$(echo "$container" | sed 's|.*"che-theia.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ + for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"generic-ide.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ + dest=$(echo "$container" | sed 's|.*{"name":"IDE_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ + urls=$(echo "$container" | sed 's|.*"generic-ide.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ mkdir -p $dest ;\ unset IFS &&\ for url in $(echo $urls | sed 's/[",]/ /g' - ); do \ @@ -120,10 +117,10 @@ input: name: plugins - name: remote-runtime-injector attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper container: #### corresponds to `initContainer` definition in old meta.yaml. - image: "quay.io/eclipse/che-theia-endpoint-runtime-binary:7.20.0" + image: "quay.io/eclipse/generic-ide-endpoint-runtime-binary:7.20.0" volumeMounts: - path: "/remote-endpoint" name: remote-endpoint @@ -132,26 +129,21 @@ input: value: /remote-endpoint/plugin-remote-endpoint - name: REMOTE_ENDPOINT_VOLUME_NAME value: remote-endpoint - - name: theia-ide + - name: ide-ide attributes: - "app.kubernetes.io/name": che-theia.eclipse.org + "app.kubernetes.io/name": generic-ide.eclipse.org "app.kubernetes.io/part-of": che.eclipse.org "app.kubernetes.io/component": editor - - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the vscode-pull-request-github vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://github.com/microsoft/vscode-pull-request-github/releases/download/v0.8.0/vscode-pull-request-github-0.8.0.vsix container: - image: "quay.io/eclipse/che-theia:next" + image: "quay.io/eclipse/generic-ide:next" env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: "3130" - - name: THEIA_HOST + - name: IDE_HOST value: 0.0.0.0 volumeMounts: - path: "/plugins" @@ -159,7 +151,7 @@ input: mountSources: true memoryLimit: "512M" endpoints: - - name: "theia" + - name: "ide" exposure: public targetPort: 3100 secure: true @@ -174,27 +166,27 @@ input: attributes: type: webview unique: "true" - - name: "theia-dev" + - name: "ide-dev" exposure: public targetPort: 3130 protocol: http attributes: type: ide-dev - - name: "theia-redir-1" + - name: "ide-redir-1" exposure: public targetPort: 13131 protocol: http - - name: "theia-redir-2" + - name: "ide-redir-2" exposure: public targetPort: 13132 protocol: http - - name: "theia-redir-3" + - name: "ide-redir-3" exposure: public targetPort: 13133 protocol: http commands: # Commands coming from plugin editor - - id: inject-theia-in-remote-sidecar + - id: inject-ide-in-remote-sidecar apply: component: remote-runtime-injector - id: copy-vsx @@ -202,7 +194,7 @@ input: component: vsx-installer events: preStart: - - inject-theia-in-remote-sidecar + - inject-ide-in-remote-sidecar - copy-vsx machine-exec: @@ -213,7 +205,7 @@ input: annotations: "controller.devfile.io/allow-import-from": "*" labels: - "devworkspace.devfile.io/editor-compatibility": "che-theia" + "devworkspace.devfile.io/editor-compatibility": "generic-ide" spec: components: - name: che-machine-exec @@ -246,26 +238,21 @@ input: annotations: "controller.devfile.io/allow-import-from": "*" labels: - "devworkspace.devfile.io/editor-compatibility": "che-theia" + "devworkspace.devfile.io/editor-compatibility": "generic-ide" spec: components: - name: sidecar-typescript attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": vscode-plugin - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the typescript vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://download.jboss.org/jbosstools/vscode/3rdparty/ms-code.typescript/che-typescript-language-1.35.1.vsix - container: image: "quay.io/eclipse/che-sidecar-node:10-0cb5d78" memoryLimit: '512Mi' env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/vscode-typescript volumeMounts: - path: "/remote-endpoint" @@ -284,27 +271,22 @@ output: components: - - name: theia-ide + - name: ide-ide attributes: - "app.kubernetes.io/name": che-theia.eclipse.org + "app.kubernetes.io/name": generic-ide.eclipse.org "app.kubernetes.io/part-of": che.eclipse.org "app.kubernetes.io/component": editor - - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the vscode-pull-request-github vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://github.com/microsoft/vscode-pull-request-github/releases/download/v0.8.0/vscode-pull-request-github-0.8.0.vsix - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" container: - image: "quay.io/eclipse/che-theia:next" + image: "quay.io/eclipse/generic-ide:next" env: - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins - name: HOSTED_PLUGIN_HOSTNAME value: 0.0.0.0 - name: HOSTED_PLUGIN_PORT value: "3130" - - name: THEIA_HOST + - name: IDE_HOST value: 0.0.0.0 volumeMounts: - path: "/plugins" @@ -312,7 +294,7 @@ output: mountSources: true memoryLimit: "512M" endpoints: - - name: "theia" + - name: "ide" exposure: public targetPort: 3100 secure: true @@ -327,38 +309,35 @@ output: attributes: type: webview unique: "true" - - name: "theia-dev" + - name: "ide-dev" exposure: public targetPort: 3130 protocol: http attributes: type: ide-dev - - name: "theia-redir-1" + - name: "ide-redir-1" exposure: public targetPort: 13131 protocol: http - - name: "theia-redir-2" + - name: "ide-redir-2" exposure: public targetPort: 13132 protocol: http - - name: "theia-redir-3" + - name: "ide-redir-3" exposure: public targetPort: 13133 protocol: http - name: plugins attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" volume: {} - - name: vsx-installer # Mainly reads the container objects and searches for those - # with che-theia.eclipse.org/vscode-extensions attributes to get VSX urls - # Those found in the dedicated containers components are with a sidecar, - # Those found in the che-theia container are without a sidecar. + - name: vsx-installer attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" container: args: - /bin/sh @@ -368,9 +347,9 @@ output: TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) &&\ WORKSPACE=$(curl -fsS --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer ${TOKEN}" $KUBE_API_ENDPOINT) &&\ IFS=$'\n' &&\ - for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"che-theia.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ - dest=$(echo "$container" | sed 's|.*{"name":"THEIA_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ - urls=$(echo "$container" | sed 's|.*"che-theia.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ + for container in $(echo $WORKSPACE | sed -e 's|[[,]\({"attributes":{"app.kubernetes.io\)|\n\1|g' | grep '"generic-ide.eclipse.org/vscode-extensions":' | grep -e '^{"attributes".*'); do \ + dest=$(echo "$container" | sed 's|.*{"name":"IDE_PLUGINS","value":"local-dir://\([^"][^"]*\)"}.*|\1|' - ) ;\ + urls=$(echo "$container" | sed 's|.*"generic-ide.eclipse.org/vscode-extensions":\[\([^]][^]]*\)\]}.*|\1|' - ) ;\ mkdir -p $dest ;\ unset IFS &&\ for url in $(echo $urls | sed 's/[",]/ /g' - ); do \ @@ -384,17 +363,17 @@ output: - name: remote-endpoint attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" volume: {} # ephemeral: true #### We should add it in the Devfile 2.0 spec ! Not critical to implement at start though - name: remote-runtime-injector attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": bootstrapper - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" container: #### corresponds to `initContainer` definition in old meta.yaml. - image: "quay.io/eclipse/che-theia-endpoint-runtime-binary:7.20.0" + image: "quay.io/eclipse/generic-ide-endpoint-runtime-binary:7.20.0" volumeMounts: - path: "/remote-endpoint" name: remote-endpoint @@ -428,14 +407,9 @@ output: type: terminal - name: sidecar-typescript attributes: - "app.kubernetes.io/part-of": che-theia.eclipse.org + "app.kubernetes.io/part-of": generic-ide.eclipse.org "app.kubernetes.io/component": vscode-plugin - # Added by Che-theia at start when detecting, after cloning, that the extensions.json in the repo - # contains the typescript vscode plugin. - "che-theia.eclipse.org/vscode-extensions": - - https://download.jboss.org/jbosstools/vscode/3rdparty/ms-code.typescript/che-typescript-language-1.35.1.vsix - controller.devfile.io/imported-by: "typescript" container: @@ -444,7 +418,7 @@ output: env: - name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE value: /remote-endpoint/plugin-remote-endpoint - - name: THEIA_PLUGINS + - name: IDE_PLUGINS value: local-dir:///plugins/sidecars/vscode-typescript volumeMounts: - path: "/remote-endpoint" @@ -466,14 +440,14 @@ output: commands: # Commands coming from plugin editor - - id: inject-theia-in-remote-sidecar + - id: inject-ide-in-remote-sidecar attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" apply: component: remote-runtime-injector - id: copy-vsx attributes: - controller.devfile.io/imported-by: "che-theia" + controller.devfile.io/imported-by: "generic-ide" apply: component: vsx-installer @@ -520,5 +494,5 @@ output: events: preStart: - - inject-theia-in-remote-sidecar + - inject-ide-in-remote-sidecar - copy-vsx diff --git a/pkg/library/lifecycle/testdata/postStart/no_postStart.yaml b/pkg/library/lifecycle/testdata/postStart/no_postStart.yaml index 038edc04f..4da036281 100644 --- a/pkg/library/lifecycle/testdata/postStart/no_postStart.yaml +++ b/pkg/library/lifecycle/testdata/postStart/no_postStart.yaml @@ -5,7 +5,7 @@ input: commands: - id: prestart-cmd exec: - component: theia-ide + component: test-component commandLine: echo "Hello from $(pwd)" events: preStart: