Configure a watch namespace for a cluster extension (Technology Preview)
You can configure the watch namespace for extensions that support namespace-scoped resource watching.
|
|
Configuring watch namespace for a cluster extension is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope. |
-
You have access to an Red Hat OpenShift Container Platform cluster using an account with
cluster-adminpermissions. -
You have enabled the
TechPreviewNoUpgradefeature set on the cluster. -
You have created a service account and assigned enough role-based access controls (RBAC) to install, update, and manage the extension. For more information, see "Cluster extension permissions".
-
You have verified the supported install modes for the extension and determined the required
watchNamespaceconfiguration.
-
Create a custom resource (CR) based on where you want the extension to watch for resources:
-
To configure the extension to watch its own installation namespace:
apiVersion: olm.operatorframework.io/v1 kind: ClusterExtension metadata: name: <extension_name> spec: namespace: <installation_namespace> config: configType: Inline inline: watchNamespace: <installation_namespace> serviceAccount: name: <service_account> source: sourceType: Catalog catalog: packageName: <package_name> version: <version> upgradeConstraintPolicy: CatalogProvidedwhere:
config.inline.watchNamespace-
Specifies the namespace to watch for resources. For requirements and valid values, see "Extension configuration".
-
To configure the extension to watch a different namespace:
apiVersion: olm.operatorframework.io/v1 kind: ClusterExtension metadata: name: <extension_name> spec: namespace: <installation_namespace> config: configType: Inline inline: watchNamespace: <watched_namespace> serviceAccount: name: <service_account> source: sourceType: Catalog catalog: packageName: <package_name> version: <version> upgradeConstraintPolicy: CatalogProvided
-
-
Apply the CR to the cluster by running the following command:
$ oc apply -f <cluster_extension_cr>.yaml
-
Verify that the extension installed successfully by running the following command:
$ oc get clusterextension <extension_name> -o yamlExample outputapiVersion: olm.operatorframework.io/v1 kind: ClusterExtension metadata: name: <extension_name> spec: namespace: <installation_namespace> config: configType: Inline inline: watchNamespace: <installation_namespace> status: conditions: - type: Installed status: "True" reason: Succeeded