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
// SourceConfig is a discriminated union which selects the installation source.
110
113
//
111
114
// +union
115
+
// +kubebuilder:validation:XValidation:rule="has(self.sourceType) && self.sourceType == 'Bundle' ?has(self.bundle) : !has(self.bundle)",message="bundle is required when sourceType is Bundle, and forbidden otherwise"
112
116
// +kubebuilder:validation:XValidation:rule="has(self.sourceType) && self.sourceType == 'Catalog' ? has(self.catalog) : !has(self.catalog)",message="catalog is required when sourceType is Catalog, and forbidden otherwise"
113
117
typeSourceConfigstruct {
114
118
// sourceType is a required reference to the type of install source.
115
119
//
116
-
// Allowed values are "Catalog"
120
+
// Allowed values are "Bundle" or "Catalog"
121
+
//
122
+
// When this field is set to "Bundle", the bundle of content to install is specified
123
+
// directly. In this case, no interaction with ClusterCatalog resources is necessary.
124
+
// When using the Bundle sourceType, the bundle field must also be set.
117
125
//
118
126
// When this field is set to "Catalog", information for determining the
119
127
// appropriate bundle of content to install will be fetched from
120
128
// ClusterCatalog resources existing on the cluster.
121
129
// When using the Catalog sourceType, the catalog field must also be set.
122
130
//
123
131
// +unionDiscriminator
124
-
// +kubebuilder:validation:Enum:="Catalog"
132
+
// +kubebuilder:validation:Enum:=Bundle;Catalog
125
133
// +kubebuilder:validation:Required
126
134
SourceTypestring`json:"sourceType"`
127
135
136
+
// bundle is used to configure how information is sourced from a bundle.
137
+
// This field is required when sourceType is "Bundle", and forbidden otherwise.
138
+
//
139
+
// +optional.
140
+
Bundle*BundleSource`json:"bundle,omitempty"`
141
+
128
142
// catalog is used to configure how information is sourced from a catalog.
129
143
// This field is required when sourceType is "Catalog", and forbidden otherwise.
// ServiceAccountReference identifies the serviceAccount used fo install a ClusterExtension.
461
+
// BundleSource defines the configuration used to retrieve a bundle directly from
462
+
// its OCI-based image reference.
463
+
typeBundleSourcestruct {
464
+
// ref allows users to define the reference to a container image containing bundle contents.
465
+
// ref is required.
466
+
// ref can not be more than 1000 characters.
467
+
//
468
+
// A reference can be broken down into 3 parts - the domain, name, and identifier.
469
+
//
470
+
// The domain is typically the registry where an image is located.
471
+
// It must be alphanumeric characters (lowercase and uppercase) separated by the "." character.
472
+
// Hyphenation is allowed, but the domain must start and end with alphanumeric characters.
473
+
// Specifying a port to use is also allowed by adding the ":" character followed by numeric values.
474
+
// The port must be the last value in the domain.
475
+
// Some examples of valid domain values are "registry.mydomain.io", "quay.io", "my-registry.io:8080".
476
+
//
477
+
// The name is typically the repository in the registry where an image is located.
478
+
// It must contain lowercase alphanumeric characters separated only by the ".", "_", "__", "-" characters.
479
+
// Multiple names can be concatenated with the "/" character.
480
+
// The domain and name are combined using the "/" character.
481
+
// Some examples of valid name values are "operatorhubio/bundle", "bundle", "my-bundle.prod".
482
+
// An example of the domain and name parts of a reference being combined is "quay.io/operatorhubio/bundle".
483
+
//
484
+
// The identifier is typically the tag or digest for an image reference and is present at the end of the reference.
485
+
// It starts with a separator character used to distinguish the end of the name and beginning of the identifier.
486
+
// For a digest-based reference, the "@" character is the separator.
487
+
// For a tag-based reference, the ":" character is the separator.
488
+
// An identifier is required in the reference.
489
+
//
490
+
// Digest-based references must contain an algorithm reference immediately after the "@" separator.
491
+
// The algorithm reference must be followed by the ":" character and an encoded string.
492
+
// The algorithm must start with an uppercase or lowercase alpha character followed by alphanumeric characters and may contain the "-", "_", "+", and "." characters.
493
+
// Some examples of valid algorithm values are "sha256", "sha256+b64u", "multihash+base58".
494
+
// The encoded string following the algorithm must be hex digits (a-f, A-F, 0-9) and must be a minimum of 32 characters.
495
+
//
496
+
// Tag-based references must begin with a word character (alphanumeric + "_") followed by word characters or ".", and "-" characters.
497
+
// The tag must not be longer than 127 characters.
498
+
//
499
+
// An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"
500
+
// An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest"
501
+
//
502
+
// +kubebuilder:validation:Required
503
+
// +kubebuilder:validation:MaxLength:=1000
504
+
// +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."
505
+
// +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."
506
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') != \"\" || self.find(':.*$') != \"\"",message="must end with a digest or a tag"
507
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') == \"\" ? (self.find(':.*$') != \"\" ? self.find(':.*$').substring(1).size() <= 127 : true) : true",message="tag is invalid. the tag must not be more than 127 characters"
508
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') == \"\" ? (self.find(':.*$') != \"\" ? self.find(':.*$').matches(':[\\\\w][\\\\w.-]*$') : true) : true",message="tag is invalid. valid tags must begin with a word character (alphanumeric + \"_\") followed by word characters or \".\", and \"-\" characters"
509
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') != \"\" ? self.find('(@.*:)').matches('(@[A-Za-z][A-Za-z0-9]*([-_+.][A-Za-z][A-Za-z0-9]*)*[:])') : true",message="digest algorithm is not valid. valid algorithms must start with an uppercase or lowercase alpha character followed by alphanumeric characters and may contain the \"-\", \"_\", \"+\", and \".\" characters."
510
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') != \"\" ? self.find(':.*$').substring(1).size() >= 32 : true",message="digest is not valid. the encoded string must be at least 32 characters"
511
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') != \"\" ? self.find(':.*$').matches(':[0-9A-Fa-f]*$') : true",message="digest is not valid. the encoded string must only contain hex characters (A-F, a-f, 0-9)"
512
+
Refstring`json:"ref"`
513
+
}
514
+
515
+
// ServiceAccountReference identifies the serviceAccount used to install a ClusterExtension.
448
516
typeServiceAccountReferencestruct {
449
517
// name is a required, immutable reference to the name of the ServiceAccount
450
518
// to be used for installation and management of the content for the package
Copy file name to clipboardExpand all lines: config/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml
+97-1Lines changed: 97 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,93 @@ spec:
190
190
catalog:
191
191
packageName: example-package
192
192
properties:
193
+
bundle:
194
+
description: |-
195
+
bundle is used to configure how information is sourced from a bundle.
196
+
This field is required when sourceType is "Bundle", and forbidden otherwise.
197
+
properties:
198
+
ref:
199
+
description: |-
200
+
ref allows users to define the reference to a container image containing bundle contents.
201
+
ref is required.
202
+
ref can not be more than 1000 characters.
203
+
204
+
A reference can be broken down into 3 parts - the domain, name, and identifier.
205
+
206
+
The domain is typically the registry where an image is located.
207
+
It must be alphanumeric characters (lowercase and uppercase) separated by the "." character.
208
+
Hyphenation is allowed, but the domain must start and end with alphanumeric characters.
209
+
Specifying a port to use is also allowed by adding the ":" character followed by numeric values.
210
+
The port must be the last value in the domain.
211
+
Some examples of valid domain values are "registry.mydomain.io", "quay.io", "my-registry.io:8080".
212
+
213
+
The name is typically the repository in the registry where an image is located.
214
+
It must contain lowercase alphanumeric characters separated only by the ".", "_", "__", "-" characters.
215
+
Multiple names can be concatenated with the "/" character.
216
+
The domain and name are combined using the "/" character.
217
+
Some examples of valid name values are "operatorhubio/bundle", "bundle", "my-bundle.prod".
218
+
An example of the domain and name parts of a reference being combined is "quay.io/operatorhubio/bundle".
219
+
220
+
The identifier is typically the tag or digest for an image reference and is present at the end of the reference.
221
+
It starts with a separator character used to distinguish the end of the name and beginning of the identifier.
222
+
For a digest-based reference, the "@" character is the separator.
223
+
For a tag-based reference, the ":" character is the separator.
224
+
An identifier is required in the reference.
225
+
226
+
Digest-based references must contain an algorithm reference immediately after the "@" separator.
227
+
The algorithm reference must be followed by the ":" character and an encoded string.
228
+
The algorithm must start with an uppercase or lowercase alpha character followed by alphanumeric characters and may contain the "-", "_", "+", and "." characters.
229
+
Some examples of valid algorithm values are "sha256", "sha256+b64u", "multihash+base58".
230
+
The encoded string following the algorithm must be hex digits (a-f, A-F, 0-9) and must be a minimum of 32 characters.
231
+
232
+
Tag-based references must begin with a word character (alphanumeric + "_") followed by word characters or ".", and "-" characters.
233
+
The tag must not be longer than 127 characters.
234
+
235
+
An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"
236
+
An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest"
237
+
maxLength: 1000
238
+
type: string
239
+
x-kubernetes-validations:
240
+
- message: must start with a valid domain. valid domains must
241
+
be alphanumeric characters (lowercase and uppercase) separated
0 commit comments