-
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
Env variable not added to multiple deployments with /- in the path if there is no other env variable defined before #5650
Comments
This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Just to clarify the issue, this happens because the
I don't see an issue in us appending the env variable directly if none is specified. But it needs investigation on whether it can be implemented in Kustomize. |
/assign @garomonegro |
@varshaprasad96: GitHub didn't allow me to assign the following users: garomonegro. Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign |
What happened?
When trying to add env variables to several Kubernetes Deployments at the same time, it failed because one of the Deployments manifest didn't have environment variables defined before. Using '/-' don't add it if there are no envs defined in advance, instead it throws the error:
doc is missing path: "/spec/template/spec/containers/0/env/-": missing value
What did you expect to happen?
I expect that, if an item, an env variable in this case, doesn't exist and I end the path with '/-', that it's actually appended at the end. At the end of none, should be the first and only env variable in there.
How can we reproduce it (as minimally and precisely as possible)?
Expected output
Actual output
Kustomize version
v5.0.4-0.20230601165947-6ce0bf390ce3
Operating system
MacOS
The text was updated successfully, but these errors were encountered: