Hello everyone!
I would like to ask for support regarding the configuration of Gitlab Workspace (Beta).
This is an interesting feature for me and I would like to use it for some projects.
I followed the configuration steps Gitlab Workspace - Doc. When I create a new Workspace, I get Failed
after 10 min.
In my configuration, I think the ingress-nginx is the problem. I couldn’t find a good example to apply. Here’s the code
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-ingress
spec:
rules:
- host: my-dns-record
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-ingress-ingress-nginx-controller
port:
number: 80
I’m using cloudflare for DNS record creation and TXT type (used by certbot)
My agent yaml file
remote_development:
enabled: true
dns_zone: "my-dns-record"
and my DevFile
schemaVersion: 2.2.0
components:
- name: tooling-container
attributes:
gl/inject-editor: true
container:
image: registry.gitlab.com/gitlab-org/remote-development/gitlab-workspaces-proxy:0.8
memoryRequest: 1024M
memoryLimit: 2048M
cpuRequest: 500m
cpuLimit: 1000m
endpoints:
- name: http-3000
targetPort: 3000
The proxy was successfully installed ~ GitLab Workspaces Proxy is now installed in the cluster.
Please let me know if you need any additional information.
Thank you in advance
Karim
Hey @karimchaouch
There’s a few more pieces to a ‘complete’ ingress configuration than just the Ingress
object.
The easiest way to install ingress-nginx
is to use helm - that takes care of all the working pieces.
This worked for me:
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install nginx-ingress ingress-nginx/ingress-nginx --namespace ingress-nginx --create-namespace
Once that’s complete, you should have some pods/services running in the ingress-nginx
namespace - and then after the gitlab-workspaces-proxy
you should have the right entries if you run kubectl get ingress -A
1 Like
After checking more in details and fixing issues related to pvc. I can see the pod getting created. But still failing after few seconds…
here’s the log output:
kubectl logs workspace-71591-15054274-ubvxsu-77785d7df6-b26wl -n gl-rd-ns-71591-15054274-ubvxsu -v=4
Defaulted container "tooling-container" out of: tooling-container, gl-cloner-injector-gl-cloner-injector-command-1 (init), gl-editor-injector-gl-editor-injector-command-2 (init)
/projects/.gl-editor/code-server/bin/gitlab-webide-server: line 12: /projects/.gl-editor/code-server/node: not found
I fixed the issue by creating a persistent storage and claiming it.
That’s why I was stuck at creating for 10 min. Hopefully that will help someone else.
I was getting these errors pod has unbound immediate persistentvolumeclaims
Great, glad you managed to get it working
This is currently mentioned in the prerequisites:
In the Kubernetes cluster, verify that a default storage class is defined so that volumes can be dynamically provisioned for each workspace.
Our documentation is open source, and we’d love an MR if you think we could make that particular call out any clearer or easier to follow for someone else…
1 Like
Thanks @stingrayza.
Yes, it would be nice to mention the persistent storage in the prerequisites. I will create a MR
Cheers,
1 Like