fix: add --url parameter for registration command
What does this MR do?
Transfers the value of $.Values.gitlabUrl
as value for the --url
parameter.
Why was this MR needed?
In our setup, we get a verification error when running the registration command without this parameter.
What's the best way to test this MR?
git clone git@gitlab.com:oliverbaehler/gitlab-runner.git && cd gitlab-runner
# With URL set
helm template . --set gitlabUrl=https://company.git | yq '. | select(.kind == "ConfigMap") | .data.register-the-runner'
#!/bin/bash
MAX_REGISTER_ATTEMPTS=30
for i in $(seq 1 "${MAX_REGISTER_ATTEMPTS}"); do
echo "Registration attempt ${i} of ${MAX_REGISTER_ATTEMPTS}"
/entrypoint register \
--template-config /configmaps/config.template.toml \
--url "https://company.git" \
--non-interactive
retval=$?
if [ ${retval} = 0 ]; then
break
elif [ ${i} = ${MAX_REGISTER_ATTEMPTS} ]; then
exit 1
fi
sleep 5
done
exit 0
## Without URL
helm template . | yq '. | select(.kind == "ConfigMap") | .data.register-the-runner'
#!/bin/bash
MAX_REGISTER_ATTEMPTS=30
for i in $(seq 1 "${MAX_REGISTER_ATTEMPTS}"); do
echo "Registration attempt ${i} of ${MAX_REGISTER_ATTEMPTS}"
/entrypoint register \
--template-config /configmaps/config.template.toml \
--non-interactive
retval=$?
if [ ${retval} = 0 ]; then
break
elif [ ${i} = ${MAX_REGISTER_ATTEMPTS} ]; then
exit 1
fi
sleep 5
done
exit 0
What are the relevant issue numbers?
See comments #436 (closed)