Kubebuilder will deduce the optional attribute from the JSON annotations, if unspecified. Add all the missing omitempty JSON annotations for truly optional fields, which is the right choice in 99% of the cases anyway. Also add some missing default annotations along the way.
Overall, this brings the CRDs more in sync to what k0s actually expects at runtime, while omitting the rendering of useless zero values in JSON/ YAML representations.
Convert the config in k0s config create to unstructured to be able to tweak the actual YAML. Remove the creationTimestamp from the output. Remove all the parts from the docs that don't show up in reality.
See:
2909
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
How Has This Been Tested?
[ ] Manual test
[ ] Auto test added
Checklist:
[x] My code follows the style guidelines of this project
Description
Kubebuilder will deduce the optional attribute from the JSON annotations, if unspecified. Add all the missing omitempty JSON annotations for truly optional fields, which is the right choice in 99% of the cases anyway. Also add some missing default annotations along the way.
Overall, this brings the CRDs more in sync to what k0s actually expects at runtime, while omitting the rendering of useless zero values in JSON/ YAML representations.
Convert the config in
k0s config create
to unstructured to be able to tweak the actual YAML. Remove the creationTimestamp from the output. Remove all the parts from the docs that don't show up in reality.See:
2909
Type of change
How Has This Been Tested?
Checklist: