How to install the DG 8 Operator in a specific namespace, to manage two namespace?

Solution Verified - Updated

Environment

  • Red hat OpenShift Container Platform (OCP)
    • 4.x
  • Red Hat Data Grid (RHDG)
    • 8.x
    • Operator

Issue

How to install the DG 8 Operator in a specific namespace?
How to install the DG 8 Operator to manage two namespace? or three?
Installing DG 8 in a specific operator's namespace makes it to not manage the other.

Resolution

The operator is created from two objects: Subscrption and OperatorGroup, the target namespaces that the operator will handles is given on the OperatorGroup yamls.
So one can set the target namespaces as below:

- apiVersion: operators.coreos.com/v1
  kind: OperatorGroup
  metadata:
    name: infinispan
    namespace: ${OPERATOR_NAMESPACE}
  spec:
    targetNamespaces:
      - ${CLUSTER_NAMESPACE1} <--- first namespace
      - ${CLUSTER_NAMESPACE2} <--- second namespace

Root Cause

As explained on the solution DG 8 Operators coexistence in OCP 4 cluster coexistence of multiple versions on the same cluster is not supported.

Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.