I'm using gitlab runner install with Helm and running on Google Cloud Kubernetes engine.
Here my runner configuration inside my values.yaml file :
runners:
config: |
[[runners]]
[runners.kubernetes]
image = "ubuntu:16.04"
[[runners.kubernetes.volumes.host_path]]
name = "docker-sock"
mount_path = "/var/run/docker.sock"
host_path = "/var/run/docker.sock"
When i launch a build where i share volume with the host, i receive this error :
ERROR: for c2abac41f403_******_haproxy_1 Cannot start service haproxy: error while creating mount source path '/builds/****/****/docker/test/haproxy.cfg': mkdir /builds: read-only file system
So i decide to add a volume pvc to my runner configuration
...
[[runners.kubernetes.volumes.pvc]]
name = "runner-claim"
mount_path = "/builds"
...
But i receive this error :
Pod "runner-7vyyjqpv-project-8275433-concurrent-0dhn9h" is invalid: [spec.containers[0].volumeMounts[2].mountPath: Invalid value: "/builds": must be unique, spec.containers[1].volumeMounts[2].mountPath: Invalid value: "/builds": must be unique]
My goal is to use docker socket instead of docker in docker to have better performance.
Could you help me.
Best regards
question from:
https://stackoverflow.com/questions/66067632/bind-docker-socket-with-a-kubernetes-runner-and-share-volume 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…