我可以看到我的 POD 已创建,但构建日志是这样说的。
Running with gitlab-runner 16.3.0 (8ec04662)
on gitlab-runner-679d6544d7-2cnnp -cU7jBwtk, system ID: r_FmvSLQ5mgJMU
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: gitlab-runner
Using Kubernetes executor with image ubuntu:22.04 ...
Using attach strategy to execute scripts...
Preparing environment
00:06
Waiting for pod gitlab-runner/runner--cu7jbwtk-project-1-concurrent-0-qv72z26e to be running, status is Pending
Waiting for pod gitlab-runner/runner--cu7jbwtk-project-1-concurrent-0-qv72z26e to be running, status is Pending
ContainersNotInitialized: "containers with incomplete status: [init-permissions]"
PodFailed: ""
PodFailed: ""
ERROR: Job failed (system failure): prepare environment: waiting for pod running: pod status is failed. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
知道我的设置可能有什么问题吗?
在 K3S 上配置 GitLab Runner
我在 k3s 集群上也遇到了同样的问题。 this thread 的答案解决了我的问题。在 Helm 图表的 value.yaml 中使用这些图像。
runners:
config: |
[[runners]]
executor = "kubernetes"
[runners.kubernetes]
image = "ubuntu:20.04"
helper_image = "gitlab/gitlab-runner-helper:arm64-1278d3da"