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
@@ -62,7 +62,7 @@ type ClusterCatalog struct {
62
62
63
63
// spec is a required field that defines the desired state of the ClusterCatalog.
64
64
// The controller ensures that the catalog is unpacked and served over the catalog content HTTP server.
65
-
// +kubebuilder:validation:Required
65
+
// +required
66
66
SpecClusterCatalogSpec`json:"spec"`
67
67
68
68
// status contains the following information about the state of the ClusterCatalog:
@@ -85,7 +85,7 @@ type ClusterCatalogList struct {
85
85
86
86
// items is a list of ClusterCatalogs.
87
87
// items is required.
88
-
// +kubebuilder:validation:Required
88
+
// +required
89
89
Items []ClusterCatalog`json:"items"`
90
90
}
91
91
@@ -105,7 +105,7 @@ type ClusterCatalogSpec struct {
105
105
// image:
106
106
// ref: quay.io/operatorhubio/catalog:latest
107
107
//
108
-
// +kubebuilder:validation:Required
108
+
// +required
109
109
SourceCatalogSource`json:"source"`
110
110
111
111
// priority is an optional field that defines a priority for this ClusterCatalog.
@@ -199,7 +199,7 @@ type ClusterCatalogURLs struct {
199
199
//
200
200
// New endpoints may be added as needs evolve.
201
201
//
202
-
// +kubebuilder:validation:Required
202
+
// +required
203
203
// +kubebuilder:validation:MaxLength:=525
204
204
// +kubebuilder:validation:XValidation:rule="isURL(self)",message="must be a valid URL"
205
205
// +kubebuilder:validation:XValidation:rule="isURL(self) ? (url(self).getScheme() == \"http\" || url(self).getScheme() == \"https\") : true",message="scheme must be either http or https"
@@ -220,7 +220,7 @@ type CatalogSource struct {
220
220
//
221
221
// +unionDiscriminator
222
222
// +kubebuilder:validation:Enum:="Image"
223
-
// +kubebuilder:validation:Required
223
+
// +required
224
224
TypeSourceType`json:"type"`
225
225
// image configures how catalog contents are sourced from an OCI image.
226
226
// It is required when type is Image, and forbidden otherwise.
@@ -241,7 +241,7 @@ type ResolvedCatalogSource struct {
241
241
//
242
242
// +unionDiscriminator
243
243
// +kubebuilder:validation:Enum:="Image"
244
-
// +kubebuilder:validation:Required
244
+
// +required
245
245
TypeSourceType`json:"type"`
246
246
// image contains resolution information for a catalog sourced from an image.
247
247
// It must be set when type is Image, and forbidden otherwise.
@@ -253,7 +253,7 @@ type ResolvedImageSource struct {
253
253
// ref contains the resolved image digest-based reference.
254
254
// The digest format allows you to use other tooling to fetch the exact OCI manifests
255
255
// that were used to extract the catalog contents.
256
-
// +kubebuilder:validation:Required
256
+
// +required
257
257
// +kubebuilder:validation:MaxLength:=1000
258
258
// +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."
259
259
// +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."
@@ -307,7 +307,7 @@ type ImageSource struct {
307
307
// An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"
308
308
// An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest"
309
309
//
310
-
// +kubebuilder:validation:Required
310
+
// +required
311
311
// +kubebuilder:validation:MaxLength:=1000
312
312
// +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."
313
313
// +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 ClusterExtension.
@@ -220,7 +220,7 @@ type CatalogFilter struct {
220
220
// +kubebuilder:validation:MaxLength:=253
221
221
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="packageName is immutable"
222
222
// +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"
223
-
// +kubebuilder:validation:Required
223
+
// +required
224
224
PackageNamestring`json:"packageName"`
225
225
226
226
// version is an optional semver constraint (a specific version or range of versions).
@@ -403,7 +403,7 @@ type ServiceAccountReference struct {
403
403
// +kubebuilder:validation:MaxLength:=253
404
404
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
405
405
// +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"
406
-
// +kubebuilder:validation:Required
406
+
// +required
407
407
Namestring`json:"name"`
408
408
}
409
409
@@ -431,7 +431,7 @@ type CRDUpgradeSafetyPreflightConfig struct {
431
431
// When set to "Strict", the CRD Upgrade Safety pre-flight check runs during an upgrade operation.
@@ -455,14 +455,14 @@ type BundleMetadata struct {
455
455
// It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.),
456
456
// start and end with an alphanumeric character, and be no longer than 253 characters.
457
457
//
458
-
// +kubebuilder:validation:Required
458
+
// +required
459
459
// +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"
460
460
Namestring`json:"name"`
461
461
462
462
// version is required and references the version that this bundle represents.
463
463
// It follows the semantic versioning standard as defined in https://semver.org/.
464
464
//
465
-
// +kubebuilder:validation:Required
465
+
// +required
466
466
// +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"
467
467
Versionstring`json:"version"`
468
468
}
@@ -533,7 +533,7 @@ type ClusterExtensionInstallStatus struct {
533
533
// A "bundle" is a versioned set of content that represents the resources that need to be applied
534
534
// to a cluster to install a package.
535
535
//
536
-
// +kubebuilder:validation:Required
536
+
// +required
537
537
BundleBundleMetadata`json:"bundle"`
538
538
}
539
539
@@ -575,7 +575,7 @@ type ClusterExtensionList struct {
575
575
576
576
// items is a required list of ClusterExtension objects.
0 commit comments