Configuring automatic patch upgrades

Disable or enable the automatic application of patch upgrades on your online IBM Cloud Pak® for Watson AIOps deployment.

If you have an online IBM Cloud Pak for Watson AIOps deployment with catalog polling enabled and a new patch is available, then your deployment is automatically upgraded. If you do not want patch upgrades to occur automatically, then catalog polling must be disabled, and the image must be pinned to a specific version. For more information, see Controlling upgrade.

Disabling automatic patch upgrade

You can disable automatic patch upgrade at any time, using the Red Hat® OpenShift® Container Platform CLI or console.

Note: The ibm-operator-catalog also contains the catalogs for other IBM Cloud Paks®. If you have multiple IBM Cloud Paks installed on your cluster and you alter the catalog polling attribute, then automatic update is altered for all of your IBM Cloud Paks.

Disabling automatic patch upgrades with the OpenShift CLI

  1. Run the following command to view and edit your ibm-operator-catalog CatalogSource instance.

    oc edit catalogsource ibm-operator-catalog -n openshift-marketplace
    
  2. If there is a spec.updateStrategy section in the YAML like in the following example, then remove it and save your changes.

    updateStrategy:
      registryPoll:
        interval: 45m
    

  3. Update the ibm-operator-catalog CatalogSource to fix it to use the current image digest, instead of icr.io/cpopen/ibm-operator-catalog:latest. This ensures that the ibm-operator-catalog CatalogSource pods do not pull the latest image if a node reload or other issue causes them to restart.

    Run the following commands:

    IMGDIGEST=`oc get pods -n openshift-marketplace -l=olm.catalogSource=ibm-operator-catalog --no-headers -o=jsonpath="{.items[0].status.containerStatuses[0].imageID}" -n openshift-marketplace` && \
    oc patch catalogsource ibm-operator-catalog -n openshift-marketplace --type=json -p "[{ "op": "test", "path": "/spec/image", "value": "\"icr.io/cpopen/ibm-operator-catalog:latest\"" }, { "op": "replace", "path": "/spec/image", "value": "\"$IMGDIGEST\"" }]"
    

Disabling automatic patch upgrades with the OpenShift console

  1. Find the current image digest.

    1. Go to Home > Projects, and select openshift-marketplace.

    2. Click Workloads > Pods, and then search for ibm-operator-catalog.

    3. Click on the returned ibm-operator-catalog-<...> pod.

    4. Click YAML to switch to the YAML view.

    5. Search for imageID in the YAML, and copy down the value of spec.containerStatuses.imageID. The value will be in a format similar to the following:

      icr.io/cpopen/ibm-operator-catalog@sha256:<...>
      
  2. Log in to your OpenShift cluster's console.

  3. Go to Administration > Cluster Settings.

  4. Click Configuration, and then scroll down and click OperatorHub.

  5. Select Sources, and then scroll down and click ibm-operator-catalog.

  6. Click YAML to switch to the YAML view.

  7. If there is a spec.updateStrategy section in the YAML, as in the following example, then remove it and save your changes.

    updateStrategy:
      registryPoll:
        interval: 45m
    

  8. Set the value of spec.image to the value of the current image digest that you found in step 1, instead of to icr.io/cpopen/ibm-operator-catalog:latest, and save your changes. This ensures that the ibm-operator-catalog CatalogSource pods do not pull the latest image if a node reload or other issue causes them to restart.

Enabling automatic patch upgrade

You can enable automatic patch upgrade at any time, using the OpenShift CLI or console.

Use the following steps to configure your catalog to automatically poll for the latest images. This will cause patch upgrades to occur automatically, if a newer patch is available.

Note: ibm-operator-catalog also contains the catalogs for other IBM Cloud Paks. If you have multiple IBM Cloud Paks installed on your cluster and you enable the polling attribute, then automatic update is configured for all of them.

Enabling automatic patch upgrades with the OpenShift CLI

  1. Run the following command to view and edit your ibm-operator-catalog CatalogSource instance.

    oc edit catalogsource ibm-operator-catalog -n openshift-marketplace
    
  2. If there is not a spec.updateStrategy section, or spec.image is not set to icr.io/cpopen/ibm-operator-catalog:latest, then update the YAML to have the following contents, and save it.

    apiVersion: operators.coreos.com/v1alpha1
    kind: CatalogSource
    metadata:
      name: ibm-operator-catalog
      namespace: openshift-marketplace
    spec:
      displayName: ibm-operator-catalog
      publisher: IBM Content
      sourceType: grpc
      image: icr.io/cpopen/ibm-operator-catalog:latest
      updateStrategy:
        registryPoll:
          interval: 45m
    

Enabling automatic patch upgrades with the OpenShift console

  1. Log in to your OpenShift cluster's console.

  2. Go to Administration > Cluster Settings.

  3. Click Configuration, and then scroll down and click OperatorHub.

  4. Select Sources, and then scroll down and click ibm-operator-catalog.

  5. Click YAML to switch to the YAML view.

  6. If there is not a spec.updateStrategy section, or spec.image is not set to icr.io/cpopen/ibm-operator-catalog:latest, then update the YAML to have the following contents, and save it.

     apiVersion: operators.coreos.com/v1alpha1
     kind: CatalogSource
     metadata:
       name: ibm-operator-catalog
       namespace: openshift-marketplace
     spec:
       displayName: ibm-operator-catalog
       publisher: IBM Content
       sourceType: grpc
       image: icr.io/cpopen/ibm-operator-catalog:latest
       updateStrategy:
         registryPoll:
           interval: 45m