【发布时间】:2021-02-05 17:13:26
【问题描述】:
我正在使用带有 Helm 的 gitlab runner install 并在 Google Cloud Kubernetes 引擎上运行。
这是我的 values.yaml 文件中的跑步者配置:
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"
当我启动与主机共享卷的构建时,我收到此错误:
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
所以我决定将卷 pvc 添加到我的跑步者配置中
...
[[runners.kubernetes.volumes.pvc]]
name = "runner-claim"
mount_path = "/builds"
...
但我收到此错误:
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]
我的目标是在 docker 中使用 docker socket 代替 docker 以获得更好的性能。
你能帮帮我吗?
最好的问候
【问题讨论】:
标签: gitlab google-kubernetes-engine gitlab-ci-runner