You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CRD-Generator should support it similar to @AdditionalPrinterColumn / @PrinterColumn
Annotations:
/** * Marks a field as selectable. * * @see <a href= * "https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-selectors">Kubernetes * Docs - Field Selectors</a> */@Target({ ElementType.FIELD, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface SelectableField {
}
/** * Defines a selectable field. Must be placed at the root of the * custom resource. * * @see <a href= * "https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-selectors">Kubernetes * Docs - Field Selectors</a> */@Target({ ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Repeatable(AdditionalSelectableField.List.class)
public @interface AdditionalSelectableField {
/** * The JSON Path to the field. * * @return the JSON path */StringjsonPath();
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@interface List {
AdditionalSelectableField[] value();
}
}
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: