Skip to content

Commit 6ff525c

Browse files
Promote Config *ClusterExtensionConfig to allow we have spec.config.inline.watchNamespace
1 parent 012db47 commit 6ff525c

File tree

5 files changed

+103
-4
lines changed

5 files changed

+103
-4
lines changed

api/v1/clusterextension_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ type ClusterExtensionSpec struct {
102102
// ClusterExtension's manifests. Values can be specified inline.
103103
//
104104
// config is optional. When not specified, the default configuration of the resolved bundle will be used.
105-
//
106-
// <opcon:experimental>
107105
// +optional
108106
Config *ClusterExtensionConfig `json:"config,omitempty"`
109107
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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 />config is optional. When not specified, the default configuration of the resolved bundle will be used. | | |
347347

348348

349349
#### ClusterExtensionStatus
@@ -502,4 +502,3 @@ _Appears in:_
502502
| `CatalogProvided` | The extension will only upgrade if the new version satisfies<br />the upgrade constraints set by the package author.<br /> |
503503
| `SelfCertified` | Unsafe option which allows an extension to be<br />upgraded or downgraded to any available version of the package and<br />ignore the upgrade path designed by package authors.<br />This assumes that users independently verify the outcome of the changes.<br />Use with caution as this can lead to unknown and potentially<br />disastrous results such as data loss.<br /> |
504504

505-

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,40 @@ spec:
5757
description: spec is an optional field that defines the desired state
5858
of the ClusterExtension.
5959
properties:
60+
config:
61+
description: |-
62+
config contains optional configuration values applied during rendering of the
63+
ClusterExtension's manifests. Values can be specified inline.
64+
65+
config is optional. When not specified, the default configuration of the resolved bundle will be used.
66+
properties:
67+
configType:
68+
description: |-
69+
configType is a required reference to the type of configuration source.
70+
71+
Allowed values are "Inline"
72+
73+
When this field is set to "Inline", the cluster extension configuration is defined inline within the
74+
ClusterExtension resource.
75+
enum:
76+
- Inline
77+
type: string
78+
inline:
79+
description: |-
80+
inline contains JSON or YAML values specified directly in the
81+
ClusterExtension.
82+
83+
inline must be set if configType is 'Inline'.
84+
type: object
85+
x-kubernetes-preserve-unknown-fields: true
86+
required:
87+
- configType
88+
type: object
89+
x-kubernetes-validations:
90+
- message: inline is required when configType is Inline, and forbidden
91+
otherwise
92+
rule: 'has(self.configType) && self.configType == ''Inline'' ?has(self.inline)
93+
: !has(self.inline)'
6094
install:
6195
description: |-
6296
install is an optional field used to configure the installation options

manifests/standard-e2e.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,40 @@ spec:
648648
description: spec is an optional field that defines the desired state
649649
of the ClusterExtension.
650650
properties:
651+
config:
652+
description: |-
653+
config contains optional configuration values applied during rendering of the
654+
ClusterExtension's manifests. Values can be specified inline.
655+
656+
config is optional. When not specified, the default configuration of the resolved bundle will be used.
657+
properties:
658+
configType:
659+
description: |-
660+
configType is a required reference to the type of configuration source.
661+
662+
Allowed values are "Inline"
663+
664+
When this field is set to "Inline", the cluster extension configuration is defined inline within the
665+
ClusterExtension resource.
666+
enum:
667+
- Inline
668+
type: string
669+
inline:
670+
description: |-
671+
inline contains JSON or YAML values specified directly in the
672+
ClusterExtension.
673+
674+
inline must be set if configType is 'Inline'.
675+
type: object
676+
x-kubernetes-preserve-unknown-fields: true
677+
required:
678+
- configType
679+
type: object
680+
x-kubernetes-validations:
681+
- message: inline is required when configType is Inline, and forbidden
682+
otherwise
683+
rule: 'has(self.configType) && self.configType == ''Inline'' ?has(self.inline)
684+
: !has(self.inline)'
651685
install:
652686
description: |-
653687
install is an optional field used to configure the installation options

manifests/standard.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,40 @@ spec:
613613
description: spec is an optional field that defines the desired state
614614
of the ClusterExtension.
615615
properties:
616+
config:
617+
description: |-
618+
config contains optional configuration values applied during rendering of the
619+
ClusterExtension's manifests. Values can be specified inline.
620+
621+
config is optional. When not specified, the default configuration of the resolved bundle will be used.
622+
properties:
623+
configType:
624+
description: |-
625+
configType is a required reference to the type of configuration source.
626+
627+
Allowed values are "Inline"
628+
629+
When this field is set to "Inline", the cluster extension configuration is defined inline within the
630+
ClusterExtension resource.
631+
enum:
632+
- Inline
633+
type: string
634+
inline:
635+
description: |-
636+
inline contains JSON or YAML values specified directly in the
637+
ClusterExtension.
638+
639+
inline must be set if configType is 'Inline'.
640+
type: object
641+
x-kubernetes-preserve-unknown-fields: true
642+
required:
643+
- configType
644+
type: object
645+
x-kubernetes-validations:
646+
- message: inline is required when configType is Inline, and forbidden
647+
otherwise
648+
rule: 'has(self.configType) && self.configType == ''Inline'' ?has(self.inline)
649+
: !has(self.inline)'
616650
install:
617651
description: |-
618652
install is an optional field used to configure the installation options

0 commit comments

Comments
 (0)