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
// +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"
85
+
// +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"
81
86
typeSourceConfigstruct {
82
87
// sourceType is a required reference to the type of install source.
83
88
//
84
-
// Allowed values are ["Catalog"]
89
+
// Allowed values are ["Catalog", "Bundle"]
85
90
//
86
91
// When this field is set to "Catalog", information for determining the appropriate
87
92
// bundle of content to install will be fetched from ClusterCatalog resources existing
88
93
// on the cluster. When using the Catalog sourceType, the catalog field must also be set.
89
94
//
90
-
// +unionDiscriminator
91
-
// +kubebuilder:validation:Enum:="Catalog"
95
+
// When this field is set to "Bundle", the bundle of content to install is specified
96
+
// directly. In this case, no interaction with ClusterCatalog resources is necessary.
97
+
// When using the Bundle sourceType, the bundle field must also be set.
98
+
//
99
+
// +unionDiscriminatorq
100
+
// +kubebuilder:validation:Enum:=Bundle;Catalog
92
101
SourceTypestring`json:"sourceType"`
93
102
94
103
// catalog is used to configure how information is sourced from a catalog. This field must be defined when sourceType is set to "Catalog",
95
104
// and must be the only field defined for this sourceType.
96
105
//
97
106
// +optional.
98
107
Catalog*CatalogSource`json:"catalog,omitempty"`
108
+
109
+
// bundle is used to configure how information is sourced from a bundle. This field must be defined when sourceType is set to "Bundle",
110
+
// and must be the only field defined for this sourceType.
111
+
//
112
+
// +optional.
113
+
Bundle*BundleSource`json:"bundle,omitempty"`
99
114
}
100
115
101
116
// ClusterExtensionInstallConfig is a union which selects the clusterExtension installation config.
Copy file name to clipboardExpand all lines: docs/api-reference/operator-controller-api-reference.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,22 @@ _Appears in:_
31
31
|`version`_string_| version is a required field and is a reference<br />to the version that this bundle represents |||
32
32
33
33
34
+
#### BundleSource
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
_Appears in:_
43
+
-[SourceConfig](#sourceconfig)
44
+
45
+
| Field | Description | Default | Validation |
46
+
| --- | --- | --- | --- |
47
+
|`ref`_string_||| Required: \{\} <br /> |
48
+
49
+
34
50
#### CRDUpgradeSafetyPolicy
35
51
36
52
_Underlying type:__string_
@@ -232,7 +248,7 @@ _Appears in:_
232
248
233
249
234
250
235
-
SourceConfig is a discriminated union which selects the installation source.
251
+
236
252
237
253
238
254
@@ -241,8 +257,9 @@ _Appears in:_
241
257
242
258
| Field | Description | Default | Validation |
243
259
| --- | --- | --- | --- |
244
-
|`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 appropriate<br />bundle of content to install will be fetched from ClusterCatalog resources existing<br />on the cluster. When using the Catalog sourceType, the catalog field must also be set.|| Enum: [Catalog] <br /> |
260
+
|`sourceType`_string_| sourceType is a required reference to the type of install source.<br /><br />Allowed values are ["Catalog", "Bundle"]<br /><br />When this field is set to "Catalog", information for determining the appropriate<br />bundle of content to install will be fetched from ClusterCatalog resources existing<br />on the cluster. When using the Catalog sourceType, the catalog field must also be set.<br /><br />When this field is set to "Bundle", the bundle of content to install is specified<br />directly. In this case, no interaction with ClusterCatalog resources is necessary.<br />When using the Bundle sourceType, the bundle field must also be set. || Enum: [Bundle Catalog] <br /> |
245
261
|`catalog`_[CatalogSource](#catalogsource)_| catalog is used to configure how information is sourced from a catalog. This field must be defined when sourceType is set to "Catalog",<br />and must be the only field defined for this sourceType. |||
262
+
|`bundle`_[BundleSource](#bundlesource)_| bundle is used to configure how information is sourced from a bundle. This field must be defined when sourceType is set to "Bundle",<br />and must be the only field defined for this sourceType. |||
0 commit comments