Pinning the catalog sources and upgrading operator subscriptions

If you did not pin the catalog sources in 21.0.3 and you want to prevent automatic upgrades, you must pin the catalogs and update the subscriptions for all of the Cloud Pak operators by running a script.

About this task

Pinned catalog sources are used to prevent automatic updates in the same channel. Pinned catalogs give you better control over future upgrades. To pin the catalog sources, you must apply the 22.0.1 catalog_source.yaml, and then run the update_subscription.sh script to update the existing subscription to the individual catalogs.

Procedure

  1. Log in to the target cluster.
    oc login https://<CLUSTERIP>:<port> -u <ADMINISTRATOR>
    oc project <project_name>

    Where <project_name> is the target namespace.

  2. Download the cert-kubernetes repository to a Linux® based machine (RHEL and macOS).
    To download the files, go to the Container Application Software for Enterprises (CASE) package URL, extract the package, and then extract the contents from the .tar file in the ibm-cp-automation/inventory/cp4aOperatorSdk/files/deploy/crs folder. Use the tar command to extract the archives.
    tar -xvzf ibm-cp-automation-4.0.0.tgz
    cd ibm-cp-automation/inventory/cp4aOperatorSdk/files/deploy/crs
    tar -xvf cert-k8s-22.0.1.tar

    For more information about downloading CASE packages, see Preparing a client to connect to the cluster.

  3. Apply the new catalog sources and update all the operator subscriptions in the CP4BA deployment namespace and the ibm-common-services namespace by running the provided script.

    The catalog sources for the new version specify the precise version numbers that are to be used. 

    1. Apply the new catalog sources by running the following command:
      cd cert-kubernetes/descriptors/op-olm
      oc apply -f catalog_source.yaml

      Where the catalog_source.yaml YAML file is taken from the CASE package in the ibm-cp-automation/inventory/cp4aOperatorSdk/files/deploy/crs/cert-kubernetes/descriptors/op-olm directory.

    2. Run the following commands to update the subscriptions with the new catalogs to replace the ibm-operator-catalog:
      cd ../../scripts
      ./update_subscription.sh -n <CP4BA_namespace>

      Where <CP4BA_namespace> is the namespace that you used to install the Cloud Pak operator. If you installed the operator to "All namespaces", then use openshift-operators.

    Note: The script updates the following operator subscriptions in the ibm-common-services namespace:
    • ibm-common-service-operator
    • ibm-cert-manager-operator
    • ibm-commonui-operator
    • ibm-iam-operator
    • ibm-ingress-nginx-operator
    • ibm-licensing-operator
    • ibm-management-ingress-operator
    • ibm-mongodb-operator
    • ibm-namespace-scope-operator
    • ibm-platform-api-operator
    • ibm-zen-operator
    • operand-deployment-lifecycle-manager-app
    • ibm-crossplane-operator-app
    • ibm-crossplane-provider-kubernetes-operator-app
    • ibm-events-operator
    • ibm-bts-operator
    • cloud-native-postgresql

    The script updates the following operator subscriptions in the <CP4BA_namespace> namespace:

    • ibm-automation-core-v1.3-ibm-operator-catalog-openshift-marketplace
    • ibm-automation-elastic-v1.3-ibm-operator-catalog-openshift-marketplace
    • ibm-automation-eventprocessing-v1.3-ibm-operator-catalog-openshift-marketplac
    • ibm-automation-flink-v1.3-ibm-operator-catalog-openshift-marketplace
    • ibm-automation-insightsengine-v1.3-ibm-operator-catalog-openshift-marketplace
    • ibm-automation-v1.3-ibm-operator-catalog-openshift-marketplace
    • ibm-common-service-operator-v3-ibm-operator-catalog-openshift-marketplace
    • ibm-cp4a-operator
    • ibm-cp4a-wfps-operator-v22.1-ibm-operator-catalog-openshift-marketplace

    Due to some network latency issues, if any of the subscriptions are not changed then run the script again. The time for all the pods to reflect this change might take up to 30 minutes to an hour.

  4. Verify that the script worked by running the following commands:
    oc get subscriptions.operators.coreos.com -n <CP4BA namespace>
    oc get subscriptions.operators.coreos.com -n <ibm-common-services>

Results

The operator subscriptions are now updated to point to the new product catalogs that use the pinned version strategy. Newer operator updates do not happen automatically, even when the subscription is set to automatic. You must follow newer upgrade instructions to trigger an upgrade.

What to do next

Go to and complete the steps in Preparing capabilities and updating your custom resource for an upgrade.