Setting the runner registration token via secrets prevents runner from starting
Summary
Setting the runner registration token with a secret prevents runner from starting.
The values.yaml
has the following part for the runners
section:
## The name of the secret containing runner-token and runner-registration-token
# secret: gitlab-runner
I assumed this is to be able to configure the runner registration token which is set in
## The Registration Token for adding new Runners to the GitLab Server. This must
## be retrieved from your GitLab Instance.
## ref: https://docs.gitlab.com/ce/ci/runners/README.html
##
# runnerRegistrationToken: ""
Steps to reproduce
- Have a Kubernetes Cluster with helm set up.
- Copy the following Code Block into a file named
values.yaml
gitlabUrl: https://gitlab.com/
secret: gitlab-runner
concurrent: 10
checkInterval: 30
rbac:
create: true
clusterWideAccess: false
runners:
image: ubuntu:18.04
tags: "metakube"
privileged: false
namespace: gitlab-runner
Execute
kubectl create namespace gitlab-runner
kubectl create secret generic runner-token --from-literal=runner-registration-token="TOKEN" --namespace gitlab-runner
helm repo add gitlab https://charts.gitlab.io
helm repo update
helm upgrade --install --namespace gitlab-runner gitlab-runner gitlab/gitlab-runner --version 0.6.0 -f values.yaml
Actual behavior
The pod gitlab-runner-gitlab-runner-xxxxx
does not start up correctly with the following events:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 13s default-scheduler Successfully assigned gitlab-runner/gitlab-runner-gitlab-runner-7994ccfdf6-sxggf to metakube-rj5jzdn8tl-bslbw-548dc5d7b4-j9wvd
Warning FailedMount 5s (x5 over 13s) kubelet, metakube-rj5jzdn8tl-bslbw-548dc5d7b4-j9wvd MountVolume.SetUp failed for volume "init-runner-secrets" : secrets "gitlab-runner-gitlab-runner" not found
Expected behavior
The gitlab-runner pod starts correctly without requiring a redundant configuration.
Environment description
The helm chart is used in an otherwise empty cluster on MetaKube, a managed Kubernetes platform.
Used Chart Version
0.6.0
Edited by Ghost User