-
Notifications
You must be signed in to change notification settings - Fork 40k
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
kubectl apply results in incorrect/corrupted config if a fieldRef env var is added #26229
Comments
cc @kubernetes/kubectl |
@ghodss Output of kubectl version and dump of the patch request please. |
@ghodss also could you tell me how you you create the original source? I tried to reproduce this issue on HEAD but just failed. Below are steps to reproduce:
here the
after apply the
Also just as @bgrant0607 said, could you provide the dump of the patch request? |
@adohe I'm not sure what happened but I think maybe with YAML it doesn't reproduce - I just re-did the test and edited the issue to include JSON examples and now it reproduces consistently, both on 1.2.0 and on HEAD. Also, it turns out you don't have to modify EXAMPLE_VAR, but it does have to be present. Can you try to reproduce again? |
@bgrant0607 Added the patch request. Looks like kubectl isn't sending the new POD_NAMESPACE var. |
@ghodss sure, I will try to reproduce this again. |
Could this be related to #25585? |
@ghodss @bgrant0607 I believe this is the same as #25585. This should be fixed #26418 is landed on HEAD. |
Thanks @adohe! |
Happens on both 1.2.0 and HEAD (69b9002).
Notice that POD_NAMESPACE is missing in the spec, but is present in last-applied-configuration. Also, EXAMPLE_VAR must be present for this bug to reproduce.
This is a pretty severe issue IMO and ideally would be fixed in a 1.2.x point release (as well as 1.3) - we ended up with corrupted data because of it because we were referring to $(POD_NAMESPACE) in one env var which successfully was modified, but the POD_NAMESPACE didn't get added.
The text was updated successfully, but these errors were encountered: