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
@@ -25,7 +26,7 @@ type CRDCompatibilityRequirement struct {
25
26
// metadata is the standard object's metadata.
26
27
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
27
28
// +optional
28
-
metav1.ObjectMeta`json:"metadata"`
29
+
metav1.ObjectMeta`json:"metadata,omitzero"`
29
30
30
31
// spec is the specification of the desired behavior of the CRD Compatibility Requirement.
31
32
// +required
@@ -38,38 +39,96 @@ type CRDCompatibilityRequirement struct {
38
39
39
40
// CRDCompatibilityRequirementSpec is the specification of the desired behavior of the CRD Compatibility Requirement.
40
41
typeCRDCompatibilityRequirementSpecstruct {
41
-
// crdRef is the name of the target CRD. The target CRD is not required to
42
-
// exist, as we may legitimately place requirements on it before it is
43
-
// created. The observed CRD is given in status.observedCRD, which will be
44
-
// empty if no CRD is observed.
42
+
// compatibilitySchema defines the schema used by crdSchemaValidation and objectSchemaValidation.
45
43
// This field is required.
46
-
// +kubebuilder:validation:MinLength=1
47
-
// +kubebuilder:validation:MaxLength:=253
48
-
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
// CRDCompatibilityRequirementCompatibleWithWarningsReason surfaces when the CRD exists and is compatible with this requirement, but Message contains one or more warning messages.
// crdName is the name of the target CRD. The target CRD is not required to
226
+
// exist, as we may legitimately place requirements on it before it is
227
+
// created. The observed CRD is given in status.observedCRD, which will be
228
+
// empty if no CRD is observed.
229
+
// This field is optional.
230
+
// crdRef must be at most 253 characters in length and must consist only of lower-case alphanumeric characters, periods (.) and hyphens (-). Each period separated label must start and end with an alphanumeric character and be at most 63 characters in length.
231
+
// +kubebuilder:validation:MinLength=1
232
+
// +kubebuilder:validation:MaxLength=253
233
+
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character."
234
+
// +optional
235
+
CRDNamestring`json:"crdName,omitempty"`
101
236
}
102
237
103
238
// ObservedCRD contains information about the observed target CRD.
104
239
// +kubebuilder:validation:MinProperties=1
105
240
typeObservedCRDstruct {
106
241
// uid is the uid of the observed CRD.
107
-
// +kubebuilder:validation:MaxLength=36
108
242
// +kubebuilder:validation:MinLength=1
243
+
// +kubebuilder:validation:MaxLength=36
109
244
// +kubebuilder:validation:Format=uuid
245
+
// +kubebuilder:validation:XValidation:rule="!format.uuid().validate(self).hasValue()",message="uid must be a valid UUID. It must consist only of lower-case hexadecimal digits, in 5 hyphenated blocks, where the blocks are of length 8-4-4-4-12 respectively."
110
246
// +required
111
247
UIDstring`json:"uid,omitempty"`
112
248
@@ -128,7 +264,7 @@ type CRDCompatibilityRequirementList struct {
128
264
// metadata is the standard list's metadata.
129
265
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
130
266
// +optional
131
-
metav1.ListMeta`json:"metadata"`
267
+
metav1.ListMeta`json:"metadata,omitzero"`
132
268
133
269
// items is a list of CRDCompatibilityRequirements.
0 commit comments