parent
b95852a5e0
commit
62b648437a
|
|
@ -202,6 +202,102 @@ metadata:
|
|||
kubernetes.io/metadata.name: ${USER_NAMESPACE}
|
||||
EOF
|
||||
|
||||
kubectl apply -f - <<EOF
|
||||
apiVersion: workspace.devfile.io/v1alpha2
|
||||
kind: DevWorkspaceTemplate
|
||||
metadata:
|
||||
name: che-code
|
||||
namespace: ${USER_NAMESPACE}
|
||||
spec:
|
||||
commands:
|
||||
- apply:
|
||||
component: che-code-injector
|
||||
id: init-container-command
|
||||
- exec:
|
||||
commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt
|
||||
2>&1 &
|
||||
component: che-code-runtime-description
|
||||
id: init-che-code-command
|
||||
components:
|
||||
- container:
|
||||
command:
|
||||
- /entrypoint-init-container.sh
|
||||
cpuLimit: 500m
|
||||
cpuRequest: 30m
|
||||
env:
|
||||
- name: CHE_DASHBOARD_URL
|
||||
value: https://$(minikube ip).nip.io
|
||||
- name: OPENVSX_REGISTRY_URL
|
||||
value: https://open-vsx.org
|
||||
image: quay.io/che-incubator/che-code:latest
|
||||
memoryLimit: 256Mi
|
||||
memoryRequest: 32Mi
|
||||
sourceMapping: /projects
|
||||
volumeMounts:
|
||||
- name: checode
|
||||
path: /checode
|
||||
name: che-code-injector
|
||||
- attributes:
|
||||
app.kubernetes.io/component: che-code-runtime
|
||||
app.kubernetes.io/part-of: che-code.eclipse.org
|
||||
controller.devfile.io/container-contribution: true
|
||||
container:
|
||||
cpuLimit: 500m
|
||||
cpuRequest: 30m
|
||||
endpoints:
|
||||
- attributes:
|
||||
cookiesAuthEnabled: true
|
||||
discoverable: false
|
||||
type: main
|
||||
urlRewriteSupported: true
|
||||
exposure: public
|
||||
name: che-code
|
||||
protocol: https
|
||||
secure: true
|
||||
targetPort: 3100
|
||||
- attributes:
|
||||
discoverable: false
|
||||
urlRewriteSupported: false
|
||||
exposure: public
|
||||
name: code-redirect-1
|
||||
protocol: https
|
||||
targetPort: 13131
|
||||
- attributes:
|
||||
discoverable: false
|
||||
urlRewriteSupported: false
|
||||
exposure: public
|
||||
name: code-redirect-2
|
||||
protocol: https
|
||||
targetPort: 13132
|
||||
- attributes:
|
||||
discoverable: false
|
||||
urlRewriteSupported: false
|
||||
exposure: public
|
||||
name: code-redirect-3
|
||||
protocol: https
|
||||
targetPort: 13133
|
||||
env:
|
||||
- name: CHE_DASHBOARD_URL
|
||||
value: https://$(minikube ip).nip.io
|
||||
- name: OPENVSX_REGISTRY_URL
|
||||
value: https://open-vsx.org
|
||||
image: quay.io/devfile/universal-developer-image:ubi8-latest
|
||||
memoryLimit: 1024Mi
|
||||
memoryRequest: 256Mi
|
||||
sourceMapping: /projects
|
||||
volumeMounts:
|
||||
- name: checode
|
||||
path: /checode
|
||||
name: che-code-runtime-description
|
||||
- name: checode
|
||||
volume: {}
|
||||
events:
|
||||
postStart:
|
||||
- init-che-code-command
|
||||
preStart:
|
||||
- init-container-command
|
||||
EOF
|
||||
|
||||
kubectl apply -f - <<EOF
|
||||
kind: DevWorkspace
|
||||
apiVersion: workspace.devfile.io/v1alpha2
|
||||
|
|
@ -209,6 +305,10 @@ metadata:
|
|||
name: ${DEV_WORKSPACE_NAME}
|
||||
namespace: ${USER_NAMESPACE}
|
||||
spec:
|
||||
contributions:
|
||||
- kubernetes:
|
||||
name: che-code
|
||||
name: editor
|
||||
routingClass: che
|
||||
started: false
|
||||
contributions:
|
||||
|
|
@ -229,6 +329,7 @@ EOF
|
|||
startAndWaitDevWorkspace() {
|
||||
# pre-pull image for faster workspace startup
|
||||
minikube image pull quay.io/devfile/universal-developer-image:ubi8-latest
|
||||
minikube image pull quay.io/che-incubator/che-code:latest
|
||||
|
||||
kubectl patch devworkspace ${DEV_WORKSPACE_NAME} -p '{"spec":{"started":true}}' --type=merge -n ${USER_NAMESPACE}
|
||||
kubectl wait devworkspace ${DEV_WORKSPACE_NAME} -n ${USER_NAMESPACE} --for=jsonpath='{.status.phase}'=Running --timeout=300s
|
||||
|
|
|
|||
Loading…
Reference in New Issue