-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
dynamic resource allocation: avoid apiserver complaint about list content #115354
dynamic resource allocation: avoid apiserver complaint about list content #115354
Conversation
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
…tent This fixes the following warning (error?) in the apiserver: E0126 18:10:38.665239 16370 fieldmanager.go:210] "[SHOULD NOT HAPPEN] failed to update managedFields" err="failed to convert new object (test/claim-84; resource.k8s.io/v1alpha1, Kind=ResourceClaim) to smd typed: .status.reservedFor: element 0: associative list without keys has an element that's a map type" VersionKind="/, Kind=" namespace="test" name="claim-84" The root cause is the same as in e50e8a0: nothing in Kubernetes outright complains about a list of items where the item type is comparable in Go, but not a simple type. This nonetheless isn't supposed to be done in the API and can causes problems elsewhere. For the ReservedFor field, everything seems to work okay except for the warning. However, it's better to follow conventions and use a map. This is possible in this case because UID is guaranteed to be a unique key. Validation is now stricter than before, which is a good thing: previously, two entries with the same UID were allowed as long as some other field was different, which wasn't a situation that should have been allowed.
28b8af8
to
508cd60
Compare
/test pull-kubernetes-kind-dra |
kubernetes/kubernetes#115354 made some change to the resource.k8s.io API group and didn't trigger the optional job.
LGTM, from issue #115330 perspective. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, pohly The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM label has been added. Git tree hash: 0a46ccf6b42de91f4431f2923cfb24bdf2d64787
|
I would consider a backport to 1.26 just to avoid propagating the invalid schema, even though it's an alpha schema |
Okay, I'll cherry-pick once it's merged. |
/triage accepted |
…4-origin-release-1.26 Automated cherry pick of #115354: dynamic resource allocation: avoid apiserver complaint about
What type of PR is this?
/kind bug
What this PR does / why we need it:
This fixes the following warning (error?) in the apiserver:
The root cause is the same as in e50e8a0: nothing in Kubernetes outright complains about a list of items where the item type is comparable in Go, but not a simple type. This nonetheless isn't supposed to be done in the API and can causes problems elsewhere.
For the ReservedFor field, everything seems to work okay except for the warning. However, it's better to follow conventions and use a map. This is possible in this case because UID is guaranteed to be a unique key.
Which issue(s) this PR fixes:
Fixes #115330
Special notes for your reviewer:
Does this PR introduce a user-facing change?