• helm部署gitlab-runner问题解决


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

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

    问题截图

    在这里插入图片描述

    解决方法

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

              [[runners.kubernetes.volumes.host_path]]
                name = "docker"
                mount_path = "/var/run/docker.sock"
                read_only = false
                host_path = "/var/run/docker.sock"
    
    • 1
    • 2
    • 3
    • 4
    • 5

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

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

    cat >>/home/gitlab-runner/.gitlab-runner/config.toml <
    • 1
    • 2
    • 3
    • 4

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

    添加标签选择器,添加节点标签,修改values.yaml
    kubectl label node node1 runner=gitlab-runner-only

    runners:

    nodeSelector:
    runner: gitlab-runner-only
    nodeSelector:
    runner: gitlab-runner-only

  • 相关阅读:
    android 锁屏通知
    nginx配置文件 location语法
    kubernetes cluster IP not with in the service CIDR
    Spring学习篇(一)
    UX设计VSUI设计
    CSDN编程竞赛第六期总结
    01-HelloVueJs
    说说 Spring 定时任务如何大规模企业级运用
    【Android进阶】2、Android 的 MVC 设计模式
    Cache coherency
  • 原文地址:https://blog.csdn.net/qq_41674452/article/details/136142637