-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
KRM functions are behaving differently for exec and container functions #5371
Comments
Thanks @xvzf! |
/assign @varshaprasad96 |
@varshaprasad96 can you consider re-opening my PR? Happy to work on it :) |
Hello @xvzf, I was investigating this feature to check if there will ever be a scenario where the env var and input argument (through the annotation) be the same. In this case, looks like any argument cannot be passed from the annotation itself because of an implementation detail. To elaborate what I mean: Consider the scenario where generator looks like:
In this case, kustomize build will error with: kustomize/kyaml/runfn/runfn.go Line 211 in 0122aa8
kustomize/kyaml/fn/runtime/exec/exec.go Line 37 in 0122aa8
Thanks for working on the PR. I don't have permissions to re-open it. Probably @natasha41575 / @koba1t can? If not, you can open a new one and reference the issue. |
Thanks @varshaprasad96 |
/triage accepted |
What happened?
The -e ENV_VAR=VALUE flag is exposed to container KRM functions as an environment variable, while it is dropped for exec-based functions.
What did you expect to happen?
Container and Exec KRM functions behave the same
How can we reproduce it (as minimally and precisely as possible)?
Here's a repository with the full configuration and example commands to replicate this: https://github.com/xvzf/kustomize-krm-script-example
Expected output
See repo above
Actual output
See repo above
Kustomize version
5.1.1
Operating system
None
The text was updated successfully, but these errors were encountered: