Installation via OLM
The Operator Lifecycle Manager (OLM) provides a framework for installing, updating, and managing the lifecycle of operators and their services.
Prerequisites
The DataPower Operator currently supports installation via OLM in OCP clusters running version 4.6 or higher.
Coexistence
When installing an operator via OLM, you have the option to choose its Installation Mode. There are two options:
- All namespaces on the cluster (
AllNamespaces
) - A specific namespace on the cluster (
OwnNamespace
)
If installed in AllNamespaces
mode, the Operator will use a ClusterRole and ClusterRoleBinding and thus have cluster-wide scope to manage DataPower resources across all namespaces. If installed in OwnNamespace
mode, the operator will use a Role and RoleBinding as its primary access (isolated to the namespace it’s installed in), with a limited set of ClusterRole permissions (see Cluster-scope permissions).
Installing the CatalogSource
To enable the installation of the DataPower Operator, a CatalogSource
must be created in the openshift-marketplace
.
The below YAML snippet can be used to create the CatalogSource
resource, which references the datapower-operator-catalog
image from IBM Container Registry. The use of the latest
tag here will allow OLM to poll IBM Container Registry and pull new catalog images when they become available, enabling over-the-air updates.
apiVersion: operators.coreos.com/v1alpha1kind: CatalogSourcemetadata:name: ibm-datapower-operator-catalognamespace: openshift-marketplacespec:displayName: IBM DataPower Operatorpublisher: IBMsourceType: grpc
You can create this resource manually either via the OpenShift Console UI, or by using the oc
CLI.
Using the OpenShift Console
To creating this resource using the OpenShift Console, use the following steps.
- Navigate to your OpenShift Console UI.
- In the top-right of the UI, on the header bar, click the Import button
(+)
to import YAML. - Copy and paste the above YAML snippet into the editor.
- Click the Create button to create the resource.
Using the oc
CLI
To create this resource using the oc
CLI, use the following steps.
Create a YAML file containing the above YAML snippet.
Use the
oc apply
command to apply the YAML resource.oc apply -f ibm-datapower-operator-catalog.yaml
Validating the CatalogSource is installed
To validate that the CatalogSource
resource was installed correctly, use the following steps.
- Navigate to the OpenShift Console UI.
- On the left panel, expand the Operators section.
- Select OperatorHub.
- At the top of the OperatorHub section, enter
DataPower
into the Filter search box. - A tile should be shown titled IBM DataPower Gateway.
Installing the DataPower Operator
To install an instance of the DataPower Operator, use the following steps.
Use the steps above to locate the IBM DataPower Gateway tile in the OperatorHub UI.
Select the IBM DataPower Gateway tile. A panel to the right should appear.
Click the Install button on the right panel.
Under Installation Mode select your desired installation mode.
Select the desired Update Channel.
Select the desired Approval Strategy.
Click the Subscribe button to install the DataPower Operator.
References
The below references might be helpful if you wish to learn more about OLM.