controller-tools
controller-tools copied to clipboard
Add `creationTimestamp` to the allow-listed set of properties of embedded ObjectMeta to prevent API warnings
The absence of creationTimestamp in the generated embedded ObjectMeta in the CRD is causing API Warnings, as the field CreationTimestamp cannot be unset and defaults to null. In order to prevent such warnings, it would be nice to add the creationTimestamp to the allow-listed set of properties of ObjectMeta (https://github.com/kubernetes-sigs/controller-tools/blob/main/pkg/crd/known_types.go#L107).
Example warning:
"logger":"operator.KubeAPIWarningLogger","message":"unknown field \"spec.template.metadata.creationTimestamp\""
Additionally, it could be required that if the creationTimestamp field is specified, the value must be null.