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.
114
117
//
115
118
// +union
119
+
// <opcon:experimental: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">
116
120
// +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"
117
121
typeSourceConfigstruct {
118
122
// sourceType is a required reference to the type of install source.
119
123
//
120
-
// Allowed values are "Catalog"
124
+
//
125
+
// Allowed values are <opcon:experimental:description>"Bundle" or </opcon:experimental:description>"Catalog"
126
+
//
127
+
// <opcon:experimental:description>
128
+
// When this field is set to "Bundle", the bundle of content to install
129
+
// is specified directly. In this case, no interaction with ClusterCatalog
130
+
// resources is necessary. When using the Bundle sourceType, the bundle
131
+
// field must also be set.
132
+
// </opcon:experimental:description>
121
133
//
122
134
// When this field is set to "Catalog", information for determining the
123
135
// appropriate bundle of content to install will be fetched from
124
136
// ClusterCatalog resources existing on the cluster.
125
137
// When using the Catalog sourceType, the catalog field must also be set.
// BundleSource defines the configuration used to retrieve a bundle directly from
204
+
// its OCI-based image reference.
205
+
typeBundleSourcestruct {
206
+
// ref allows users to define the reference to a container image containing bundle contents.
207
+
// ref is required.
208
+
// ref can not be more than 1000 characters.
209
+
//
210
+
// A reference can be broken down into 3 parts - the domain, name, and identifier.
211
+
//
212
+
// The domain is typically the registry where an image is located.
213
+
// It must be alphanumeric characters (lowercase and uppercase) separated by the "." character.
214
+
// Hyphenation is allowed, but the domain must start and end with alphanumeric characters.
215
+
// Specifying a port to use is also allowed by adding the ":" character followed by numeric values.
216
+
// The port must be the last value in the domain.
217
+
// Some examples of valid domain values are "registry.mydomain.io", "quay.io", "my-registry.io:8080".
218
+
//
219
+
// The name is typically the repository in the registry where an image is located.
220
+
// It must contain lowercase alphanumeric characters separated only by the ".", "_", "__", "-" characters.
221
+
// Multiple names can be concatenated with the "/" character.
222
+
// The domain and name are combined using the "/" character.
223
+
// Some examples of valid name values are "operatorhubio/bundle", "bundle", "my-bundle.prod".
224
+
// An example of the domain and name parts of a reference being combined is "quay.io/operatorhubio/bundle".
225
+
//
226
+
// The identifier is typically the tag or digest for an image reference and is present at the end of the reference.
227
+
// It starts with a separator character used to distinguish the end of the name and beginning of the identifier.
228
+
// For a digest-based reference, the "@" character is the separator.
229
+
// For a tag-based reference, the ":" character is the separator.
230
+
// An identifier is required in the reference.
231
+
//
232
+
// Digest-based references must contain an algorithm reference immediately after the "@" separator.
233
+
// The algorithm reference must be followed by the ":" character and an encoded string.
234
+
// The algorithm must start with an uppercase or lowercase alpha character followed by alphanumeric characters and may contain the "-", "_", "+", and "." characters.
235
+
// Some examples of valid algorithm values are "sha256", "sha256+b64u", "multihash+base58".
236
+
// The encoded string following the algorithm must be hex digits (a-f, A-F, 0-9) and must be a minimum of 32 characters.
237
+
//
238
+
// Tag-based references must begin with a word character (alphanumeric + "_") followed by word characters or ".", and "-" characters.
239
+
// The tag must not be longer than 127 characters.
240
+
//
241
+
// An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"
242
+
// An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest"
243
+
//
244
+
// +kubebuilder:validation:Required
245
+
// +kubebuilder:validation:MaxLength:=1000
246
+
// +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."
247
+
// +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."
248
+
// +kubebuilder:validation:XValidation:rule="self.find('(@.*:)') != \"\" || self.find(':.*$') != \"\"",message="must end with a digest or a tag"
249
+
// +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"
250
+
// +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"
251
+
// +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."
252
+
// +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"
253
+
// +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)"
254
+
Refstring`json:"ref"`
255
+
}
256
+
183
257
// CatalogFilter defines the attributes used to identify and filter content from a catalog.
184
258
typeCatalogFilterstruct {
185
259
// packageName is a reference to the name of the package to be installed
Copy file name to clipboardExpand all lines: docs/api-reference/olmv1-api-reference.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,23 @@ _Appears in:_
50
50
|`version`_string_| version is a required field and is a reference to the version that this bundle represents<br />version follows the semantic versioning standard as defined in https://semver.org/.|| Required: \{\} <br /> |
51
51
52
52
53
+
#### BundleSource
54
+
55
+
56
+
57
+
BundleSource defines the configuration used to retrieve a bundle directly from
58
+
its OCI-based image reference.
59
+
60
+
61
+
62
+
_Appears in:_
63
+
-[SourceConfig](#sourceconfig)
64
+
65
+
| Field | Description | Default | Validation |
66
+
| --- | --- | --- | --- |
67
+
| `ref` _string_ | ref allows users to define the reference to a container image containing bundle contents.<br />ref is required.<br />ref can not be more than 1000 characters.<br /><br />A reference can be broken down into 3 parts - the domain, name, and identifier.<br /><br />The domain is typically the registry where an image is located.<br />It must be alphanumeric characters (lowercase and uppercase) separated by the "." character.<br />Hyphenation is allowed, but the domain must start and end with alphanumeric characters.<br />Specifying a port to use is also allowed by adding the ":" character followed by numeric values.<br />The port must be the last value in the domain.<br />Some examples of valid domain values are "registry.mydomain.io", "quay.io", "my-registry.io:8080".<br /><br />The name is typically the repository in the registry where an image is located.<br />It must contain lowercase alphanumeric characters separated only by the ".", "_", "__", "-" characters.<br />Multiple names can be concatenated with the "/" character.<br />The domain and name are combined using the "/" character.<br />Some examples of valid name values are "operatorhubio/bundle", "bundle", "my-bundle.prod".<br />An example of the domain and name parts of a reference being combined is "quay.io/operatorhubio/bundle".<br /><br />The identifier is typically the tag or digest for an image reference and is present at the end of the reference.<br />It starts with a separator character used to distinguish the end of the name and beginning of the identifier.<br />For a digest-based reference, the "@" character is the separator.<br />For a tag-based reference, the ":" character is the separator.<br />An identifier is required in the reference.<br /><br />Digest-based references must contain an algorithm reference immediately after the "@" separator.<br />The algorithm reference must be followed by the ":" character and an encoded string.<br />The algorithm must start with an uppercase or lowercase alpha character followed by alphanumeric characters and may contain the "-", "_", "+", and "." characters.<br />Some examples of valid algorithm values are "sha256", "sha256+b64u", "multihash+base58".<br />The encoded string following the algorithm must be hex digits (a-f, A-F, 0-9) and must be a minimum of 32 characters.<br /><br />Tag-based references must begin with a word character (alphanumeric + "_") followed by word characters or ".", and "-" characters.<br />The tag must not be longer than 127 characters.<br /><br />An example of a valid digest-based image reference is "quay.io/operatorhubio/catalog@sha256:200d4ddb2a73594b91358fe6397424e975205bfbe44614f5846033cad64b3f05"<br />An example of a valid tag-based image reference is "quay.io/operatorhubio/catalog:latest" | | MaxLength: 1000 <br />Required: \{\} <br /> |
68
+
69
+
53
70
#### CRDUpgradeSafetyEnforcement
54
71
55
72
_Underlying type:__string_
@@ -459,13 +476,17 @@ _Appears in:_
459
476
SourceConfig is a discriminated union which selects the installation source.
460
477
461
478
479
+
<opcon:experimental: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">
480
+
481
+
462
482
463
483
_Appears in:_
464
484
-[ClusterExtensionSpec](#clusterextensionspec)
465
485
466
486
| Field | Description | Default | Validation |
467
487
| --- | --- | --- | --- |
468
-
|`sourceType`_string_| sourceType is a required reference to the type of install source.<br /><br />Allowed values are "Catalog"<br /><br />When this field is set to "Catalog", information for determining the<br />appropriate bundle of content to install will be fetched from<br />ClusterCatalog resources existing on the cluster.<br />When using the Catalog sourceType, the catalog field must also be set. || Enum: [Catalog] <br />Required: \{\} <br /> |
488
+
|`sourceType`_string_| sourceType is a required reference to the type of install source.<br /><br />Allowed values are <opcon:experimental:description>"Bundle" or </opcon:experimental:description>"Catalog"<br /><br /><opcon:experimental:description><br />When this field is set to "Bundle", the bundle of content to install<br />is specified directly. In this case, no interaction with ClusterCatalog<br />resources is necessary. When using the Bundle sourceType, the bundle<br />field must also be set.<br /></opcon:experimental:description><br /><br />When this field is set to "Catalog", information for determining the<br />appropriate bundle of content to install will be fetched from<br />ClusterCatalog resources existing on the cluster.<br />When using the Catalog sourceType, the catalog field must also be set.<br /><br /><opcon:experimental:validation:Enum=Bundle;Catalog><br /><opcon:standard:validation:Enum=Catalog>|| Required: \{\} <br /> |
489
+
|`bundle`_[BundleSource](#bundlesource)_| bundle is used to configure how information is sourced from a bundle.<br />This field is required when sourceType is "Bundle", and forbidden otherwise.<br /><br /><opcon:experimental>|||
469
490
|`catalog`_[CatalogFilter](#catalogfilter)_| catalog is used to configure how information is sourced from a catalog.<br />This field is required when sourceType is "Catalog", and forbidden otherwise. |||
0 commit comments