kubernetes-client
kubernetes-client copied to clipboard
[crd-gen] Possibility to add extra information to fields
Is your enhancement related to a problem? Please describe
The most self-explanatory example is the type format hint allowed in the CRD such as:
weight:
description: weight associated with matching
the corresponding podAffinityTerm, in the
range 1-100.
format: int32
type: integer
Currently the generator emits only the type information and we don't have, at best of my knowledge, any way to express a specific format.
I'm opening this ticket more widely in the hope that we can agree on a solution that will cover additional use-cases:
x-kubernetes-list-typepatternformatdefaultnullable- ...
but I'm open to evaluate specific solutions (e.g. one per missing property).
Describe the solution you'd like
A possible solution, again, is a new custom annotation, even if some of those fields might be extracted more automagically by the generator (e.g. nullable and default).
Describe alternatives you've considered
No response
Additional context
cc. @metacosm
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!
+1
Is this still applicable? Is there still interest on this?
Someone was asking for something similar on SO recently: https://stackoverflow.com/questions/78028591/fabric8-crd-generator-is-it-possible-to-generate-crd-yaml-with-x-kubernetes-va
I think it's still compelling, but let see ...
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!