Skip to content

Commit

Permalink
CHE-8265: Add an ability to try Workspace.Next on k8s deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
  • Loading branch information
Oleksandr Garagatyi committed Jun 5, 2018
1 parent b6104fb commit 2fcdcf1
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deploy/kubernetes/kubectl/Deploy Che.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ and clean redeploy of Che.
- Create namespace `che`: `kubectl create namespace che`
- Deploy Che: `kubectl --namespace=che apply -f che-kubernetes.yaml`
- Check Che pod status until it become `Running`: `kubectl get --namespace=che pods`

### Workspace Next:
There is a file `wsnext/feature-api.yaml` which contains kubesrv service needed to test Workspace Next on kubernetes infrastructure.
To use it call `kubectl apply --namespace=che -f wsnext/feature-api.yaml` and Che will be able to use Workspace Next flow.
6 changes: 6 additions & 0 deletions deploy/kubernetes/kubectl/che-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ items:
CHE_LOGS_APPENDERS_IMPL: "plaintext"
CHE_INFRA_KUBERNETES_INGRESS_DOMAIN: "192.168.99.100.nip.io"
CHE_INFRA_KUBERNETES_SERVER__STRATEGY: "default-host"
CHE_WORKSPACE_FEATURE_API: "http://feature-api-service:3000"
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
Expand Down Expand Up @@ -270,6 +271,11 @@ items:
configMapKeyRef:
key: CHE_INFRA_KUBERNETES_SERVER__STRATEGY
name: che
- name: CHE_WORKSPACE_FEATURE_API
valueFrom:
configMapKeyRef:
key: CHE_WORKSPACE_FEATURE_API
name: che
image: eclipse/che-server:nightly
imagePullPolicy: Always
livenessProbe:
Expand Down
85 changes: 85 additions & 0 deletions deploy/kubernetes/kubectl/wsnext/feature-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
labels:
app: feature-api
name: feature-api-service
spec:
ports:
- name: feature-api
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: feature-api
- apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: feature-api
name: feature-api
data:
CHE_REGISTRY_UPDATE_INTERVAL: "60"
CHE_REGISTRY_GITHUB_URL: "https://github.com/garagatyi/che-registry.git"
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: feature-api-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
spec:
rules:
- host: feature.192.168.99.100.nip.io
http:
paths:
- backend:
serviceName: feature-api-service
servicePort: 3000
- apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: feature-api
name: feature-api
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: feature-api
strategy:
type: Recreate
template:
metadata:
labels:
app: feature-api
spec:
containers:
- env:
- name: CHE_REGISTRY_UPDATE_INTERVAL
valueFrom:
configMapKeyRef:
key: CHE_REGISTRY_UPDATE_INTERVAL
name: feature-api
- name: CHE_REGISTRY_GITHUB_URL
valueFrom:
configMapKeyRef:
key: CHE_REGISTRY_GITHUB_URL
name: feature-api
image: garagatyi/kubesrv:latest
imagePullPolicy: Always
name: feature-api
ports:
- containerPort: 3000
name: feature-api
resources:
limits:
memory: 600Mi
requests:
memory: 256Mi

0 comments on commit 2fcdcf1

Please sign in to comment.