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

...

相关推荐
极小狐2 小时前
极狐GitLab 项目功能和权限解读
运维·git·安全·gitlab·极狐gitlab
宁酱醇2 小时前
GitLab_密钥生成(SSH-key)
运维·ssh·gitlab
极小狐2 小时前
极狐GitLab 如何 cherry-pick 变更?
人工智能·git·机器学习·gitlab
云攀登者-望正茂4 小时前
60个GitLab CI/CD 面试问题和答案
ci/cd·gitlab·devops
懿瑾6 小时前
GitLab Auth2授权-Express + passport-gitlab2
gitlab·angular.js
zhang238390615418 小时前
IDEA add gitlab account 提示
java·gitlab·intellij-idea·idea
宁酱醇1 天前
各种各样的bug合集
开发语言·笔记·python·gitlab·bug
极小狐1 天前
极狐GitLab Git LFS 速率限制如何设置?
运维·git·ssh·gitlab·github
极小狐1 天前
如何解决极狐GitLab 合并冲突?
人工智能·git·机器学习·gitlab
量子位2 天前
无需数据标注!测试时强化学习,模型数学能力暴增 | 清华 & 上海 AI Lab
人工智能·gitlab·aigc