helm部署gitlab-runner问题解决

关于.gitlab-ci.yml中build镜像时,docker守护进程未启动错误

参考:https://docs.gitlab.com/runner/install/kubernetes.html

问题截图

解决方法

values.yaml中关于conf.toml添加
注意:确保每个节点的docker正常运行

yaml 复制代码
          [[runners.kubernetes.volumes.host_path]]
            name = "docker"
            mount_path = "/var/run/docker.sock"
            read_only = false
            host_path = "/var/run/docker.sock"

关于指定节点只运行gitlab-runner和worker

添加污点配置,kubectl taint node node1 runner=gitlab-runner-only:NoSchedule,并修改configmap配置:

复制代码
cat >>/home/gitlab-runner/.gitlab-runner/config.toml <<EOF
    [runners.kubernetes.node_tolerations]
      "runner=gitlab-runner-only" = "NoSchedule"
EOF

gitlab-runner和worker调度到指定节点

添加标签选择器,添加节点标签,修改values.yaml

kubectl label node node1 runner=gitlab-runner-only

runners:

...

nodeSelector:

runner: gitlab-runner-only

nodeSelector:

runner: gitlab-runner-only

...

相关推荐
嘻哈baby3 小时前
自建GitLab与CI/CD实战:团队协作完整方案
ci/cd·gitlab
秦时明月天明3 小时前
GitLab SSH Key 过期:git pull failed : remote your ssh key has expired
git·ssh·gitlab
极限实验室14 小时前
程序员爆哭!我们让 COCO AI 接管 GitLab 审查后,团队直接起飞:连 CTO 都说“这玩意儿比人靠谱多了
人工智能·gitlab
HIT_Weston2 天前
61、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(五)
前端·ubuntu·gitlab
HIT_Weston2 天前
60、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(四)
前端·ubuntu·gitlab
周杰伦_Jay3 天前
【GOFrame】模块化框架与生产级实践
开发语言·gitlab·github
丫丫学AI3 天前
gitlab-runner注册执行器
gitlab
yuguo.im3 天前
5 分钟快速入门 Gitlab CI/CD
ci/cd·gitlab·github
aoxiang_ywj4 天前
GitLab 子模块(子仓)更新到主仓的完整流程
gitlab
HIT_Weston4 天前
57、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(一)
前端·ubuntu·gitlab