GitLab Runner on Kubernetes: FATAL error and registration issues using runnerToken
I'm attempting to deploy a GitLab Runner on an on-premise Kubernetes cluster. I've follow a tuto which is using the deprecated runnerRegistrationToken to runnerToken in my Helm values.yaml file. the pod fails to register correctly with GitLab, and I'm seeing a series of warnings and fatal errors in the logs. Maybe It's just a missing thing in my process.
Environment Kubernetes version:
Client Version: v1.28.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.26.6
WARNING: version difference between client (1.28) and server (1.26) exceeds the supported minor version skew of +/-1
Helm version:
version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}
GitLab Runner image: gitlab-runner:latest
Here's a snippet from my Helm values.yaml:
image:
registry: gitlab
image: gitlab-runner
tag: latest
imagePullPolicy: IfNotPresent
gitlabUrl: https://gitlab.labo.bi/
runnerToken: "glrt-p_SWoo...VGHVUp-gey"
Steps to Reproduce Created a new runner and obtained its token (glrt-p_SWoo...VGHVUp-gey). Updated the values.yaml file with the new runnerToken. Deployed the runner using Helm. Log Output The pod logs show repeated registration attempts and warnings, with a fatal error at the end of each attempt:
┌───────────────────────────────────────────────────────────────── Logs(gitlab/gitlab-runner-8675f5f54c-kb2zr:gitlab-runner)[all] ──────────────────────────────────────────────────────────────────┐
│ Autoscroll:Off FullScreen:Off Timestamps:Off Wrap:Off │
│ │
│ Registration attempt 1 of 30 │
│ Runtime platform arch=amd64 os=linux pid=14 revision=8ec04662 version=16.3.0 │
│ WARNING: Running in user-mode. │
│ WARNING: The user-mode requires you to manually start builds processing: │
│ WARNING: $ gitlab-runner run │
│ WARNING: Use sudo for system-mode: │
│ WARNING: $ sudo gitlab-runner... │
│ │
│ Created missing unique system ID system_id=r_bmI8kPG86S73 │
│ WARNING: Couldn't save new system ID on state file. In order to reliably identify this runner in jobs with a known identifier, │
│ please ensure there is a text file at the location specified in `state_file` with the contents of `system_id`. Example: echo "r_bmI8kPG86S73" > "/nonexistent/.gitlab-runner/.runner_system_id" │
│ state_file=/nonexistent/.gitlab-runner/.runner_system_id system_id=r_bmI8kPG86S73 │
│ Merging configuration from template file "/configmaps/config.template.toml" │
│ FATAL: Runner configuration other than name and executor configuration is reserved (specifically --locked, --access-level, --run-untagged, --maximum-timeout, --paused, --tag-list, and --mainten │
│ Registration attempt 2 of 30 │
│ Runtime platform arch=amd64 os=linux pid=36 revision=8ec04662 version=16.3.0 │
│ WARNING: Running in user-mode. │
│ WARNING: The user-mode requires you to manually start builds processing: │
│ WARNING: $ gitlab-runner run │
│ WARNING: Use sudo for system-mode: │
│ WARNING: $ sudo gitlab-runner... │
│ │
│ Created missing unique system ID system_id=r_wLdCXBp5nrat │
│ WARNING: Couldn't save new system ID on state file. In order to reliably identify this runner in jobs with a known identifier, │
│ please ensure there is a text file at the location specified in `state_file` with the contents of `system_id`. Example: echo "r_wLdCXBp5nrat" > "/nonexistent/.gitlab-runner/.runner_system_id" │
│ state_file=/nonexistent/.gitlab-runner/.runner_system_id system_id=r_wLdCXBp5nrat │
│ Merging configuration from template file "/configmaps/config.template.toml" │
│ FATAL: Runner configuration other than name and executor configuration is reserved (specifically --locked, --access-level, --run-untagged, --maximum-timeout, --paused, --tag-list, and --mainten │
│ Registration attempt 3 of 30 │
│ Runtime platform arch=amd64 os=linux pid=59 revision=8ec04662 version=16.3.0 │
│ WARNING: Running in user-mode. │
│ WARNING: The user-mode requires you to manually start builds processing: │
│ WARNING: $ gitlab-runner run │
│ WARNING: Use sudo for system-mode: │
│ WARNING: $ sudo gitlab-runner... │
│ │
│ Created missing unique system ID system_id=r_kWqxyle5J6OE │
│ WARNING: Couldn't save new system ID on state file. In order to reliably identify this runner in jobs with a known identifier, │
│ please ensure there is a text file at the location specified in `state_file` with the contents of `system_id`. Example: echo "r_kWqxyle5J6OE" > "/nonexistent/.gitlab-runner/.runner_system_id" │
│ state_file=/nonexistent/.gitlab-runner/.runner_system_id system_id=r_kWqxyle5J6OE │
│ Merging configuration from template file "/configmaps/config.template.toml" │
│ FATAL: Runner configuration other than name and executor configuration is reserved (specifically --locked, --access-level, --run-untagged, --maximum-timeout, --paused, --tag-list, and --mainten │
│ │
│ │
│ │
│ │
│ │
│ │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
<pod> <logs>
Expected Behavior I expect the runner to register successfully with GitLab and to be able to execute CI/CD pipelines.
Actual Behavior The runner is not registering correctly, and the pod logs are filled with warnings and fatal errors.
Any insights is greatly appreciate. Thank you!