-
Notifications
You must be signed in to change notification settings - Fork 1.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
Unstructured client's List
does not propagate GVK to items
#2171
Comments
Probably an oversight that needs to be fixed, yes. Could we add a few test cases though to capture the error first? It'd be good to have tests for a custom resource and core one |
Not a problem, if you provide a bit more information about the precise error (trigger) you would like to see captured. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". 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. |
The
List
method does prepare thegvk
to an "unsafe guess that doen't actually work, but matches ~99% of the cases out there", but this is never actually being put to use:controller-runtime/pkg/client/unstructured_client.go
Lines 207 to 208 in 10a0272
Which does seem to be a left-over from changes in #812, which also mentions:
However, given that for
metav1.PartialObjectMetadataList
the GVK is later restored in the wrapping client:controller-runtime/pkg/client/client.go
Lines 372 to 383 in 4fd4f6e
I am wondering if the same approach could be taken for the
unstructured.UnstructuredList
, as this would ease consumption in ~99% of the cases. If agreed on, I am happy to submit a PR.The text was updated successfully, but these errors were encountered: