Skip to content

Commit d2944a8

Browse files
author
Per Goncalves da Silva
committed
Update .spec.config api doc to ellucidate validation
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 5b79578 commit d2944a8

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

api/v1/clusterextension_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ type ClusterExtensionSpec struct {
101101
// config contains optional configuration values applied during rendering of the
102102
// ClusterExtension's manifests. Values can be specified inline.
103103
//
104+
// The configuration schema is defined by the bundle and validated at runtime.
105+
//
104106
// config is optional. When not specified, the default configuration of the resolved bundle will be used.
105107
//
106108
// <opcon:experimental>
@@ -174,6 +176,8 @@ type ClusterExtensionConfig struct {
174176
// ClusterExtension.
175177
//
176178
// inline must be set if configType is 'Inline'.
179+
// inline accepts arbitrary JSON/YAML objects whose validation is carried out at runtime against the schema provided
180+
// by the bundle if one is provided.
177181
//
178182
// +kubebuilder:validation:Type=object
179183
// +optional

docs/api-reference/olmv1-api-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ _Appears in:_
254254
| Field | Description | Default | Validation |
255255
| --- | --- | --- | --- |
256256
| `configType` _[ClusterExtensionConfigType](#clusterextensionconfigtype)_ | configType is a required reference to the type of configuration source.<br /><br />Allowed values are "Inline"<br /><br />When this field is set to "Inline", the cluster extension configuration is defined inline within the<br />ClusterExtension resource. | | Enum: [Inline] <br />Required: \{\} <br /> |
257-
| `inline` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#json-v1-apiextensions-k8s-io)_ | inline contains JSON or YAML values specified directly in the<br />ClusterExtension.<br /><br />inline must be set if configType is 'Inline'. | | Type: object <br /> |
257+
| `inline` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#json-v1-apiextensions-k8s-io)_ | inline contains JSON or YAML values specified directly in the<br />ClusterExtension.<br /><br />inline must be set if configType is 'Inline'.<br />inline accepts arbitrary JSON/YAML objects whose validation is carried out at runtime against the schema provided<br />by the bundle if one is provided. | | Type: object <br /> |
258258

259259

260260
#### ClusterExtensionConfigType
@@ -343,7 +343,7 @@ _Appears in:_
343343
| `serviceAccount` _[ServiceAccountReference](#serviceaccountreference)_ | serviceAccount is a reference to a ServiceAccount used to perform all interactions<br />with the cluster that are required to manage the extension.<br />The ServiceAccount must be configured with the necessary permissions to perform these interactions.<br />The ServiceAccount must exist in the namespace referenced in the spec.<br />serviceAccount is required. | | Required: \{\} <br /> |
344344
| `source` _[SourceConfig](#sourceconfig)_ | source is a required field which selects the installation source of content<br />for this ClusterExtension. Selection is performed by setting the sourceType.<br /><br />Catalog is currently the only implemented sourceType, and setting the<br />sourcetype to "Catalog" requires the catalog field to also be defined.<br /><br />Below is a minimal example of a source definition (in yaml):<br /><br />source:<br /> sourceType: Catalog<br /> catalog:<br /> packageName: example-package | | Required: \{\} <br /> |
345345
| `install` _[ClusterExtensionInstallConfig](#clusterextensioninstallconfig)_ | install is an optional field used to configure the installation options<br />for the ClusterExtension such as the pre-flight check configuration. | | |
346-
| `config` _[ClusterExtensionConfig](#clusterextensionconfig)_ | config contains optional configuration values applied during rendering of the<br />ClusterExtension's manifests. Values can be specified inline.<br /><br />config is optional. When not specified, the default configuration of the resolved bundle will be used.<br /><br /><opcon:experimental> | | |
346+
| `config` _[ClusterExtensionConfig](#clusterextensionconfig)_ | config contains optional configuration values applied during rendering of the<br />ClusterExtension's manifests. Values can be specified inline.<br /><br />The configuration schema is defined by the bundle and validated at runtime.<br /><br />config is optional. When not specified, the default configuration of the resolved bundle will be used.<br /><br /><opcon:experimental> | | |
347347

348348

349349
#### ClusterExtensionStatus

helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensions.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ spec:
6262
config contains optional configuration values applied during rendering of the
6363
ClusterExtension's manifests. Values can be specified inline.
6464
65+
The configuration schema is defined by the bundle and validated at runtime.
66+
6567
config is optional. When not specified, the default configuration of the resolved bundle will be used.
6668
properties:
6769
configType:
@@ -81,6 +83,8 @@ spec:
8183
ClusterExtension.
8284
8385
inline must be set if configType is 'Inline'.
86+
inline accepts arbitrary JSON/YAML objects whose validation is carried out at runtime against the schema provided
87+
by the bundle if one is provided.
8488
type: object
8589
x-kubernetes-preserve-unknown-fields: true
8690
required:

manifests/experimental-e2e.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,8 @@ spec:
867867
config contains optional configuration values applied during rendering of the
868868
ClusterExtension's manifests. Values can be specified inline.
869869
870+
The configuration schema is defined by the bundle and validated at runtime.
871+
870872
config is optional. When not specified, the default configuration of the resolved bundle will be used.
871873
properties:
872874
configType:
@@ -886,6 +888,8 @@ spec:
886888
ClusterExtension.
887889
888890
inline must be set if configType is 'Inline'.
891+
inline accepts arbitrary JSON/YAML objects whose validation is carried out at runtime against the schema provided
892+
by the bundle if one is provided.
889893
type: object
890894
x-kubernetes-preserve-unknown-fields: true
891895
required:

manifests/experimental.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,8 @@ spec:
832832
config contains optional configuration values applied during rendering of the
833833
ClusterExtension's manifests. Values can be specified inline.
834834
835+
The configuration schema is defined by the bundle and validated at runtime.
836+
835837
config is optional. When not specified, the default configuration of the resolved bundle will be used.
836838
properties:
837839
configType:
@@ -851,6 +853,8 @@ spec:
851853
ClusterExtension.
852854
853855
inline must be set if configType is 'Inline'.
856+
inline accepts arbitrary JSON/YAML objects whose validation is carried out at runtime against the schema provided
857+
by the bundle if one is provided.
854858
type: object
855859
x-kubernetes-preserve-unknown-fields: true
856860
required:

0 commit comments

Comments
 (0)