-
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 the inconsistent description of TopologyKey in PodAffinityTerm #54797
fix the inconsistent description of TopologyKey in PodAffinityTerm #54797
Conversation
/ok-to-test |
/retest |
2b8fc20
to
350bec6
Compare
/retest |
350bec6
to
d112a81
Compare
/assign @aveshagarwal |
/test pull-kubernetes-verify |
d112a81
to
b7e3a22
Compare
/retest |
b7e3a22
to
2d6703e
Compare
/test pull-kubernetes-unit |
2d6703e
to
376d2a2
Compare
all tests are green. |
// For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" | ||
// ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); | ||
// for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. | ||
// Empty topologyKey is not allowed. | ||
// +optional | ||
TopologyKey string `json:"topologyKey,omitempty" protobuf:"bytes,3,opt,name=topologyKey"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you need to remove omitempty too unless there is a default value assigned. could you check it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, i didn't realize that point,thanks.
376d2a2
to
c623334
Compare
@aveshagarwal ptal. |
kindly ping @caesarxuchao @aveshagarwal |
lgtm. |
@smarterclayton @liggitt |
// For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" | ||
// ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); | ||
// for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. | ||
// Empty topologyKey is not allowed. | ||
// +optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the +optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise lgtm.
hi @caesarxuchao do you fully sure this field is Mandatory? A little confusing that in our internal api type definition, topologyKey is still optional. |
In all validation cases I could find, an API object that leaves it empty fails validation. I'm tentatively ok with this, assuming due diligence to sweep all places this field is used/validated to ensure this isn't tightening validation on any persisted objects |
c623334
to
3297c05
Compare
thanks @liggitt hmm, do you mean in this PR we could remove the |
3297c05
to
a301d2b
Compare
a301d2b
to
0bb376e
Compare
/retest |
@caesarxuchao @aveshagarwal @liggitt PTAL. thanks. |
Sgtm |
Any comments for this PR? @liggitt @aveshagarwal @caesarxuchao @xiangpengzhao |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aveshagarwal, guangxuli, liggitt Associated issue: 54276 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 |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Clarify the confusing of inconsistent description.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Just fix #54276
Special notes for your reviewer:
Release note: