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
Copy file name to clipboardExpand all lines: api/v1/clustercatalog_types.go
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ type ClusterCatalog struct {
64
64
// spec is required.
65
65
// The controller will work to ensure that the desired
66
66
// catalog is unpacked and served over the catalog content HTTP server.
67
-
// +kubebuilder:validation:Required
67
+
// +required
68
68
SpecClusterCatalogSpec`json:"spec"`
69
69
70
70
// status contains information about the state of the ClusterCatalog such as:
@@ -87,7 +87,7 @@ type ClusterCatalogList struct {
87
87
88
88
// items is a list of ClusterCatalogs.
89
89
// items is required.
90
-
// +kubebuilder:validation:Required
90
+
// +required
91
91
Items []ClusterCatalog`json:"items"`
92
92
}
93
93
@@ -110,7 +110,7 @@ type ClusterCatalogSpec struct {
110
110
// image:
111
111
// ref: quay.io/operatorhubio/catalog:latest
112
112
//
113
-
// +kubebuilder:validation:Required
113
+
// +required
114
114
SourceCatalogSource`json:"source"`
115
115
116
116
// priority allows the user to define a priority for a ClusterCatalog.
@@ -214,7 +214,7 @@ type ClusterCatalogURLs struct {
214
214
//
215
215
// As the needs of users and clients of the evolve, new endpoints may be added.
216
216
//
217
-
// +kubebuilder:validation:Required
217
+
// +required
218
218
// +kubebuilder:validation:MaxLength:=525
219
219
// +kubebuilder:validation:XValidation:rule="isURL(self)",message="must be a valid URL"
220
220
// +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 +236,7 @@ type CatalogSource struct {
236
236
//
237
237
// +unionDiscriminator
238
238
// +kubebuilder:validation:Enum:="Image"
239
-
// +kubebuilder:validation:Required
239
+
// +required
240
240
TypeSourceType`json:"type"`
241
241
// image is used to configure how catalog contents are sourced from an OCI image.
242
242
// This field is required when type is Image, and forbidden otherwise.
@@ -258,7 +258,7 @@ type ResolvedCatalogSource struct {
258
258
//
259
259
// +unionDiscriminator
260
260
// +kubebuilder:validation:Enum:="Image"
261
-
// +kubebuilder:validation:Required
261
+
// +required
262
262
TypeSourceType`json:"type"`
263
263
// image is a field containing resolution information for a catalog sourced from an image.
264
264
// This field must be set when type is Image, and forbidden otherwise.
@@ -270,7 +270,7 @@ type ResolvedImageSource struct {
270
270
// ref contains the resolved image digest-based reference.
271
271
// The digest format is used so users can use other tooling to fetch the exact
272
272
// OCI manifests that were used to extract the catalog contents.
273
-
// +kubebuilder:validation:Required
273
+
// +required
274
274
// +kubebuilder:validation:MaxLength:=1000
275
275
// +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
276
// +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 +325,7 @@ type ImageSource struct {
325
325
// An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"
326
326
// An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest"
327
327
//
328
-
// +kubebuilder:validation:Required
328
+
// +required
329
329
// +kubebuilder:validation:MaxLength:=1000
330
330
// +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
331
// +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."
// inline contains JSON or YAML values specified directly in the
@@ -215,7 +215,7 @@ type CatalogFilter struct {
215
215
// +kubebuilder:validation:MaxLength:=253
216
216
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="packageName is immutable"
217
217
// +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"
218
-
// +kubebuilder:validation:Required
218
+
// +required
219
219
PackageNamestring`json:"packageName"`
220
220
221
221
// version is an optional semver constraint (a specific version or range of versions). When unspecified, the latest version available will be installed.
@@ -405,7 +405,7 @@ type ServiceAccountReference struct {
405
405
// +kubebuilder:validation:MaxLength:=253
406
406
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
407
407
// +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"
408
-
// +kubebuilder:validation:Required
408
+
// +required
409
409
Namestring`json:"name"`
410
410
}
411
411
@@ -435,7 +435,7 @@ type CRDUpgradeSafetyPreflightConfig struct {
@@ -460,14 +460,14 @@ type BundleMetadata struct {
460
460
// hyphens (-) or periods (.), start and end with an alphanumeric character,
461
461
// and be no longer than 253 characters.
462
462
//
463
-
// +kubebuilder:validation:Required
463
+
// +required
464
464
// +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"
465
465
Namestring`json:"name"`
466
466
467
467
// version is a required field and is a reference to the version that this bundle represents
468
468
// version follows the semantic versioning standard as defined in https://semver.org/.
469
469
//
470
-
// +kubebuilder:validation:Required
470
+
// +required
471
471
// +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"
472
472
Versionstring`json:"version"`
473
473
}
@@ -536,7 +536,7 @@ type ClusterExtensionInstallStatus struct {
536
536
// A "bundle" is a versioned set of content that represents the resources that
537
537
// need to be applied to a cluster to install a package.
538
538
//
539
-
// +kubebuilder:validation:Required
539
+
// +required
540
540
BundleBundleMetadata`json:"bundle"`
541
541
}
542
542
@@ -574,7 +574,7 @@ type ClusterExtensionList struct {
574
574
575
575
// items is a required list of ClusterExtension objects.
// catalog is used to configure how information is sourced from a catalog.
@@ -180,7 +180,7 @@ type CatalogFilter struct {
180
180
// +kubebuilder:validation:MaxLength:=253
181
181
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="packageName is immutable"
182
182
// +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"
183
-
// +kubebuilder:validation:Required
183
+
// +required
184
184
PackageNamestring`json:"packageName"`
185
185
186
186
// version is an optional semver constraint (a specific version or range of versions). When unspecified, the latest version available will be installed.
@@ -370,7 +370,7 @@ type ServiceAccountReference struct {
370
370
// +kubebuilder:validation:MaxLength:=253
371
371
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
372
372
// +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"
373
-
// +kubebuilder:validation:Required
373
+
// +required
374
374
Namestring`json:"name"`
375
375
}
376
376
@@ -400,7 +400,7 @@ type CRDUpgradeSafetyPreflightConfig struct {
@@ -425,14 +425,14 @@ type BundleMetadata struct {
425
425
// hyphens (-) or periods (.), start and end with an alphanumeric character,
426
426
// and be no longer than 253 characters.
427
427
//
428
-
// +kubebuilder:validation:Required
428
+
// +required
429
429
// +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"
430
430
Namestring`json:"name"`
431
431
432
432
// version is a required field and is a reference to the version that this bundle represents
433
433
// version follows the semantic versioning standard as defined in https://semver.org/.
434
434
//
435
-
// +kubebuilder:validation:Required
435
+
// +required
436
436
// +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"
437
437
Versionstring`json:"version"`
438
438
}
@@ -475,7 +475,7 @@ type ClusterExtensionInstallStatus struct {
475
475
// A "bundle" is a versioned set of content that represents the resources that
476
476
// need to be applied to a cluster to install a package.
477
477
//
478
-
// +kubebuilder:validation:Required
478
+
// +required
479
479
BundleBundleMetadata`json:"bundle"`
480
480
}
481
481
@@ -513,7 +513,7 @@ type ClusterExtensionList struct {
513
513
514
514
// items is a required list of ClusterExtension objects.
0 commit comments