Skip to content

found bug when setting service account but not bearer token

David Schile requested to merge bajacondor/gitlab-runner:bearer-token into master

Hello @nolith, I discovered a small issue with the bearerToken overwrite when using a custom service account and not setting a bearer_token. Adding this check for len(overwrites.bearerToken) fixes the issue.

Expected Behavior:

Not setting a BEARER_TOKEN_OVERWRITE job variable and setting serviceAccount for the gitlab-runner pod should spawn worker pods with the credential of the kubernetes serviceaccount specified

Actual Behavior:

Jobs fail with a kubernetes api permissions error because the empty string bearer token is being used as the credential to make the initial token secret.

This is related to !744 (merged)

Thank you. David

Closes #2974 (closed)

Edited by Alessio Caiazza

Merge request reports