CustomResource
derive injects empty defaults for unset fields
#1680
Labels
bug
Something isn't working
derive
kube-derive proc_macro related
help wanted
Not immediately prioritised, please help!
Current and expected behavior
A kube derived CRD spec using say;
injects the following
.spec
properties (outside the schema):in particular
.spec.names.categories
and.spec.names.shortNames
and.spec.versions[].additionalPrinterColumn
are set even without us explicitly setting the corresponding kube attributes for printcolumn, shortname, nor category.This is a violation of the spec for CRDs;
.spec.names
.spec.versions[]
Possible solution
Only emit these vectors when they are non-empty. If there are no values in our internal code we have never called any of the attributes and so they should be treated as unset rather than explicit empty.
Additional context
See #1678
Affected crates
kube-derive
Would you like to work on fixing this bug?
maybe
The text was updated successfully, but these errors were encountered: