Hi everybody,
i've setup a bitbucket runner that runs as job (that is not optimal, because a deployment is way better for this purpose, but the doc suggest this way and I have follow it).
We have dynamic secret inside Hashicorp Vault, so we need to authenticate against Vault using kubernetes auth that is already configured.
To achieve that, the very simple thing to do is to mount the service account token from the runner into the spawned container executed by the pipelines.
Here has started the nightmare: absolutely no way to do this.
I've tried literally everything without any result.
I've tried to copy it with an initContainer into the /tmp folder that is the WORKING_DIR, totally useless, i see a totally different content in the spawned container compared with the content of the /tmp from the runner container. It seems a sandbox that has literally nothing shared with the gitlab-runner container and this is very bad because there is zero chance of customization.
So, that said, is there any way to achieve this super easy task? Do I need to pass any extra environment variables?
Looking forward for a feedback,
Regards,
Luca
Hi Luca and welcome to the community!
If you are using Linux Docker runners, I'm afraid that it is not possible to mount custom volumes into the build container.
We have a feature request for what you are asking, you can add your vote to it to express your interest:
In the meantime, you can look into using a workspace or a repository variable to store the token.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.