Gitlab runner chart `0.59.0` drops all runner tags when using the old registration token
What
See change 185a8879,
unset RUNNER_TAG_LIST
unset REGISTER_LOCKED
Are always added when using a Gitlab registration token (not the new runner token). This causes the runner to be registered without any tags.
Steps to reproduce
Prepare
helm repo add gitlab https://charts.gitlab.io
helm repo update gitlab
0.58.2
)
Render old chart (helm template gitlab/gitlab-runner --version 0.58.2 --set runnerRegistrationToken=foo | grep -C 3 -i UNSET
#!/bin/bash
MAX_REGISTER_ATTEMPTS=30
# Reset/unset the not needed flags when an authentication token
RUN_UNTAGGED=""
ACCESS_LEVEL=""
if [ ! -z "$REGISTRATION_TOKEN" ] && [ "${REGISTRATION_TOKEN#glrt-}" != "$REGISTRATION_TOKEN" ]; then
RUN_UNTAGGED=""
ACCESS_LEVEL=""
unset REGISTER_LOCKED
unset RUNNER_TAG_LIST
fi
for i in $(seq 1 "${MAX_REGISTER_ATTEMPTS}"); do
We can see that RUNNER_TAG_LIST
is only unset if REGISTRATION_TOKEN
starts with glrt
, which means it's a new runner token, not the old reg token.
0.59.0
)
Render new chart ( helm template gitlab/gitlab-runner --version 0.59.0 --set runnerRegistrationToken=foo | grep -C 3 -i UNSET
#!/bin/bash
MAX_REGISTER_ATTEMPTS=30
# Reset/unset the not needed flags when an authentication token
RUN_UNTAGGED=""
ACCESS_LEVEL=""
RUN_UNTAGGED=""
ACCESS_LEVEL=""
unset REGISTER_LOCKED
unset RUNNER_TAG_LIST
for i in $(seq 1 "${MAX_REGISTER_ATTEMPTS}"); do
echo "Registration attempt ${i} of ${MAX_REGISTER_ATTEMPTS}"
We can see that RUNNER_TAG_LIST
and REGISTER_LOCKED
are always unset.
Impact
The new chart 0.59.0
is unusable for any users with old registration token and requires tagging their runners.
Note
I understand that the runner reg token is being deprecated, but it's only being removed in Gitlab 18.0, it's not good that gitlab runner drops support today.
Edited by Joseph Zhang