Skip to content

Commit

Permalink
Remove vsx installer from Theia sample
Browse files Browse the repository at this point in the history
  • Loading branch information
sleshchenko committed Mar 2, 2021
1 parent 69bd949 commit 08335b1
Showing 1 changed file with 0 additions and 64 deletions.
64 changes: 0 additions & 64 deletions samples/flattened_theia-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,60 +37,11 @@ spec:
### BEGIN Contributions from Theia plugin ###
- name: plugins
volume: {}
- name: remote-endpoint
volume:
ephemeral: true
- 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.
attributes:
"app.kubernetes.io/part-of": che-theia.eclipse.org
"app.kubernetes.io/component": bootstrapper
container:
args:
- /bin/sh
- '-c'
- |
KUBE_API_ENDPOINT="https://kubernetes.default.svc/apis/workspace.devfile.io/v1alpha2/namespaces/${CHE_WORKSPACE_NAMESPACE}/devworkspaces/${CHE_WORKSPACE_NAME}" &&\
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) &&\
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;' - ) ;\
mkdir -p $dest ;\
for url in $(echo $urls | sed 's/[",]/ /g' - ); do \
echo; echo downloading $urls to $dest; curl -L $url > $dest/$(basename $url) ;\
done \
done \
image: 'quay.io/samsahai/curl:latest'
volumeMounts:
- path: "/plugins"
name: plugins
- name: remote-runtime-injector
attributes:
"app.kubernetes.io/part-of": che-theia.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"
volumeMounts:
- path: "/remote-endpoint"
name: remote-endpoint
env:
- name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
value: /remote-endpoint/plugin-remote-endpoint
- name: REMOTE_ENDPOINT_VOLUME_NAME
value: remote-endpoint
- name: theia-ide
attributes:
"app.kubernetes.io/name": che-theia.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"
env:
Expand Down Expand Up @@ -141,24 +92,9 @@ spec:
exposure: public
targetPort: 13133
protocol: http
### END Contributions from Theia plugin ###

commands:
- id: say-hello
exec:
component: plugin
commandLine: echo "Hello from $(pwd)"
workingDir: ${PROJECTS_ROOT}/project/app
### BEGIN Contributions from Theia plugin ###
# Commands coming from plugin editor
- id: inject-theia-in-remote-sidecar
apply:
component: remote-runtime-injector
- id: copy-vsx
apply:
component: vsx-installer
events:
preStart:
- inject-theia-in-remote-sidecar
- copy-vsx
### END Contributions from Theia plugin ###

0 comments on commit 08335b1

Please sign in to comment.