k3s 上的 GitLab 运行程序错误 ContainersNotInitialized:“状态不完整的容器:[init-permissions]”

问题描述 投票:0回答:1

我可以看到我的 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

gitlab gitlab-ci-runner
1个回答
0
投票

我在 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"
© www.soinside.com 2019 - 2024. All rights reserved.