Change order of scripts in entrypoint to allow use of precreated secrets
At present, https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/templates/configmap.yaml#L73-85 has order
# Register the runner
# Run pre-entrypoint-script
# Start the runner
but if we could have
# Run pre-entrypoint-script
# Register the runner
# Start the runner
This would allow us to handle issues like https://1password.community/discussion/128713/secret-with-empty-value-field where, we could use pre-entrypoint-script
to set/ unset certain environment variables cleanly.
As of now, I get
Merging configuration from template file "/configmaps/config.template.toml"
Token specified trying to verify runner...
WARNING: If you want to register use the '-r' instead of '-t'.
ERROR: Verifying runner... is removed runner=""
PANIC: Failed to verify the runner. You may be having network problems.
error in pods.