Che workspace operator repository that contains K8s API for Che workspace and controller for them.
To build docker image run the following command in the project's root
docker build -t quay.io/che-incubator/che-workspace-controller:7.1.0 -f ./build/Dockerfile .
kubectl apply -f ./deploy/crds
kubectl create namespace che-workspace-controller
- Make sure that the right domain is set in
./deploy/controller_config.yaml
and./deploy/registry/local/ingress.yaml
kubectl apply -f ./deploy/registry/local
- [Optional] Modify ./deploy/controller.yaml and put your docker image and pull policy there.
kubectl apply -f ./deploy
kubectl apply -f ./deploy/crds
kubectl create namespace che-workspace-controller
- Make sure that the right domain is set in
./deploy/controller_config.yaml
and./deploy/registry/local/ingress.yaml
kubectl apply -f ./deploy/registry/local
kubectl apply -f ./deploy/controller_config.yaml
operator-sdk up local --namespace <your namespace>
- Take a look samples workspace configuration in
./samples
folder. - Apply any of them by executing
kubectl apply -f ./samples/workspace_java_mysql.yaml -n <namespace>
- As soon as workspace is started you're able to get IDE url by executing
kubectl get workspace -n <namespace>
This depends on delve
being installed (go get -u github.com/go-delve/delve/cmd/dlv
). Note that at the time of writing, executing go get
in this repo's directory will update go.mod; these changes should be dropped before committing.
Running the controller outside of the cluster depends on everything being in one namespace (e.g. che-workspace-controller
).
- Follow steps 1-5 for running the controller locally above
operator-sdk up local --namespace <your namespace> --enable-delve
- Connect debugger to
127.0.0.1:2345
(see config in.vscode/launch.json
)