-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CRD-Generator: Selectable fields #6392
Comments
@baloo42 I have created the annotations and understand the reflection logic behind the selector field annotation. However, I am having trouble integrating it with the CRD generator. Could you please guide me to any documents or resources that I can refer to for understanding the current CRD generator? if any exist? That would be very helpful. Thank you! |
The selector field annotation has not been implemented yet. The links in the description are pointing to a prototype of a CRD-Generator which is based on victools/json-schema-generator instead of Jackson/json-schema. The links are only mentioned here because it's possible to copy the test cases over to the fabric8/kubernetes-client/CRD-Generator implementation. If you need a stable CRD-Generator now, I would recommend to use the latest v6 version, at the moment v6.13.4, until v7 has been released. https://javaoperatorsdk.io/docs/features/#automatic-generation-of-crds |
Which also raises the question: can we actually perform field-selector queries using the client at this point? @manusa |
if you're talking about things like client.pods().withField("metadata.name", "the-name").withoutField("foo", "bar").list(); are perfectly possible in the client. |
Cool! Wasn't aware of that feature both in kube and in the client… 😅 |
Is your enhancement related to a problem? Please describe
CRD-Generator should support selectable fields:
https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#crd-selectable-fields
Describe the solution you'd like
CRD-Generator should support it similar to
@AdditionalPrinterColumn
/@PrinterColumn
Annotations:
Describe alternatives you've considered
No response
Additional context
Example Approval Test:
https://github.com/baloo42/crd-generator-victools/tree/main/test/src/test/java/io/fabric8/crd/generator/victools/approvaltests/selectablefield
https://github.com/baloo42/crd-generator-victools/blob/main/test/src/test/resources/io/fabric8/crd/generator/victools/approvaltests/CRDGeneratorVictoolsApprovalTest.approvalTest.selectablefields.samples.fabric8.io.v1.approved.yml
Relates to: #6390
The text was updated successfully, but these errors were encountered: