-
Notifications
You must be signed in to change notification settings - Fork 39.1k
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 admits Deployment with duplicate volumes then fails when renaming duplicate #78266
Comments
/sig cli |
I tried to investigate a little bit as well since I had the same issue. I used your reproduction gitrepo. I get this when I apply for the first time to good.yaml:
This looks fine! When I apply the
Which seems weird because I get a 200 but the response body doesn't contain the volume using the ConfigMap named If I just try to apply the
Which leads to the fact that most likely the problem occurs when we do update of a Resource(I only tested with your repo, so in this case Deployment). I defined some tests to find out if the validator is working correctly, and I couldn't find any problem there.
After this I tried to find if there is a problem in the ValidatePodSpec function using the following test in order to get the output of the function:
And there I get:
which is correct. So as far as I can see, there is no problem at the validator. My idea now is that the object might reach the BeforeUpdate function "corrupted". Unfortunately, I don't have much experience of the codebase so this was what I could get after some time of debugging. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. 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. |
What happened:
kubectl apply
allows Deployments with volumes with the samename
to be created. If the duplicate volume is then removed through a subsequentkubectl apply
, this fails with an error.What you expected to happen:
kubectly apply
should reject the Deployment with duplicate volume names.How to reproduce it (as minimally and precisely as possible):
I've created a repo that has a full reproduction: https://github.com/dfjones/kubectl-apply-volume-bug
Environment:
kubectl version
):self hosted
The text was updated successfully, but these errors were encountered: