Upgrading Red Hat OpenShift Serverless Knative Eventing in a restricted network (Upgrading from Version 5.2 to Version 5.3)

If your environment includes a service with a dependency on Red Hat OpenShift Serverless Knative Eventing, you must upgrade the Red Hat OpenShift Serverless Knative Eventing software before you upgrade IBM® Software Hub. Complete this task to upgrade the software if your cluster is in a restricted network.

Upgrade phase
  • You are not here. Updating your client workstation
  • You are not here. Collecting required information
  • You are not here. Preparing to run an upgrade in a restricted network
  • You are not here. Preparing to run an upgrade from a private container registry
  • You are here icon. Preparing the cluster
  • You are not here. Preparing to upgrade an instance
  • You are not here. Upgrading an instance
Who needs to complete this task?

Cluster administrator A cluster administrator must upgrade this software.

When do you need to complete this task?

Complete this task only if one or more of the following services are installed or will be installed on the cluster:

  • watsonx Assistant
  • watsonx™ Orchestrate

One-time setup Red Hat OpenShift Serverless Knative Eventing is installed once and shared by all instances of watsonx Assistant and watsonx Orchestrate on the cluster.

Before you begin

This task assumes that you completed the following tasks:

  1. Downloading CASE packages before running IBM Software Hub upgrade commands in a restricted network (Upgrading from Version 5.2 to Version 5.3)
  2. Upgrading the Red Hat OpenShift Serverless Operator.
Best practice: You can run the commands in this task exactly as written using the installation environment variables. Ensure that you added the new environment variables from Updating your environment variables script.

In addition, ensure that you source the environment variables before you run the commands in this task.

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:

  1. Log the cpd-cli in to the Red Hat OpenShift Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  2. 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
  3. Delete the opencloud-operators catalog source in the ibm-knative-events project:
    oc delete catsrc opencloud-operators \
    -n ibm-knative-events
  4. Delete the ibm-events-operator subscription in the ibm-knative-events project:
    oc delete subs ibm-events-operator \
    -n ibm-knative-events
  5. 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}')
  6. Delete the CSV:
    oc delete csv ${EVENTS_CSV} \
    -n ibm-knative-events
  7. 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
  8. 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
  9. 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
  10. 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
  11. Wait for Kafka to restart:
    oc wait kafkas.ibmevents.ibm.com knative-eventing-kafka \
    --for=condition=Ready \
    --timeout=1800s \
    -n knative-eventing
  12. Confirm that the required resources are available:
    1. Confirm that the pods in the knative-eventing project are Running or Completed:
      oc get pods -n knative-eventing
    2. Confirm that the pods in the ibm-knative-events project are Running or Completed:
      oc get pods -n ibm-knative-events
    3. Confirm that any preexisting Knative brokers are READY:
      oc get brokers -A

      If one or more brokers are returned, ensure that READY is True.

    4. 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:

  1. 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.
  2. Generate the required custom resource definitions for the IBM Events Operator:
    cpd-cli manage deploy-events-operator \
    --release=${VERSION} \
    --cluster_resources=true
  3. 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
  4. Log the cpd-cli in to the Red Hat OpenShift Container Platform cluster:
    ${CPDM_OC_LOGIN}
    Remember: CPDM_OC_LOGIN is an alias for the cpd-cli manage login-to-ocp command.
  5. 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).