Skip to content

skaffold.env does not respect system envs #9796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Aaur1s opened this issue Apr 20, 2025 · 2 comments
Open

skaffold.env does not respect system envs #9796

Aaur1s opened this issue Apr 20, 2025 · 2 comments

Comments

@Aaur1s
Copy link

Aaur1s commented Apr 20, 2025

When using skaffold.env like this:

DOCKER_REGISTRY_ADDRESS=docker.aaur1s.dev
SKAFFOLD_DEFAULT_REPO=$DOCKER_REGISTRY_ADDRESS/portaler-backend

skaffold uses DOCKER_REGISTRY_ADDRESS from file, despite DOCKER_REGISTRY_ADDRESS being set in system envs. SKAFFOLD_DEFAULT_REPO however works just fine.

OS: Windows 11
Skaffold: v2.13.2

@bhardwick
Copy link

My understanding is that Skaffold uses its own environment and so the only way to pass variables to Skaffold is either through skaffold.env or by using a command prefix like this:

MY_VAR=foo skaffold dev

Skaffold will not see the values from your native environment.

@Aaur1s
Copy link
Author

Aaur1s commented Apr 25, 2025

If SKAFFOLD_DEFAULT_REPO is set in system environment it's overwriting one in skaffold.env, but this logic doesn't work with non-skaffold defined env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants