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
@@ -87,7 +89,7 @@ type ClusterCatalogList struct {
87
89
88
90
// items is a list of ClusterCatalogs.
89
91
// items is required.
90
-
// +kubebuilder:validation:Required
92
+
// +required
91
93
Items []ClusterCatalog`json:"items"`
92
94
}
93
95
@@ -110,7 +112,7 @@ type ClusterCatalogSpec struct {
110
112
// image:
111
113
// ref: quay.io/operatorhubio/catalog:latest
112
114
//
113
-
// +kubebuilder:validation:Required
115
+
// +required
114
116
SourceCatalogSource`json:"source"`
115
117
116
118
// priority allows the user to define a priority for a ClusterCatalog.
@@ -131,8 +133,8 @@ type ClusterCatalogSpec struct {
131
133
// The highest possible value is 2147483647.
132
134
//
133
135
// +kubebuilder:default:=0
134
-
// +kubebuilder:validation:minimum:=-2147483648
135
-
// +kubebuilder:validation:maximum:=2147483647
136
+
// +kubebuilder:validation:Minimum:=-2147483648
137
+
// +kubebuilder:validation:Maximum:=2147483647
136
138
// +optional
137
139
Priorityint32`json:"priority"`
138
140
@@ -179,6 +181,8 @@ type ClusterCatalogStatus struct {
179
181
// contents. This could occur when we've initially fetched the latest contents from the source for this catalog and when polling for changes
180
182
// to the contents we identify that there are updates to the contents.
181
183
//
184
+
// +patchMergeKey=type
185
+
// +patchStrategy=merge
182
186
// +listType=map
183
187
// +listMapKey=type
184
188
// +optional
@@ -214,7 +218,7 @@ type ClusterCatalogURLs struct {
214
218
//
215
219
// As the needs of users and clients of the evolve, new endpoints may be added.
216
220
//
217
-
// +kubebuilder:validation:Required
221
+
// +required
218
222
// +kubebuilder:validation:MaxLength:=525
219
223
// +kubebuilder:validation:XValidation:rule="isURL(self)",message="must be a valid URL"
220
224
// +kubebuilder:validation:XValidation:rule="isURL(self) ? (url(self).getScheme() == \"http\" || url(self).getScheme() == \"https\") : true",message="scheme must be either http or https"
@@ -236,7 +240,7 @@ type CatalogSource struct {
236
240
//
237
241
// +unionDiscriminator
238
242
// +kubebuilder:validation:Enum:="Image"
239
-
// +kubebuilder:validation:Required
243
+
// +required
240
244
TypeSourceType`json:"type"`
241
245
// image is used to configure how catalog contents are sourced from an OCI image.
242
246
// This field is required when type is Image, and forbidden otherwise.
@@ -258,19 +262,20 @@ type ResolvedCatalogSource struct {
258
262
//
259
263
// +unionDiscriminator
260
264
// +kubebuilder:validation:Enum:="Image"
261
-
// +kubebuilder:validation:Required
265
+
// +required
262
266
TypeSourceType`json:"type"`
263
267
// image is a field containing resolution information for a catalog sourced from an image.
264
268
// This field must be set when type is Image, and forbidden otherwise.
265
-
Image*ResolvedImageSource`json:"image"`
269
+
// +optional
270
+
Image*ResolvedImageSource`json:"image,omitempty"`
266
271
}
267
272
268
273
// ResolvedImageSource provides information about the resolved source of a Catalog sourced from an image.
269
274
typeResolvedImageSourcestruct {
270
275
// ref contains the resolved image digest-based reference.
271
276
// The digest format is used so users can use other tooling to fetch the exact
272
277
// OCI manifests that were used to extract the catalog contents.
273
-
// +kubebuilder:validation:Required
278
+
// +required
274
279
// +kubebuilder:validation:MaxLength:=1000
275
280
// +kubebuilder:validation:XValidation:rule="self.matches('^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])((\\\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(:[0-9]+)?\\\\b')",message="must start with a valid domain. valid domains must be alphanumeric characters (lowercase and uppercase) separated by the \".\" character."
276
281
// +kubebuilder:validation:XValidation:rule="self.find('(\\\\/[a-z0-9]+((([._]|__|[-]*)[a-z0-9]+)+)?((\\\\/[a-z0-9]+((([._]|__|[-]*)[a-z0-9]+)+)?)+)?)') != \"\"",message="a valid name is required. valid names must contain lowercase alphanumeric characters separated only by the \".\", \"_\", \"__\", \"-\" characters."
@@ -325,7 +330,7 @@ type ImageSource struct {
325
330
// An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"
326
331
// An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest"
327
332
//
328
-
// +kubebuilder:validation:Required
333
+
// +required
329
334
// +kubebuilder:validation:MaxLength:=1000
330
335
// +kubebuilder:validation:XValidation:rule="self.matches('^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])((\\\\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(:[0-9]+)?\\\\b')",message="must start with a valid domain. valid domains must be alphanumeric characters (lowercase and uppercase) separated by the \".\" character."
331
336
// +kubebuilder:validation:XValidation:rule="self.find('(\\\\/[a-z0-9]+((([._]|__|[-]*)[a-z0-9]+)+)?((\\\\/[a-z0-9]+((([._]|__|[-]*)[a-z0-9]+)+)?)+)?)') != \"\"",message="a valid name is required. valid names must contain lowercase alphanumeric characters separated only by the \".\", \"_\", \"__\", \"-\" characters."
@@ -344,7 +349,7 @@ type ImageSource struct {
344
349
// When omitted, the image will not be polled for new content.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="packageName is immutable"
168
168
// +kubebuilder:validation:XValidation:rule="self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\")",message="packageName must be a valid DNS1123 subdomain. It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.), start and end with an alphanumeric character, and be no longer than 253 characters"
169
-
// +kubebuilder:validation:Required
170
169
PackageNamestring`json:"packageName"`
171
170
172
171
// version is an optional semver constraint (a specific version or range of versions). When unspecified, the latest version available will be installed.
@@ -244,6 +243,7 @@ type CatalogFilter struct {
244
243
// For more information on semver, please see https://semver.org/
245
244
//
246
245
// +kubebuilder:validation:MaxLength:=64
246
+
// +kubebuilder:validation:MinLength:=1
247
247
// +kubebuilder:validation:XValidation:rule="self.matches(\"^(\\\\s*(=||!=|>|<|>=|=>|<=|=<|~|~>|\\\\^)\\\\s*(v?(0|[1-9]\\\\d*|[x|X|\\\\*])(\\\\.(0|[1-9]\\\\d*|x|X|\\\\*]))?(\\\\.(0|[1-9]\\\\d*|x|X|\\\\*))?(-([0-9A-Za-z\\\\-]+(\\\\.[0-9A-Za-z\\\\-]+)*))?(\\\\+([0-9A-Za-z\\\\-]+(\\\\.[0-9A-Za-z\\\\-]+)*))?)\\\\s*)((?:\\\\s+|,\\\\s*|\\\\s*\\\\|\\\\|\\\\s*)(=||!=|>|<|>=|=>|<=|=<|~|~>|\\\\^)\\\\s*(v?(0|[1-9]\\\\d*|x|X|\\\\*])(\\\\.(0|[1-9]\\\\d*|x|X|\\\\*))?(\\\\.(0|[1-9]\\\\d*|x|X|\\\\*]))?(-([0-9A-Za-z\\\\-]+(\\\\.[0-9A-Za-z\\\\-]+)*))?(\\\\+([0-9A-Za-z\\\\-]+(\\\\.[0-9A-Za-z\\\\-]+)*))?)\\\\s*)*$\")",message="invalid version expression"
248
248
// +optional
249
249
Versionstring`json:"version,omitempty"`
@@ -356,7 +356,7 @@ type ServiceAccountReference struct {
356
356
// +kubebuilder:validation:MaxLength:=253
357
357
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
358
358
// +kubebuilder:validation:XValidation:rule="self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\")",message="name must be a valid DNS1123 subdomain. It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.), start and end with an alphanumeric character, and be no longer than 253 characters"
359
-
// +kubebuilder:validation:Required
359
+
// +required
360
360
Namestring`json:"name"`
361
361
}
362
362
@@ -369,7 +369,8 @@ type PreflightConfig struct {
369
369
//
370
370
// The CRD Upgrade Safety pre-flight check safeguards from unintended
371
371
// consequences of upgrading a CRD, such as data loss.
@@ -411,20 +412,21 @@ type BundleMetadata struct {
411
412
// hyphens (-) or periods (.), start and end with an alphanumeric character,
412
413
// and be no longer than 253 characters.
413
414
//
414
-
// +kubebuilder:validation:Required
415
+
// +required
415
416
// +kubebuilder:validation:XValidation:rule="self.matches(\"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$\")",message="packageName must be a valid DNS1123 subdomain. It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.), start and end with an alphanumeric character, and be no longer than 253 characters"
416
417
Namestring`json:"name"`
417
418
418
419
// version is a required field and is a reference to the version that this bundle represents
419
420
// version follows the semantic versioning standard as defined in https://semver.org/.
420
421
//
421
-
// +kubebuilder:validation:Required
422
+
// +required
422
423
// +kubebuilder:validation:XValidation:rule="self.matches(\"^([0-9]+)(\\\\.[0-9]+)?(\\\\.[0-9]+)?(-([-0-9A-Za-z]+(\\\\.[-0-9A-Za-z]+)*))?(\\\\+([-0-9A-Za-z]+(-\\\\.[-0-9A-Za-z]+)*))?\")",message="version must be well-formed semver"
423
424
Versionstring`json:"version"`
424
425
}
425
426
426
427
// ClusterExtensionStatus defines the observed state of a ClusterExtension.
427
428
typeClusterExtensionStatusstruct {
429
+
// conditions represents the observed state of the cluster extension.
428
430
// The set of condition types which apply to all spec.source variations are Installed and Progressing.
429
431
//
430
432
// The Installed condition represents whether or not the bundle has been installed for this ClusterExtension.
@@ -463,7 +465,7 @@ type ClusterExtensionInstallStatus struct {
463
465
// A "bundle" is a versioned set of content that represents the resources that
464
466
// need to be applied to a cluster to install a package.
465
467
//
466
-
// +kubebuilder:validation:Required
468
+
// +required
467
469
BundleBundleMetadata`json:"bundle"`
468
470
}
469
471
@@ -478,16 +480,20 @@ type ClusterExtensionInstallStatus struct {
478
480
479
481
// ClusterExtension is the Schema for the clusterextensions API
480
482
typeClusterExtensionstruct {
481
-
metav1.TypeMeta`json:",inline"`
482
-
metav1.ObjectMeta`json:"metadata,omitempty"`
483
+
// +optional
484
+
metav1.TypeMeta`json:",inline"`
483
485
484
-
// spec is an optional field that defines the desired state of the ClusterExtension.
486
+
// metadata is the object metadata
485
487
// +optional
486
-
SpecClusterExtensionSpec`json:"spec,omitempty"`
488
+
metav1.ObjectMeta`json:"metadata,omitempty"`
489
+
490
+
// spec is a required field that defines the desired state of the ClusterExtension.
491
+
// +required
492
+
SpecClusterExtensionSpec`json:"spec"`
487
493
488
494
// status is an optional field that defines the observed state of the ClusterExtension.
0 commit comments