-
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
Fix upgrade issue from 1.6 to 1.7 when PreferredDuringSchedulingIgnoredDuringExecution pod anti affinity is used without topology key. #49735
Conversation
…edDuringExecution pod anti affinity is used without topology key. Fixes issue: kubernetes#49492
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aveshagarwal Assign the PR to them by writing Associated issue: 49492 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
This PR is not for the master branch but does not have the |
This code is already removed from master branch as part of affinity in annotation clean up. |
@aveshagarwal Sorry I'm still a little confused. I thought we do not handle empty TopologyKey in the scheduler anymore. So why is it safe to remove this check? |
@davidopp I think the confusion is that in kubernetes master branch (1.8), the behavior has been reverted to what we had in 1.6 in this PR (#47869) that means in 1.8, we again allow empty topology key for soft pod anti-affinity (https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2486). Anyway if the goal is to not allow empty topology key for all 4 pod affinities, then I think we can close this PR and the issue saying this is working as expected. And I can send a PR to fix 1.8 to avoid regressing 1.8. |
@aveshagarwal My understanding is that #47869 was not meant to be the final implementation. It was just a PR to cleanup the old logic with the plan that we will add the code to disallow empty TopologyKey. |
What this PR does / why we need it:
Fixes issue: #49492
The upgrade issue happens when using anti affinity in pod spec field or in annotations.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Fixes : #49492
Special notes for your reviewer:
Release note:
@kubernetes/sig-scheduling-bugs @davidopp @bsalamat