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
-
Run the following command to view and edit your
ibm-operator-catalog
CatalogSource instance.oc edit catalogsource ibm-operator-catalog -n openshift-marketplace
-
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
-
Update the
ibm-operator-catalog
CatalogSource to fix it to use the current image digest, instead oficr.io/cpopen/ibm-operator-catalog:latest
. This ensures that theibm-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
-
Find the current image digest.
-
Go to Home > Projects, and select
openshift-marketplace
. -
Click Workloads > Pods, and then search for
ibm-operator-catalog
. -
Click on the returned
ibm-operator-catalog-<...>
pod. -
Click YAML to switch to the YAML view.
-
Search for
imageID
in the YAML, and copy down the value ofspec.containerStatuses.imageID
. The value will be in a format similar to the following:icr.io/cpopen/ibm-operator-catalog@sha256:<...>
-
-
Log in to your OpenShift cluster's console.
-
Go to Administration > Cluster Settings.
-
Click Configuration, and then scroll down and click OperatorHub.
-
Select Sources, and then scroll down and click
ibm-operator-catalog
. -
Click YAML to switch to the YAML view.
-
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
-
Set the value of
spec.image
to the value of the current image digest that you found in step 1, instead of toicr.io/cpopen/ibm-operator-catalog:latest
, and save your changes. This ensures that theibm-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
-
Run the following command to view and edit your
ibm-operator-catalog
CatalogSource instance.oc edit catalogsource ibm-operator-catalog -n openshift-marketplace
-
If there is not a
spec.updateStrategy
section, orspec.image
is not set toicr.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
-
Log in to your OpenShift cluster's console.
-
Go to Administration > Cluster Settings.
-
Click Configuration, and then scroll down and click OperatorHub.
-
Select Sources, and then scroll down and click
ibm-operator-catalog
. -
Click YAML to switch to the YAML view.
-
If there is not a
spec.updateStrategy
section, orspec.image
is not set toicr.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