Skip to content

Commit 760855f

Browse files
perdasilvaPer G. da Silva
andauthored
Revert "✨ Promote Single Own Feature Gate AND Config spec in the CR to GA (OPRUN-4098) (#2268)" (#2292)
This reverts commit 3c2fcb4. Signed-off-by: Per G. da Silva <pegoncal@redhat.com> Co-authored-by: Per G. da Silva <pegoncal@redhat.com>
1 parent d0e3fcd commit 760855f

19 files changed

+164
-246
lines changed

api/v1/clusterextension_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ 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>
109110
// +optional
110111
Config *ClusterExtensionConfig `json:"config,omitempty"`
111112
}

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. | | |
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

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

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

33
!!! note
4-
The `SingleOwnNamespaceInstallSupport` feature-gate is enabled by default. Use this guide to configure bundles that need Single or Own namespace install modes.
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.
56

67
---
78

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

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

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+
3356
## Configuring the `ClusterExtension`
3457

3558
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ 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+
9497
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:
9598
9699
``` 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`, `SingleNamespace`, or `OwnNamespace` install modes.
11+
* **must** support installation via the `AllNamespaces` install mode
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ 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+
9497
3. Return list of packages that support `AllNamespaces` install mode and do not use webhooks:
9598
9699
``` terminal

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

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

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

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

16-
# Ensure controller is healthy
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
1719
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
1820

1921
# create install namespace
@@ -55,6 +57,17 @@ kubectl delete clusterextension argocd-operator --ignore-not-found=true
5557
kubectl delete namespace argocd-system --ignore-not-found=true
5658
kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true
5759

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+
5871
# wait for operator-controller to become available with standard config
5972
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
6073

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

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

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

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

16-
# Ensure controller is healthy
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
1719
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
1820

1921
# create install namespace
@@ -58,6 +60,17 @@ kubectl delete clusterextension argocd-operator --ignore-not-found=true
5860
kubectl delete namespace argocd-system argocd --ignore-not-found=true
5961
kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true
6062

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+
6174
# wait for operator-controller to become available with standard config
6275
kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager
6376

helm/experimental.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ options:
99
operatorController:
1010
features:
1111
enabled:
12+
- SingleOwnNamespaceInstallSupport
1213
- PreflightPermissions
1314
- HelmChartSupport
1415
- BoxcutterRuntime

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

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -57,45 +57,6 @@ 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)'
9960
install:
10061
description: |-
10162
install is an optional field used to configure the installation options

0 commit comments

Comments
 (0)