About this task
The steps that you must complete depend on the version of IBM Software
Hub that you are upgrading to.
Procedure
5.3.0 If you are
upgrading to IBM Software
Hub Version 5.3.0, complete the following steps to upgrade the Red Hat
OpenShift Serverless Knative Eventing software:
- Log the
cpd-cli in to the
Red Hat
OpenShift Container Platform cluster:
Remember:
CPDM_OC_LOGIN is an alias for the cpd-cli
manage
login-to-ocp command.
- Re-authorize the
ibm-knative-events project to
communicate with the knative-eventing project:
cpd-cli manage authorize-instance-topology \
--release=${VERSION} \
--cpd_operator_ns=ibm-knative-events \
--cpd_instance_ns=knative-eventing
- Delete the
opencloud-operators catalog source in the ibm-knative-events project:
oc delete catsrc opencloud-operators \
-n ibm-knative-events
- Delete the
ibm-events-operator subscription in the ibm-knative-events project:
oc delete subs ibm-events-operator \
-n ibm-knative-events
- Get the name of the
ibm-events-operator CSV in the ibm-knative-events project:
export EVENTS_CSV=$(oc get csv -n ibm-knative-events | grep events | awk '{print $1}')
- Delete the CSV:
oc delete csv ${EVENTS_CSV} \
-n ibm-knative-events
- Create the catalog source for the operator:
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: opencloud-operators
namespace: ibm-knative-events
spec:
displayName: IBMCS Operators
grpcPodConfig:
securityContextConfig: restricted
image: icr.io/cpopen/ibm-common-service-catalog@sha256:e610fdff3e7cd44be877d9919c40cb00ce361f40882469e670c7c3358fdc6ac8
publisher: IBM
sourceType: grpc
EOF
- Create the subscription for the operator:
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: ibm-events-operator
namespace: ibm-knative-events
spec:
channel: v5.2
installPlanApproval: Automatic
name: ibm-events-operator
source: opencloud-operators
sourceNamespace: ibm-knative-events
EOF
- Wait several minutes. Then confirm that the
ibm-events-operator pod is
Running
oc get pod \
-n ibm-knative-events \
-l name=ibm-events-operator
- Run the following command to update the Kafka annotations, if needed:
if $(oc get strimzipodset knative-eventing-kafka-kafka -o json -n knative-eventing | jq -e '.metadata.annotations | has("strimzi.io/kafka-version")'); then
if $(oc get strimzipodset knative-eventing-kafka-kafka -o json -n knative-eventing | jq -e '.metadata.annotations | has("ibmevents.ibm.com/kafka-version") | not'); then
echo "Adding the ibmevents kafka version annotation to the strimzipodset in the knative-eventing project."
kafka_version=$(oc get strimzipodset knative-eventing-kafka-kafka -o json -n knative-eventing | jq -r '.metadata.annotations."strimzi.io/kafka-version"' )
oc patch strimzipodset knative-eventing-kafka-kafka -n knative-eventing --type='json' \
-p='[{"op": "add", "path": "/metadata/annotations/ibmevents.ibm.com~1kafka-version", "value": "'"${kafka_version}"'"}]'
fi
fi
- Wait for Kafka to
restart:
oc wait kafkas.ibmevents.ibm.com knative-eventing-kafka \
--for=condition=Ready \
--timeout=1800s \
-n knative-eventing
- Confirm that the required resources are available:
- Confirm that the pods in the
knative-eventing project are Running or Completed:
oc get pods -n knative-eventing
- Confirm that the pods in the
ibm-knative-events
project are Running or Completed:
oc get pods -n ibm-knative-events
- Confirm that any preexisting Knative brokers are
READY:
oc get brokers -A
If one or more brokers are returned, ensure that READY is
True.
- Confirm that any preexisting Knative triggers are
READY:
oc get triggers -A
If one or more triggers are returned, ensure that READY is
True.
5.3.1 and later If you are
upgrading to IBM Software
Hub Version 5.3.1, complete the following steps to
upgrade the Red Hat
OpenShift Serverless Knative Eventing
software:
- Log in to Red Hat
OpenShift Container Platform as a cluster
administrator.
${OC_LOGIN}
Remember:
OC_LOGIN is an alias for the oc login
command.
- Generate the required custom resource definitions for the IBM
Events Operator:
cpd-cli manage deploy-events-operator \
--release=${VERSION} \
--cluster_resources=true
- Apply the required custom resource definitions for the IBM
Events Operator:
oc apply \
-f cpd-cli-workspace/olm-utils-workspace/work/ibm-events-operator-crds.yaml \
--server-side \
--force-conflicts
- Log the
cpd-cli in to the
Red Hat
OpenShift Container Platform cluster:
Remember:
CPDM_OC_LOGIN is an alias for the cpd-cli
manage
login-to-ocp command.
- Upgrade the Red Hat
OpenShift Serverless Knative Eventing software.
Note: By default, the
deploy-knative-eventing command
scales unused
Red Hat
OpenShift Serverless Knative Eventing replicas to 0
(zero). To prevent this behavior, append the following line to the
command:
--patch_redhat_crd=false
The command that you run depends on the storage on your cluster:
- Portworx storage
-
cpd-cli manage deploy-knative-eventing \
--release=${VERSION} \
--storage_vendor=portworx \
--upgrade=true
- All other storage
-
cpd-cli manage deploy-knative-eventing \
--release=${VERSION} \
--block_storage_class=${STG_CLASS_BLOCK} \
--upgrade=true
What to do next
Now that you've upgraded Red Hat
OpenShift Serverless Knative Eventing and IBM
Events, you're ready to complete
Updating cluster-scoped resources for shared cluster components (Upgrading from Version 5.2 to Version 5.3).