Skip to content

Commit 3c2fcb4

Browse files
✨ Promote Single Own Feature Gate AND Config spec in the CR to GA (OPRUN-4098) (#2268)
* Promote Single Own Feature Gate and Config *ClusterExtensionConfig to GA * Update demo with suggestions Co-authored-by: Todd Short <[email protected]> --------- Co-authored-by: Todd Short <[email protected]>
1 parent baf4b9d commit 3c2fcb4

19 files changed

+246
-164
lines changed

api/v1/clusterextension_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ type ClusterExtensionSpec struct {
106106
// a configuration schema the final manifests will be derived on a best-effort basis. More information on how
107107
// to configure the bundle should be found in its end-user documentation.
108108
//
109-
// <opcon:experimental>
110109
// +optional
111110
Config *ClusterExtensionConfig `json:"config,omitempty"`
112111
}

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

Lines changed: 1 addition & 1 deletion
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 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> | | |
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. | | |
347347

348348

349349
#### ClusterExtensionStatus

docs/draft/howto/single-ownnamespace-install.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
## Description
22

33
!!! note
4-
This feature is still in *alpha* the `SingleOwnNamespaceInstallSupport` feature-gate must be enabled to make use of it.
5-
See the instructions below on how to enable it.
4+
The `SingleOwnNamespaceInstallSupport` feature-gate is enabled by default. Use this guide to configure bundles that need Single or Own namespace install modes.
65

76
---
87

@@ -31,28 +30,6 @@ include *installModes*.
3130

3231
[![OwnNamespace Install Demo](https://asciinema.org/a/Rxx6WUwAU016bXFDW74XLcM5i.svg)](https://asciinema.org/a/Rxx6WUwAU016bXFDW74XLcM5i)
3332

34-
## Enabling the Feature-Gate
35-
36-
!!! tip
37-
38-
This guide assumes OLMv1 is already installed. If that is not the case,
39-
you can follow the [getting started](../../getting-started/olmv1_getting_started.md) guide to install OLMv1.
40-
41-
---
42-
43-
Patch the `operator-controller` `Deployment` adding `--feature-gates=SingleOwnNamespaceInstallSupport=true` to the
44-
controller container arguments:
45-
46-
```terminal title="Enable SingleOwnNamespaceInstallSupport feature-gate"
47-
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]'
48-
```
49-
50-
Wait for `Deployment` rollout:
51-
52-
```terminal title="Wait for Deployment rollout"
53-
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
54-
```
55-
5633
## Configuring the `ClusterExtension`
5734

5835
A `ClusterExtension` can be configured to install bundle in `Single-` or `OwnNamespace` mode through the

docs/draft/tutorials/explore-available-content-metas-endpoint.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to
9191
...
9292
```
9393
94-
!!! important
95-
OLM 1.0 supports installing extensions that define webhooks. Targeting a single or specified set of namespaces requires enabling the `SingleOwnNamespaceInstallSupport` feature-gate.
96-
9794
3. Return list of packages which support `AllNamespaces` install mode, do not use webhooks, and where the channel head version uses `olm.csv.metadata` format:
9895
9996
``` terminal

docs/project/olmv1_limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hide:
88
Currently, OLM v1 only supports installing operators packaged in [OLM v0 bundles](https://olm.operatorframework.io/docs/tasks/creating-operator-bundle/)
99
, also known as `registry+v1` bundles. Additionally, the bundled operator, or cluster extension:
1010

11-
* **must** support installation via the `AllNamespaces` install mode
11+
* **must** support installation via the `AllNamespaces`, `SingleNamespace`, or `OwnNamespace` install modes.
1212
* **must not** declare dependencies using any of the following file-based catalog properties:
1313
* `olm.gvk.required`
1414
* `olm.package.required`

docs/tutorials/explore-available-content.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ Then you can query the catalog by using `curl` commands and the `jq` CLI tool to
9191
...
9292
```
9393
94-
!!! important
95-
OLM 1.0 supports installing extensions that define webhooks. Targeting a single or specified set of namespaces requires enabling the `SingleOwnNamespaceInstallSupport` feature-gate.
96-
9794
3. Return list of packages that support `AllNamespaces` install mode and do not use webhooks:
9895
9996
``` terminal

hack/demo/own-namespace-demo-script.sh

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
set -e
77
trap 'echo "Demo ran into error"; trap - SIGTERM && kill -- -$$; exit 1' ERR SIGINT SIGTERM EXIT
88

9-
# install experimental CRDs with config field support
10-
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/experimental.yaml"
9+
# install standard CRDs
10+
echo "Install standard CRDs..."
11+
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/standard.yaml"
1112

12-
# wait for experimental CRDs to be available
13+
# wait for standard CRDs to be available
1314
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
1415

15-
# enable 'SingleOwnNamespaceInstallSupport' feature gate
16-
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]'
17-
18-
# wait for operator-controller to become available
16+
# Ensure controller is healthy
1917
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
2018

2119
# create install namespace
@@ -57,17 +55,6 @@ kubectl delete clusterextension argocd-operator --ignore-not-found=true
5755
kubectl delete namespace argocd-system --ignore-not-found=true
5856
kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true
5957

60-
# remove feature gate from deployment
61-
echo "Removing feature gate from operator-controller..."
62-
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "remove", "path": "/spec/template/spec/containers/0/args", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]' || true
63-
64-
# restore standard CRDs
65-
echo "Restoring standard CRDs..."
66-
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/base.yaml"
67-
68-
# wait for standard CRDs to be available
69-
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
70-
7158
# wait for operator-controller to become available with standard config
7259
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
7360

hack/demo/single-namespace-demo-script.sh

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
set -e
77
trap 'echo "Demo ran into error"; trap - SIGTERM && kill -- -$$; exit 1' ERR SIGINT SIGTERM EXIT
88

9-
# install experimental CRDs with config field support
10-
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/experimental.yaml"
9+
# install standard CRDs
10+
echo "Install standard CRDs..."
11+
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/standard.yaml"
1112

12-
# wait for experimental CRDs to be available
13+
# wait for standard CRDs to be available
1314
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
1415

15-
# enable 'SingleOwnNamespaceInstallSupport' feature gate
16-
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]'
17-
18-
# wait for operator-controller to become available
16+
# Ensure controller is healthy
1917
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
2018

2119
# create install namespace
@@ -60,17 +58,6 @@ kubectl delete clusterextension argocd-operator --ignore-not-found=true
6058
kubectl delete namespace argocd-system argocd --ignore-not-found=true
6159
kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true
6260

63-
# remove feature gate from deployment
64-
echo "Removing feature gate from operator-controller..."
65-
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "remove", "path": "/spec/template/spec/containers/0/args", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]' || true
66-
67-
# restore standard CRDs
68-
echo "Restoring standard CRDs..."
69-
kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/base.yaml"
70-
71-
# wait for standard CRDs to be available
72-
kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io
73-
7461
# wait for operator-controller to become available with standard config
7562
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
7663

helm/experimental.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ options:
99
operatorController:
1010
features:
1111
enabled:
12-
- SingleOwnNamespaceInstallSupport
1312
- PreflightPermissions
1413
- HelmChartSupport
1514
- BoxcutterRuntime

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,45 @@ 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 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.
65+
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.
69+
properties:
70+
configType:
71+
description: |-
72+
configType is a required reference to the type of configuration source.
73+
74+
Allowed values are "Inline"
75+
76+
When this field is set to "Inline", the cluster extension configuration is defined inline within the
77+
ClusterExtension resource.
78+
enum:
79+
- Inline
80+
type: string
81+
inline:
82+
description: |-
83+
inline contains JSON or YAML values specified directly in the
84+
ClusterExtension.
85+
86+
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.
89+
type: object
90+
x-kubernetes-preserve-unknown-fields: true
91+
required:
92+
- configType
93+
type: object
94+
x-kubernetes-validations:
95+
- message: inline is required when configType is Inline, and forbidden
96+
otherwise
97+
rule: 'has(self.configType) && self.configType == ''Inline'' ?has(self.inline)
98+
: !has(self.inline)'
6099
install:
61100
description: |-
62101
install is an optional field used to configure the installation options

0 commit comments

Comments
 (0)