WIP - Tag remaining selectors as atomic#100131
Conversation
| // It provides a subset of functionality as NodeSelectorTerm. | ||
| // This is an alpha feature and may change in the future. | ||
| // +structType=atomic | ||
| type TopologySelectorTerm struct { |
There was a problem hiding this comment.
most uses of this are in a list... should those lists be marked listType=atomic or is that the default?
There was a problem hiding this comment.
Good catch, those lists need to be marked as atomic. I'll fix.
There was a problem hiding this comment.
Actually, it should be the default. Verifying.
There was a problem hiding this comment.
From the docs: "atomic and set apply to lists with scalar elements only" (https://kubernetes.io/docs/reference/using-api/server-side-apply/).
@apelisse do you know if this is accurate?
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jpbetz The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d32f817 to
d257614
Compare
There was a problem hiding this comment.
This is covered by https://github.com/kubernetes/kubernetes/pull/97989/files#diff-5ffbebb40a29f8e491f4ff1e07c618eb3edcc0d5f00a1a71445272d6767d7883R2985 and has included tests. No need to include this in that PR.
| // controller, if empty defaulted to labels on Pod template. | ||
| // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors | ||
| // +optional | ||
| // +mapType=atomic |
| // Ignored if type is ExternalName. | ||
| // More info: https://kubernetes.io/docs/concepts/services-networking/service/ | ||
| // +optional | ||
| // +mapType=atomic |
|
@jpbetz: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. I understand the commands that are listed here. |
|
/triage accepted |
|
@jpbetz: PR needs rebase. DetailsInstructions 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. |
|
AFAIU, we can close this one now! |
|
Yep, this is superseded by the work @Jefftree is doing. Closed. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Without this change using server-side apply to change selectors can result in objects with unexpected selectors.
Based on a review of all occurrences of the term "selector" in types.go files.
TODO:
Which issue(s) this PR fixes:
Fixes ##97970
Special notes for your reviewer:
Related to #97989 but for 17 selectors found after reviewing all occurrences of the term "selector" in types.go files.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Please use the following format for linking documentation:
/sig api-machinery
/wg api-expression