Skip to content

Commit bcb3d07

Browse files
Promote Single Own Feature Gate AND Config spec in the CR to GA (#2428)
1 parent 69c099c commit bcb3d07

File tree

17 files changed

+133
-79
lines changed

17 files changed

+133
-79
lines changed

api/v1/clusterextension_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ type ClusterExtensionSpec struct {
105105
// a configuration schema the bundle is deemed to not be configurable. More information on how
106106
// to configure bundles can be found in the OLM documentation associated with your current OLM version.
107107
//
108-
// <opcon:experimental>
109108
// +optional
110109
Config *ClusterExtensionConfig `json:"config,omitempty"`
111110
}

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 specifies a ServiceAccount used to perform all interactions with the cluster<br />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 />The serviceAccount field is required. | | Required: \{\} <br /> |
344344
| `source` _[SourceConfig](#sourceconfig)_ | source is required and selects the installation source of content for this ClusterExtension.<br />Set the sourceType field to perform the selection.<br />Catalog is currently the only implemented sourceType.<br />Setting sourceType to "Catalog" requires the catalog field to also be defined.<br />Below is a minimal example of a source definition (in yaml):<br />source:<br /> sourceType: Catalog<br /> catalog:<br /> packageName: example-package | | Required: \{\} <br /> |
345345
| `install` _[ClusterExtensionInstallConfig](#clusterextensioninstallconfig)_ | install is optional and configures installation options for the ClusterExtension,<br />such as the pre-flight check configuration. | | |
346-
| `config` _[ClusterExtensionConfig](#clusterextensionconfig)_ | config is optional and specifies bundle-specific configuration.<br />Configuration is bundle-specific and a bundle may provide a configuration schema.<br />When not specified, the default configuration of the resolved bundle is used.<br />config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide<br />a configuration schema the bundle is deemed to not be configurable. More information on how<br />to configure bundles can be found in the OLM documentation associated with your current OLM version.<br /><opcon:experimental> | | |
346+
| `config` _[ClusterExtensionConfig](#clusterextensionconfig)_ | config is optional and specifies bundle-specific configuration.<br />Configuration is bundle-specific and a bundle may provide a configuration schema.<br />When not specified, the default configuration of the resolved bundle is used.<br />config is validated against a configuration schema provided by the resolved bundle. If the bundle does not provide<br />a configuration schema the bundle is deemed to not be configurable. More information on how<br />to configure bundles can be found in the OLM documentation associated with your current OLM version. | | |
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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,44 @@ 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 optional and specifies bundle-specific configuration.
63+
Configuration is bundle-specific and a bundle may provide a configuration schema.
64+
When not specified, the default configuration of the resolved bundle is 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 bundle is deemed to not be configurable. More information on how
68+
to configure bundles can be found in the OLM documentation associated with your current OLM version.
69+
properties:
70+
configType:
71+
description: |-
72+
configType is required and specifies the type of configuration source.
73+
74+
The only allowed value is "Inline".
75+
76+
When set to "Inline", the cluster extension configuration is defined inline within the ClusterExtension resource.
77+
enum:
78+
- Inline
79+
type: string
80+
inline:
81+
description: |-
82+
inline contains JSON or YAML values specified directly in the ClusterExtension.
83+
84+
It is used to specify arbitrary configuration values for the ClusterExtension.
85+
It must be set if configType is 'Inline' and must be a valid JSON/YAML object containing at least one property.
86+
The configuration values are validated at runtime against a JSON schema provided by the bundle.
87+
minProperties: 1
88+
type: object
89+
x-kubernetes-preserve-unknown-fields: true
90+
required:
91+
- configType
92+
type: object
93+
x-kubernetes-validations:
94+
- message: inline is required when configType is Inline, and forbidden
95+
otherwise
96+
rule: 'has(self.configType) && self.configType == ''Inline'' ?has(self.inline)
97+
: !has(self.inline)'
6098
install:
6199
description: |-
62100
install is optional and configures installation options for the ClusterExtension,

0 commit comments

Comments
 (0)