Skip to content

Commit aefe385

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 aefe385

File tree

5 files changed

+34
-14
lines changed

5 files changed

+34
-14
lines changed

api/v1/clusterextension_types.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ type ClusterExtensionSpec struct {
9898
// +optional
9999
Install *ClusterExtensionInstallConfig `json:"install,omitempty"`
100100

101-
// config contains optional configuration values applied during rendering of the
102-
// ClusterExtension's manifests. Values can be specified inline.
101+
// config is an optional field used to specify bundle specific configuration
102+
// used to configure the bundle. Configuration is bundle specific and a bundle may provide
103+
// a configuration schema. When not specified, the default configuration of the resolved bundle will be used.
103104
//
104-
// config is optional. When not specified, the default configuration of the resolved bundle will be used.
105+
// config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide
106+
// a configuration schema the final manifests will be derived on a best-effort basis. More information on how
107+
// to configure the bundle should be found in its end-user documentation.
105108
//
106109
// <opcon:experimental>
107110
// +optional
@@ -174,6 +177,8 @@ type ClusterExtensionConfig struct {
174177
// ClusterExtension.
175178
//
176179
// inline must be set if configType is 'Inline'.
180+
// inline accepts arbitrary JSON/YAML objects.
181+
// inline is validation at runtime against the schema provided by the bundle if a schema is provided.
177182
//
178183
// +kubebuilder:validation:Type=object
179184
// +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.<br />inline is validation at runtime against the schema provided by the bundle if a schema 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 is an optional field used to specify bundle specific configuration<br />used to configure the bundle. Configuration is bundle specific and a bundle may provide<br />a configuration schema. When not specified, the default configuration of the resolved bundle will be used.<br /><br />config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide<br />a configuration schema the final manifests will be derived on a best-effort basis. More information on how<br />to configure the bundle should be found in its end-user documentation.<br /><br /><opcon:experimental> | | |
347347

348348

349349
#### ClusterExtensionStatus

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,13 @@ spec:
5959
properties:
6060
config:
6161
description: |-
62-
config contains optional configuration values applied during rendering of the
63-
ClusterExtension's manifests. Values can be specified inline.
62+
config is an optional field used to specify bundle specific configuration
63+
used to configure the bundle. Configuration is bundle specific and a bundle may provide
64+
a configuration schema. When not specified, the default configuration of the resolved bundle will be used.
6465
65-
config is optional. When not specified, the default configuration of the resolved bundle will be used.
66+
config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide
67+
a configuration schema the final manifests will be derived on a best-effort basis. More information on how
68+
to configure the bundle should be found in its end-user documentation.
6669
properties:
6770
configType:
6871
description: |-
@@ -81,6 +84,8 @@ spec:
8184
ClusterExtension.
8285
8386
inline must be set if configType is 'Inline'.
87+
inline accepts arbitrary JSON/YAML objects.
88+
inline is validation at runtime against the schema provided by the bundle if a schema is provided.
8489
type: object
8590
x-kubernetes-preserve-unknown-fields: true
8691
required:

manifests/experimental-e2e.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,13 @@ spec:
864864
properties:
865865
config:
866866
description: |-
867-
config contains optional configuration values applied during rendering of the
868-
ClusterExtension's manifests. Values can be specified inline.
867+
config is an optional field used to specify bundle specific configuration
868+
used to configure the bundle. Configuration is bundle specific and a bundle may provide
869+
a configuration schema. When not specified, the default configuration of the resolved bundle will be used.
869870
870-
config is optional. When not specified, the default configuration of the resolved bundle will be used.
871+
config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide
872+
a configuration schema the final manifests will be derived on a best-effort basis. More information on how
873+
to configure the bundle should be found in its end-user documentation.
871874
properties:
872875
configType:
873876
description: |-
@@ -886,6 +889,8 @@ spec:
886889
ClusterExtension.
887890
888891
inline must be set if configType is 'Inline'.
892+
inline accepts arbitrary JSON/YAML objects.
893+
inline is validation at runtime against the schema provided by the bundle if a schema is provided.
889894
type: object
890895
x-kubernetes-preserve-unknown-fields: true
891896
required:

manifests/experimental.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,13 @@ spec:
829829
properties:
830830
config:
831831
description: |-
832-
config contains optional configuration values applied during rendering of the
833-
ClusterExtension's manifests. Values can be specified inline.
832+
config is an optional field used to specify bundle specific configuration
833+
used to configure the bundle. Configuration is bundle specific and a bundle may provide
834+
a configuration schema. When not specified, the default configuration of the resolved bundle will be used.
834835
835-
config is optional. When not specified, the default configuration of the resolved bundle will be used.
836+
config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide
837+
a configuration schema the final manifests will be derived on a best-effort basis. More information on how
838+
to configure the bundle should be found in its end-user documentation.
836839
properties:
837840
configType:
838841
description: |-
@@ -851,6 +854,8 @@ spec:
851854
ClusterExtension.
852855
853856
inline must be set if configType is 'Inline'.
857+
inline accepts arbitrary JSON/YAML objects.
858+
inline is validation at runtime against the schema provided by the bundle if a schema is provided.
854859
type: object
855860
x-kubernetes-preserve-unknown-fields: true
856861
required:

0 commit comments

Comments
 (0)