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.
@@ -210,7 +210,7 @@ type CatalogFilter struct {
210
210
// +kubebuilder:validation:MaxLength:=253
211
211
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="packageName is immutable"
212
212
// +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"
213
-
// +kubebuilder:validation:Required
213
+
// +required
214
214
PackageNamestring`json:"packageName"`
215
215
216
216
// version is an optional semver constraint (a specific version or range of versions).
@@ -393,7 +393,7 @@ type ServiceAccountReference struct {
393
393
// +kubebuilder:validation:MaxLength:=253
394
394
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
395
395
// +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"
396
-
// +kubebuilder:validation:Required
396
+
// +required
397
397
Namestring`json:"name"`
398
398
}
399
399
@@ -421,7 +421,7 @@ type CRDUpgradeSafetyPreflightConfig struct {
421
421
// When set to "Strict", the CRD Upgrade Safety pre-flight check runs during an upgrade operation.
@@ -445,14 +445,14 @@ type BundleMetadata struct {
445
445
// It must contain only lowercase alphanumeric characters, hyphens (-) or periods (.),
446
446
// start and end with an alphanumeric character, and be no longer than 253 characters.
447
447
//
448
-
// +kubebuilder:validation:Required
448
+
// +required
449
449
// +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"
450
450
Namestring`json:"name"`
451
451
452
452
// version is required and references the version that this bundle represents.
453
453
// It follows the semantic versioning standard as defined in https://semver.org/.
454
454
//
455
-
// +kubebuilder:validation:Required
455
+
// +required
456
456
// +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"
457
457
Versionstring`json:"version"`
458
458
}
@@ -521,7 +521,7 @@ type ClusterExtensionInstallStatus struct {
521
521
// A "bundle" is a versioned set of content that represents the resources that need to be applied
522
522
// to a cluster to install a package.
523
523
//
524
-
// +kubebuilder:validation:Required
524
+
// +required
525
525
BundleBundleMetadata`json:"bundle"`
526
526
}
527
527
@@ -559,7 +559,7 @@ type ClusterExtensionList struct {
559
559
560
560
// items is a required list of ClusterExtension objects.
0 commit comments