Skip to content
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

Users should be able to pass environment variables to Kustomize #9165

Closed
crenshaw-dev opened this issue Apr 21, 2022 · 3 comments
Closed

Users should be able to pass environment variables to Kustomize #9165

crenshaw-dev opened this issue Apr 21, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@crenshaw-dev
Copy link
Member

Summary

The user should be able to specify environment variables to be passed to Kustomize. Plugins enable this via the spec.source.plugins.env field.

Motivation

Kustomize has some interesting features that rely on reading environment variables.

@jannfis pointed out on another issue that this could be useful.

Proposal

We could add a env field to the kustomize source. We'd want to either blocklist certain env vars (e.g. GIT_ vars) or prefix all env vars for security.

@crenshaw-dev crenshaw-dev added the enhancement New feature or request label Apr 21, 2022
@SelfhostedPro
Copy link

The main thing I'm using in the interesting features link above is using a configmap generator from a file and not defining a value for the variable.

In the example from the documentation link above, the application.properties file would look like the following:

FOO

@maheshbaliga
Copy link
Contributor

Hi @crenshaw-dev, I picked up this issue to work on and came across a Kustomize PR, which mentions that loading of the env variable when only the key is mentioned in the properties file, is a bug. It might be removed in the next major version too.

Do you have another approach in mind?

@crenshaw-dev
Copy link
Member Author

Looks like the feature was removed. I think we won't be doing this. kubernetes/website#35669 (comment)

@crenshaw-dev crenshaw-dev closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants