Chapter 8. Managing upgrades


This section provides step-by-step instructions to upgrade the OpenShift Serverless Logic Operator from version 1.34.0 to 1.35.0. The upgrade process involves preparing the existing workflows and services, updating the Operator, and restoring the workflows after the upgrade.

Note

Different workflow profiles require different upgrade steps. Carefully follow the instructions for each profile.

8.1.1. Preparing for the upgrade

Before starting the upgrade process, you need to prepare your OpenShift Serverless Logic environment. This section outlines the necessary steps to ensure a upgrade from version 1.34.0 to 1.35.0.

The preparation process includes:

  • Deleting or scaling workflows based on their profiles.
  • Backing up all necessary databases and resources.
  • Ensuring you have a record of all custom configurations.
  • Running required database migration scripts for workflows using persistence.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

8.1.1.1. Deleting workflows with dev profile

Before upgrading the Operator, you must delete workflows running with the dev profile and redeploy them after the upgrade is completed.

Procedure

  1. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow custom resource definitions (CRDs), ConfigMaps, or any other related custom configurations.
  2. Delete the workflow by executing the following command:

    $ oc delete -f <my-workflow.yaml> -n <target_namespace>
    Copy to Clipboard Toggle word wrap

Before upgrading the Operator, you must delete workflows running with the Preview profile, and migrate any data that is persisted. When the upgrade is completed, you must redeploy the workflows.

Procedure

  1. If you are using persistence, back up the workflow database and ensure the backup includes both database objects and table data.
  2. Ensure you have a backup of all necessary Kubernetes resources, including SonataFlow CRDs, ConfigMaps, or any other related custom configurations.
  3. Delete the workflow by executing the following command:

    $ oc delete -f <my-workflow.yaml> -n <target_namespace>
    Copy to Clipboard Toggle word wrap
  4. If you are using persistence, you must execute the following database migration script:

    ALTER TABLE flyway_schema_history
        RENAME CONSTRAINT flyway_schema_history_pk TO kie_flyway_history_runtime_persistence_pk;
    
    ALTER INDEX flyway_schema_history_s_idx
      RENAME TO kie_flyway_history_runtime_persistence_s_idx;
    
    ALTER TABLE flyway_schema_history RENAME TO kie_flyway_history_runtime_persistence;
    Copy to Clipboard Toggle word wrap

Before upgrading the Operator, you must scale down workflows running with the gitops profile, and scale them up again after the upgrade is completed.

Procedure

  1. Modify the my-workflow.yaml CRD and scale down each workflow to zero before upgrading as shown in the following example:

    spec:
      podTemplate:
        replicas: 0
    Copy to Clipboard Toggle word wrap
  2. Apply the updated CRD by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>
    Copy to Clipboard Toggle word wrap
  3. (Optional) Scale the workflow to 0 by running the following command:

    $ oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 0}}}'
    Copy to Clipboard Toggle word wrap

8.1.1.4. Backing up the Data Index database

You must back up the Data Index database before upgrading to prevent data loss.

Procedure

  • Take a full backup of the Data Index database, ensuring:

    • The backup includes all database objects and not just table data.
    • The backup is stored in a secure location.

8.1.1.5. Backing up the Jobs Service database

You must back up the Jobs Service database before upgrading to maintain job scheduling data.

Procedure

  • Take a full backup of the Jobs Service database, ensuring:

    • The backup includes all database objects and not just table data.
    • The backup is stored in a secure location.

To transition from OpenShift Serverless Logic Operator (OSL) version 1.34.0 to 1.35.0, you must upgrade the OSL using the Red Hat OpenShift Serverless web console. This upgrade ensures compatibility with newer features and proper functioning of your workflows.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

Procedure

  1. In the web console, navigate to the Operators OperatorHub Installed Operator page.
  2. Select the openshift-serverless-logic namespace from the Installed Namespace.
  3. In the list of installed operators, find and click the OpenShift Serverless Logic Operator.
  4. In the Operator details page, click on the Subscription tab. Click Edit Subscription.
  5. In the Upgrade status, click the Upgrade available link.
  6. Click the Preview install plan and Approve to start the update.
  7. To monitor the upgrade process, run the following command:

    $ oc get subscription logic-operator-rhel8 -n openshift-serverless-logic -o jsonpath='{.status.installedCSV}'
    Copy to Clipboard Toggle word wrap

    Expected output

    $ logic-operator-rhel8.v1.35.0
    Copy to Clipboard Toggle word wrap

Verification

  1. To verify the new Operator version is installed, run the following command:

    $ oc get clusterserviceversion logic-operator-rhel8.v1.35.0 -n openshift-serverless-logic
    Copy to Clipboard Toggle word wrap

    Expected output

    NAME                           DISPLAY                               VERSION   REPLACES                       PHASE
    logic-operator-rhel8.v1.35.0   OpenShift Serverless Logic Operator   1.35.0    logic-operator-rhel8.v1.34.0   Succeeded
    Copy to Clipboard Toggle word wrap

8.1.3. Finalizing the upgrade

After upgrading the OpenShift Serverless Logic Operator to version 1.35.0, you must finalize the upgrade process by restoring or scaling workflows and cleaning up old services. This ensures that your system runs cleanly on the new version and that all dependent components are configured correctly.

Follow the appropriate steps below based on the profile of your workflows and services.

Prerequisites

  • You have access to the cluster with cluster-admin privileges.
  • You have OpenShift Serverless Logic Operator installed on your cluster.
  • You have access to a OpenShift Serverless Logic project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.
  • You have access to the OpenShift Management Console for Operator upgrades.
  • You have installed the OpenShift CLI (oc).

8.1.3.1. Finalizing the Data Index upgrade

After the Operator upgrade, a new ReplicaSet is automatically created for Data Index 1.35.0. You must delete the old one manually.

Procedure

  1. Verify the new ReplicaSet exists by listing all ReplicaSets by running the following command:

    $ oc get replicasets -n <target_namespace> -o custom-columns=Name:metadata.name,Image:spec.template.spec.containers[*].image
    Copy to Clipboard Toggle word wrap
  2. Identify the old Data Index ReplicaSet (with version 1.34.0) and delete it:

    $ oc delete replicaset <old_replicaset_name> -n <target_namespace>
    Copy to Clipboard Toggle word wrap

8.1.3.2. Finalizing the Job Service upgrade

You must manually clean up the Jobs Service components from the older version to trigger deployment of version 1.35.0 components.

Procedure

  1. Delete the old Jobs Service deployment by running the following command:

    $ oc delete deployment <jobs-service-deployment-name> -n <target_namespace>
    Copy to Clipboard Toggle word wrap

    This will trigger automatic cleanup of the older Pods and ReplicaSets and initiate a fresh deployment using version 1.35.0.

After the upgrade, you must redeploy workflows that use the dev profile and any associated Kubernetes resources.

Procedure

  1. Ensure all required resources are restored, including SonataFlow CRDs, ConfigMaps, or any other related custom configurations.
  2. Redeploy the workflow by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>
    Copy to Clipboard Toggle word wrap

Workflows with the preview profile require an additional configuration step before being redeployed.

Procedure

  1. If the workflow uses persistence, add the following property to the ConfigMap associated with the workflow:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      labels:
        app: my-workflow
      name: my-workflow-props
    data:
      application.properties: |
        kie.flyway.enabled=true
    Copy to Clipboard Toggle word wrap
  2. Ensure all required resources are recreated, including SonataFlow CRDs, ConfigMaps, or any other related custom configurations.
  3. Redeploy the workflow by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>
    Copy to Clipboard Toggle word wrap

Workflows with the gitops profile that were previously scaled down must be scaled back up to continue operation.

Procedure

  1. Modify the my-workflow.yaml CRD and scale up each workflow to one before upgrading as shown in the following example:

    spec:
      podTemplate:
        replicas: 1
    Copy to Clipboard Toggle word wrap
  2. Apply the updated CRD by running the following command:

    $ oc apply -f <my-workflow.yaml> -n <target_namespace>
    Copy to Clipboard Toggle word wrap
  3. (Optional) Scale the workflow back to 1 by running the following command:

    $ oc patch sonataflow <my-workflow> -n <target_namespace> --type=merge -p '{"spec": {"podTemplate": {"replicas": 1}}}'
    Copy to Clipboard Toggle word wrap

8.1.3.6. Verifying the upgrade

After restoring workflows and services, it is essential to verify that the upgrade was successful and that all components are functioning as expected.

Procedure

  1. Check if all workflows and services are running by entering the following command:

    $ oc get pods -n <target_namespace>
    Copy to Clipboard Toggle word wrap

    Ensure that all pods related to workflows, Data Index, and Jobs Service are in a Running or Completed state.

  2. Verify that the OpenShift Serverless Logic Operator is running correctly by entering the following command:

    $ oc get clusterserviceversion logic-operator-rhel8.v1.35.0 -n openshift-serverless-logic
    Copy to Clipboard Toggle word wrap

    Expected output

    NAME                           DISPLAY                               VERSION   REPLACES                       PHASE
    logic-operator-rhel8.v1.35.0   OpenShift Serverless Logic Operator   1.35.0    logic-operator-rhel8.v1.34.0   Succeeded
    Copy to Clipboard Toggle word wrap

  3. Check Operator logs for any errors by entering the following command:

    $ oc logs -l control-plane=sonataflow-operator -n openshift-serverless-logic
    Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat