Environment variable support for docker build secrets

463 views
Skip to first unread message

Noah Brenowitz

unread,
Oct 28, 2020, 4:15:30 PM10/28/20
to skaffold-users
My team needs to use skaffold in several contexts (e.g. CI and local development), which means that I cannot simply hardcode the local path in build.artifacts.docker.secret.src. Is there a workaround to this. For instance, could I solve my problem by passing an environmental variable to build.artifacts.docker.secret.src?

Also, is it possible to support several secrets?

Best,
Noah

Brian de Alwis

unread,
Oct 29, 2020, 11:16:43 AM10/29/20
to Noah Brenowitz, skaffold-users
Hi Noah.  

Skaffold's profiles allow replacing the value, and they can be automatically enabled based on environment variables.  That will work if your environment paths are fixed.  It's not great otherwise.

Can you please open a bug re: multiple secrets?  This was an oversight: it's not clear from the docs that multiple `--secret` args are supported.

Brian.

Brian.

--
You received this message because you are subscribed to the Google Groups "skaffold-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skaffold-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skaffold-users/0e3c0feb-0458-4014-8eda-c86036d18df1n%40googlegroups.com.

Naveena Barani Sankar

unread,
Jan 20, 2022, 3:25:25 AM1/20/22
to skaffold-users
Hello Skaffold members

can you share us a sample of how we can pass secret in skaffold.yaml file .
we are currently running skaffold as a container from Jenkins.

Regards

Brian de Alwis

unread,
Jan 22, 2022, 9:20:40 AM1/22/22
to Naveena Barani Sankar, skaffold-users
Hi Naveena.

[For some reason many of the messages to skaffold-users end up being flagged as spam, yours included.]

I wrote up an answer on secrets with skaffold on StackOverflow a while back (https://stackoverflow.com/a/67807538).

None of the Skaffold team have expertise in using Jenkins. But Jenkins is really just a Linux environment, so it helps to include detailed logs of what you’re seeing (suitably redacted)!

Brian.


On Jan 20, 2022, at 3:25 AM, Naveena Barani Sankar <navin...@gmail.com> wrote:

Hello Skaffold members
Reply all
Reply to author
Forward
0 new messages