You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the upgrade to controller-tools@v2 for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically spec.metadata.creationTimestamp in body must be of type string: "null". The investigation showed that controller-tools@v2 behaves differently than its previous version when handling types from metav1(k8s.io/apimachinery/pkg/apis/meta/v1) package.
In more details, we found that embedded (non-top level) types that embedded metav1.ObjectMeta had validation properties, including for creationTimestamp (metav1.Time). The metav1.Time type specifies a custom json marshaller that, when IsZero() is true, returns null which breaks validation because the field isn't marked as nullable.
The text was updated successfully, but these errors were encountered:
https://pkg.go.dev/sigs.k8s.io/cluster-api/api/v1alpha2#Convert_v1alpha2_ClusterStatus_To_v1alpha3_ClusterStatus
During the upgrade to controller-tools@v2 for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically
spec.metadata.creationTimestamp in body must be of type string: "null"
. The investigation showed thatcontroller-tools@v2
behaves differently than its previous version when handling types from metav1(k8s.io/apimachinery/pkg/apis/meta/v1) package.In more details, we found that embedded (non-top level) types that embedded
metav1.ObjectMeta
had validation properties, including forcreationTimestamp
(metav1.Time). Themetav1.Time
type specifies a custom json marshaller that, when IsZero() is true, returnsnull
which breaks validation because the field isn't marked as nullable.The text was updated successfully, but these errors were encountered: