GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
15.08k stars 1.63k forks source link

Pass docker.secrets using skaffold init #9095

Open joshtemple opened 1 year ago

joshtemple commented 1 year ago

Is it possible to pass docker.secrets as part of the --artifact payload into the generated YAML file when using skaffold init?

I was hoping something like this would work, but the payload keys don't seem to match the Skaffold config file keys.

skaffold init \
    --artifact '{"image":"run","builder":"Docker","payload":{"path":"Dockerfile","secrets":[{"id":"google_application_credentials","src":"/Users/josh/.config/gcloud/application_default_credentials.json"}]}}'
    --kubernetes-manifest pods_and_services.yaml
    --filename skaffold.yaml
    --force

The keys allowed in the JSON payload don't seem to be well-documented.

For more context, I'm trying to understand how to pass build-time secrets using Cloud Code VSCode plugin: https://github.com/GoogleCloudPlatform/cloud-code-vscode/issues/848

michaelk-kipnis commented 6 months ago

Hey @joshtemple,

Were you able to overcome the issue? I have a similar issue.

Thanks, Michael.

joshtemple commented 6 months ago

I wasn't able to. Hoping the maintainers can suggest a solution.