Skip to content
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-gen] Possibility to add extra information to fields #3768

Closed
andreaTP opened this issue Jan 19, 2022 · 5 comments
Closed

[crd-gen] Possibility to add extra information to fields #3768

andreaTP opened this issue Jan 19, 2022 · 5 comments
Labels
component/crd-generator Related to the CRD generator status/stale Waiting on feedback Issues that require feedback from User/Other community members

Comments

@andreaTP
Copy link
Member

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-type
  • pattern
  • format
  • default
  • nullable
  • ...

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

@manusa manusa added the component/crd-generator Related to the CRD generator label Jan 27, 2022
@stale
Copy link

stale bot commented Apr 27, 2022

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!

@stale stale bot added the status/stale label Apr 27, 2022
@stale stale bot closed this as completed May 4, 2022
@maruiz93
Copy link

+1

@manusa
Copy link
Member

manusa commented Mar 7, 2024

Is this still applicable? Is there still interest on this?

@manusa manusa added Waiting on feedback Issues that require feedback from User/Other community members and removed status/never-stale labels Mar 7, 2024
@andreaTP
Copy link
Member Author

andreaTP commented Mar 7, 2024

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 ...

Copy link

stale bot commented Jun 13, 2024

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!

@stale stale bot added the status/stale label Jun 13, 2024
@stale stale bot closed this as completed Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/crd-generator Related to the CRD generator status/stale Waiting on feedback Issues that require feedback from User/Other community members
Projects
None yet
Development

No branches or pull requests

4 participants