Skip to content

Commit e7a9611

Browse files
authored
Move Single Own Namespace support back to alpha (#2568)
Signed-off-by: Todd Short <tshort@redhat.com>
1 parent 475e134 commit e7a9611

17 files changed

Lines changed: 77 additions & 129 deletions

File tree

api/v1/clusterextension_types.go

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

applyconfigurations/api/v1/clusterextensionspec.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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. | | Optional: \{\} <br /> |
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. | | Optional: \{\} <br /> |
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> | | Optional: \{\} <br /> |
347347
| `progressDeadlineMinutes` _integer_ | progressDeadlineMinutes is an optional field that defines the maximum period<br />of time in minutes after which an installation should be considered failed and<br />require manual intervention. This functionality is disabled when no value<br />is provided. The minimum period is 10 minutes, and the maximum is 720 minutes (12 hours).<br /><opcon:experimental> | | Maximum: 720 <br />Minimum: 10 <br />Optional: \{\} <br /> |
348348

349349

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/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 & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -57,44 +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 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)'
9860
install:
9961
description: |-
10062
install is optional and configures installation options for the ClusterExtension,

0 commit comments

Comments
 (0)