@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
3
3
kind : CustomResourceDefinition
4
4
metadata :
5
5
annotations :
6
- controller-gen.kubebuilder.io/version : v0.15.0
6
+ controller-gen.kubebuilder.io/version : v0.17.1
7
7
name : kubevirtclustertemplates.infrastructure.cluster.x-k8s.io
8
8
spec :
9
9
group : infrastructure.cluster.x-k8s.io
@@ -54,34 +54,30 @@ spec:
54
54
ObjectMeta is metadata that all persisted resources must have, which includes all objects
55
55
users must create. This is a copy of customizable fields from metav1.ObjectMeta.
56
56
57
-
58
57
ObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`,
59
58
which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases
60
59
and read-only fields which end up in the generated CRD validation, having it as a subset simplifies
61
60
the API and some issues that can impact user experience.
62
61
63
-
64
62
During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054)
65
63
for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs,
66
64
specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`.
67
65
The investigation showed that `controller-tools@v2` behaves differently than its previous version
68
66
when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package.
69
67
70
-
71
68
In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta`
72
69
had validation properties, including for `creationTimestamp` (metav1.Time).
73
70
The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null`
74
71
which breaks validation because the field isn't marked as nullable.
75
72
76
-
77
73
In future versions, controller-tools@v2 might allow overriding the type and validation for embedded
78
74
types. When that happens, this hack should be revisited.
79
75
properties :
80
76
annotations :
81
77
additionalProperties :
82
78
type : string
83
79
description : |-
84
- Annotations is an unstructured key value map stored with a resource that may be
80
+ annotations is an unstructured key value map stored with a resource that may be
85
81
set by external tools to store and retrieve arbitrary metadata. They are not
86
82
queryable and should be preserved when modifying objects.
87
83
More info: http://kubernetes.io/docs/user-guide/annotations
@@ -161,7 +157,6 @@ spec:
161
157
the event) or if no container name is specified "spec.containers[2]" (container with
162
158
index 2 in this pod). This syntax is chosen only to have some well-defined way of
163
159
referencing a part of an object.
164
- TODO: this design is not final and this field is subject to change in the future.
165
160
type : string
166
161
kind :
167
162
description : |-
@@ -212,7 +207,6 @@ spec:
212
207
the event) or if no container name is specified "spec.containers[2]" (container with
213
208
index 2 in this pod). This syntax is chosen only to have some well-defined way of
214
209
referencing a part of an object.
215
- TODO: this design is not final and this field is subject to change in the future.
216
210
type : string
217
211
kind :
218
212
description : |-
0 commit comments