|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * extensions/ce/olmv1-installing-an-operator-from-a-catalog.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | + |
| 7 | +[id="olmv1-deploying-a-ce-in-a-specific-namespace_{context}"] |
| 8 | += Deploying a cluster extension in a specific namespace (Technology Preview) |
| 9 | + |
| 10 | +Install modes are a multi-tenancy feature of {olmv0-first}. {olmv1} does not support multi-tenancy and deploys cluster extensions to the cluster by default by using the `AllNamespaces` install mode. |
| 11 | + |
| 12 | +However, some existing cluster extensions do not support the `AllNamespaces` install mode. You can deploy an extension in a specific namespace by using the `OwnNamespace` or `SingleNamespace` install modes as a Technology Preview feature for `registry+v1` Operator bundles. |
| 13 | + |
| 14 | +The `MultiNamespace` install mode is not supported. As a result, you cannot install the same Operator multiple times on a cluster. |
| 15 | + |
| 16 | +:FeatureName: {Support for deploying a cluster extension in a specific namespace} |
| 17 | +include::snippets/technology-preview.adoc[] |
| 18 | + |
| 19 | +For more information, see "Supported extensions". |
| 20 | + |
| 21 | +.Prerequisites |
| 22 | +* Access to an {product-title} cluster using an account with `cluster-admin` permissions |
| 23 | +* The `TechPreviewNoUpgrade` feature set enabled on the cluster |
| 24 | +* An Operator that supports the `OwnNamespace` or `SingleNamespace` install modes |
| 25 | + |
| 26 | +.Procedure |
| 27 | + |
| 28 | +. Create a custom resource (CR), similar to the following example: |
| 29 | ++ |
| 30 | +.Example `<cluster-extension-cr>.yaml` file |
| 31 | +[source,yaml] |
| 32 | +---- |
| 33 | +apiVersion: olm.operatorframework.io/v1 |
| 34 | +kind: ClusterExtension |
| 35 | +metadata: |
| 36 | + name: <clusterextension_name> |
| 37 | + annotations: |
| 38 | + olm.operatorframework.io/watch-namespace: <namespace> |
| 39 | +spec: |
| 40 | + namespace: <installed_namespace> |
| 41 | + serviceAccount: |
| 42 | + name: <service_account_installer_name> |
| 43 | + source: |
| 44 | + sourceType: Catalog |
| 45 | + catalog: |
| 46 | + packageName: <package_name> |
| 47 | + channels: |
| 48 | + - <channel_name> |
| 49 | + version: <version_or_version_range> |
| 50 | + upgradeConstraintPolicy: CatalogProvided |
| 51 | +---- |
| 52 | +where: |
| 53 | + |
| 54 | +`namespace` :: Specifies the namespace where you want the cluster extension deployed. |
| 55 | ++ |
| 56 | +* If the `namespace` parameter is empty or if the annotation is not present, the extension is deployed using the `AllNamespaces` install mode. |
| 57 | +* If the `namespace` parameter is the same value as the `installed_namespace` parameter in the `spec.namespace` field, the extension is deployed using the `OwnNamespace` install mode. |
| 58 | +* If the `namespace` parameter specifies a namespace that is different from the `installed_namespace` parameter, the extension is deployed using the `SingleNamespace` install mode. |
| 59 | + |
| 60 | +. Apply the CR to the cluster by running the following command: |
| 61 | ++ |
| 62 | +[source,terminal] |
| 63 | +---- |
| 64 | +$ oc apply -f <cluster_extension_cr>.yaml |
| 65 | +---- |
0 commit comments