Skip to content
Open
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
8 changes: 6 additions & 2 deletions editors-definitions/che-code-sshd-insiders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ metadata:
displayName: Visual Studio Code (desktop) (SSH)
description: Visual Studio Code server for Eclipse Che over SSH - insiders
tags:
- Tech-Preview
- ssh
- CLI
- vscode
Expand Down Expand Up @@ -84,7 +83,9 @@ commands:
events:
postStart:
- start-sshd

components:

- name: che-code-sshd-page
container:
image: quay.io/che-incubator/che-code-sshd:insiders
Expand All @@ -95,7 +96,7 @@ components:
command:
- sh
- -c
- "cp /usr/sbin/sshd /usr/bin/ssh-keygen /usr/bin/tar /usr/bin/gzip /usr/bin/which /usr/lib64/libnss_wrapper.so /usr/lib64/libpam.so.0 /usr/lib64/libeconf.so.0 /usr/lib64/libcrypt.so.2 /etc/ssh/sshd_config /sshd.start /sshd/ & while [ ! -e /sshd/username ]; do sleep 1s; done; pushd /opt/www/ && exec node /opt/www/server.js"
- "cp -rp /sshd-staging/. /sshd/; while [ ! -e /sshd/username ]; do sleep 1s; done; pushd /opt/www/ && exec node /opt/www/server.js"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiding this command in an in-container script (e.g. startPage.sh),
will allow modifying it without touching the editor definition YAML.

Do you think this is a good idea, @rgrunber ? 🤔

Copy link
Contributor Author

@rgrunber rgrunber Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree here. It also allows things to be reused more easily. This entire script belongs in a script somwhere at https://github.com/che-incubator/che-code/tree/main/build/scripts .

Update: I have a solution for this. Testing to confirm it works as expected..

endpoints:
- name: che-code-sshd
attributes:
Expand All @@ -112,6 +113,7 @@ components:
attributes:
app.kubernetes.io/component: che-code-sshd-page
app.kubernetes.io/part-of: che-code-server.eclipse.org

- name: che-code-sshd
container:
image: quay.io/che-incubator/che-code-sshd:insiders
Expand All @@ -126,5 +128,7 @@ components:
app.kubernetes.io/component: che-code-sshd
app.kubernetes.io/part-of: che-code-server.eclipse.org
controller.devfile.io/container-contribution: true

- name: sshd-folder
volume: {}

7 changes: 5 additions & 2 deletions editors-definitions/che-code-sshd-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ metadata:
- ssh
- CLI
- vscode
- Tech-Preview
attributes:
arch:
- x86_64
Expand Down Expand Up @@ -84,7 +83,9 @@ commands:
events:
postStart:
- start-sshd

components:

- name: che-code-sshd-page
container:
image: quay.io/che-incubator/che-code-sshd:next
Expand All @@ -95,7 +96,7 @@ components:
command:
- sh
- -c
- "cp /usr/sbin/sshd /usr/bin/ssh-keygen /usr/bin/tar /usr/bin/gzip /usr/bin/which /usr/lib64/libnss_wrapper.so /usr/lib64/libpam.so.0 /usr/lib64/libeconf.so.0 /usr/lib64/libcrypt.so.2 /etc/ssh/sshd_config /sshd.start /sshd/ & while [ ! -e /sshd/username ]; do sleep 1s; done; pushd /opt/www/ && exec node /opt/www/server.js"
- "cp -rp /sshd-staging/. /sshd/; while [ ! -e /sshd/username ]; do sleep 1s; done; pushd /opt/www/ && exec node /opt/www/server.js"
endpoints:
- name: che-code-sshd
attributes:
Expand All @@ -112,6 +113,7 @@ components:
attributes:
app.kubernetes.io/component: che-code-sshd-page
app.kubernetes.io/part-of: che-code-server.eclipse.org

- name: che-code-sshd
container:
image: quay.io/che-incubator/che-code-sshd:next
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this gets merged into the user-defined main container (ie. container-contribution is true), I don't think we need this image to be quay.io/che-incubator/che-code-sshd:next. It could even be something like registry.access.redhat.com/ubi9:9.7 (or minimal?). If it saves some space (assuming all images must be downloaded, it might speed things up slightly).

Expand All @@ -126,6 +128,7 @@ components:
app.kubernetes.io/component: che-code-sshd
app.kubernetes.io/part-of: che-code-server.eclipse.org
controller.devfile.io/container-contribution: true

- name: sshd-folder
volume: {}