controller-gen is not consistently picking up kubebuilder:default marker #967
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
On controller-gen v0.13.0, I am observing that some types (I can't quite put my finger on it) don't have
kubebuilder:default
marker set to default the object to empty object ({}
) honored.I have a fairly simple repro below that sets
//+kubebuilder:default:={}
on the root level object'sstatus
field.type Car struct { ...
The generated CRD does not have a
status
field that has adefault: {}
field:generated CRD
It's deterministic behavior, but I can't tell why the exact some marker on exact same field works on some types and not the others. 😭 Another type I have actually gets
spec.validation.openAPIV3Schema.properties[status].default
field populated./kind bug
/lifecycle frozen
The text was updated successfully, but these errors were encountered: