kubernetes-client
kubernetes-client copied to clipboard
Mark crd spec as required
When extending CustomResource I would like to mark the spec as required. The NotNull annotation however only seems to work on fields, and not methods, so this does not seem possible.
cc @metacosm
Damn! 😓
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!
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!
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!
Hi @metacosm, @shawkins,
Was this already fixed? is it still applicable?
No, this hasn't been fixed but not sure how important it is
No, this hasn't been fixed but not sure how important it is
It's just a nice to have for completeness.
We could put the @NotNull annotation on the spec field of CustomResource, though that might be a little heavy-handed…
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!
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!
Regarding version 7.0, one of the ideas is to completely remove CustomResource class in favor of specific interfaces for HasSpec, HasStatus, and so on (#2829 comment).
I'm not sure how this issue might play in conjunction with these interfaces.
Thoughts?
I guess having something implements the HasSpec interface would need to trigger the required clause on the spec. Same thing for HasStatus.