Search

Chapter 6. Upgrading an Operator-based broker deployment

download PDF

The procedures in this section show how to upgrade:

  • The AMQ Broker Operator version, using both the OpenShift command-line interface (CLI) and OperatorHub
  • The broker container image for an Operator-based broker deployment

6.1. Before you begin

This section describes some important considerations before you upgrade the Operator and broker container images for an Operator-based broker deployment.

  • Upgrading the Operator using either the OpenShift command-line interface (CLI) or OperatorHub requires cluster administrator privileges for your OpenShift cluster.
  • If you originally used the CLI to install the Operator, you should also use the CLI to upgrade the Operator. If you originally used OperatorHub to install the Operator (that is, it appears under Operators Installed Operators for your project in the OpenShift Container Platform web console), you should also use OperatorHub to upgrade the Operator. For more information about these upgrade methods, see:

  • If the redeliveryDelayMultiplier and the redeliveryCollisionAvoidanceFactor attributes are configured in the main broker CR in a 7.8.x or 7.9.x deployment, the new Operator is unable to reconcile any CR after you upgrade to 7.10.x. The reconcile fails because the data type of both attributes changed from float to string in 7.10.x.

    You can work around this issue by deleting the redeliveryDelayMultiplier and the redeliveryCollisionAvoidanceFactor attributes from the spec.deploymentPlan.addressSettings.addressSetting element. Then, configure the attributes in the brokerProperties element. For example:

    spec:
        ...
        brokerProperties:
        - "addressSettings.#.redeliveryMultiplier=2.1"
        - "addressSettings.#.redeliveryCollisionAvoidanceFactor=1.2"
    Note

    In the brokerProperties element, use the redeliveryMultiplier attribute name instead of the redeliveryDelayMultiplier attribute name that you deleted.

  • If you want to deploy the Operator to watch many namespaces, for example to watch all namespaces, you must:

    1. Make sure you have backed up all the CRs relating to broker deployments in your cluster.
    2. Uninstall the existing Operator.
    3. Deploy the 7.10 Operator to watch the namespaces you require.
    4. Check all your deployments and recreate if necessary.

6.2. Upgrading the Operator using the CLI

The procedures in this section show how to use the OpenShift command-line interface (CLI) to upgrade different versions of the Operator to the latest version available for AMQ Broker 7.10.

6.2.1. Prerequisites

  • You should use the CLI to upgrade the Operator only if you originally used the CLI to install the Operator. If you originally used OperatorHub to install the Operator (that is, the Operator appears under Operators Installed Operators for your project in the OpenShift Container Platform web console), you should use OperatorHub to upgrade the Operator. To learn how to upgrade the Operator using OperatorHub, see Section 6.3, “Upgrading the Operator using OperatorHub”.

6.2.2. Upgrading the Operator using the CLI

You can use the OpenShift command-line interface (CLI) to upgrade the Operator to the latest version for AMQ Broker 7.10.

Procedure

  1. In your web browser, navigate to the Software Downloads page for AMQ Broker 7.10.7 patches.
  2. Ensure that the value of the Version drop-down list is set to 7.10.7 and the Releases tab is selected.
  3. Next to AMQ Broker 7.10.7 Operator Installation and Example Files, click Download.

    Download of the amq-broker-operator-7.10.7-ocp-install-examples.zip compressed archive automatically begins.

  4. When the download has completed, move the archive to your chosen installation directory. The following example moves the archive to a directory called ~/broker/operator.

    $ mkdir ~/broker/operator
    $ mv amq-broker-operator-7.10.7-ocp-install-examples.zip ~/broker/operator
  5. In your chosen installation directory, extract the contents of the archive. For example:

    $ cd ~/broker/operator
    $ unzip amq-broker-operator-operator-7.10.7-ocp-install-examples.zip
  6. Log in to OpenShift Container Platform as an administrator for the project that contains your existing Operator deployment.

    $ oc login -u <user>
  7. Switch to the OpenShift project in which you want to upgrade your Operator version.

    $ oc project <project-name>
  8. In the deploy directory of the latest Operator archive that you downloaded and extracted, open the operator.yaml file.

    Note

    In the operator.yaml file, the Operator uses an image that is represented by a Secure Hash Algorithm (SHA) value. The comment line, which begins with a number sign (#) symbol, denotes that the SHA value corresponds to a specific container image tag.

  9. Open the operator.yaml file for your previous Operator deployment. Check that any non-default values that you specified in your previous configuration are replicated in the new operator.yaml configuration file.
  10. In the new operator.yaml file, the Operator is named controller-manager by default. Replace all instances of controller-manager with amq-broker-operator, which was the name of the Operator in previous versions, and save the file. For example:

    spec:
    ...
      selector
        matchLabels
          name: amq-broker-operator
    ...
  11. Update the CRDs that are included with the Operator. You must update the CRDs before you deploy the Operator.

    1. Update the main broker CRD.

      $ oc apply -f deploy/crds/broker_activemqartemis_crd.yaml
    2. Update the address CRD.

      $ oc apply -f deploy/crds/broker_activemqartemisaddress_crd.yaml
    3. Update the scaledown controller CRD.

      $ oc apply -f deploy/crds/broker_activemqartemisscaledown_crd.yaml
    4. Update the security CRD.

      $ oc apply -f deploy/crds/broker_activemqartemissecurity_crd.yaml
  12. If you are upgrading from AMQ Broker Operator 7.10.0 only, delete the Operator and the StatefulSet.

    By default, the new Operator deletes the StatefulSet to remove custom and Operator metering labels, which were incorrectly added to the StatefulSet selector by the Operator in 7.10.0. When the Operator deletes the StatefulSet, it also deletes the existing broker Pods, which causes a temporary broker outage. If you want to avoid an outage, complete the following steps to delete the Operator and the StatefulSet without deleting the broker Pods.

    1. Delete the Operator.

      $ oc delete -f deploy/operator.yaml
    2. Delete the StatefulSet with the --cascade=orphan option to orphan the broker Pods. The orphaned broker Pods continue to run after the StatefulSet is deleted.

      $ oc delete statefulset <statefulset-name> --cascade=orphan
  13. If you are upgrading from AMQ Broker Operator 7.10.0 or 7.10.1, check if your main broker CR has labels called application or ActiveMQArtemis configured in the deploymentPlan.labels attribute.

    These labels are reserved for the Operator to assign labels to Pods and are not permitted as custom labels after 7.10.1. If these custom labels were configured in the main broker CR, the Operator-assigned labels on the Pods were overwritten by the custom labels. If either of these custom labels are configured in the main broker CR, complete the following steps to restore the correct labels on the Pods and remove the labels from the CR.

    1. If you are upgrading from 7.10.0, you deleted the Operator in the previous step. If you are upgrading from 7.10.1, delete the Operator.

      $ oc delete -f deploy/operator.yaml
    2. Run the following command to restore the correct Pod labels. In the following example, 'ex-aao' is the name of the StatefulSet deployed.

      $ for pod in $(oc get pods | grep -o '^ex-aao[^ ]*') do; oc label --overwrite pods $pod ActiveMQArtemis=ex-aao application=ex-aao-app; done
    3. Delete the application and ActiveMQArtemis labels from the deploymentPlan.labels attribute in the CR.

      1. Log in to OpenShift as a user that has privileges to deploy CRs in the project for the broker deployment.

        oc login -u <user> -p <password> --server=<host:port>
      2. Open the sample CR file called broker_activemqartemis_cr.yaml that was included in the deploy/crs directory of the Operator installation archive that you downloaded and extracted.
      3. In the deploymentPlan.labels attribute in the CR, delete any custom labels called application or ActiveMQArtemis.
      4. Save the CR file.
      5. Deploy the CR instance.

        1. Switch to the project for the broker deployment.

          $ oc project <project_name>
        2. Apply the CR.

          $ oc apply -f <path/to/broker_custom_resource_instance>.yaml
    4. If you deleted the previous Operator, deploy the new Operator.

       $ oc create -f deploy/operator.yaml
  14. Apply the updated Operator configuration.

    $ oc apply -f deploy/operator.yaml
  15. The new Operator can recognize and manage your previous broker deployments. If automatic updates are enabled in the CR of your deployment, the Operator’s reconciliation process upgrades each broker pod. If automatic updates are not enabled, you can enable them by setting the following attributes in your CR:

    spec:
        ...
        upgrades:
            enabled: true
            minor: true

    For more information on enabling automatic updates, see, Section 6.4, “Upgrading the broker container image by specifying an AMQ Broker version”.

    Note

    If the reconciliation process does not start, you can start the process by scaling the deployment. For more information, see Section 3.4.1, “Deploying a basic broker instance”.

  16. Add attributes to the CR for the new features that are available in the upgraded broker, as required.

6.3. Upgrading the Operator using OperatorHub

This section describes how to use OperatorHub to upgrade the Operator for AMQ Broker.

6.3.1. Prerequisites

  • You should use OperatorHub to upgrade the Operator only if you originally used OperatorHub to install the Operator (that is, the Operator appears under Operators Installed Operators for your project in the OpenShift Container Platform web console). By contrast, if you originally used the OpenShift command-line interface (CLI) to install the Operator, you should also use the CLI to upgrade the Operator. To learn how to upgrade the Operator using the CLI, see Section 6.2, “Upgrading the Operator using the CLI”.
  • Upgrading the AMQ Broker Operator using OperatorHub requires cluster administrator privileges for your OpenShift cluster.

6.3.2. Before you begin

This section describes some important considerations before you use OperatorHub to upgrade an instance of the AMQ Broker Operator.

  • The Operator Lifecycle Manager automatically updates the CRDs in your OpenShift cluster when you install the latest Operator version from OperatorHub. You do not need to remove existing CRDs. If you remove existing CRDs, all CRs and broker instances are also removed.
  • When you update your cluster with the CRDs for the latest Operator version, this update affects all projects in the cluster. Any broker Pods deployed from previous versions of the Operator might become unable to update their status in the OpenShift Container Platform web console. When you click the Logs tab of a running broker Pod, you see messages indicating that 'UpdatePodStatus' has failed. However, the broker Pods and Operator in that project continue to work as expected. To fix this issue for an affected project, you must also upgrade that project to use the latest version of the Operator.
  • The procedure to follow depends on the Operator version that you are upgrading from. Ensure that you follow the upgrade procedure that is for your current version.

6.3.3. Upgrading the Operator from pre-7.10.0 to 7.10.1 or later

You can use OperatorHub to upgrade an instance of the Operator from pre-7.10.0 to 7.10.1 or later.

Procedure

  1. Log in to the OpenShift Container Platform web console as a cluster administrator.
  2. Uninstall the existing AMQ Broker Operator from your project.
  3. In the left navigation menu, click Operators Installed Operators.
  4. From the Project drop-down menu at the top of the page, select the project in which you want to uninstall the Operator.
  5. Locate the Red Hat Integration - AMQ Broker instance that you want to uninstall.
  6. For your Operator instance, click the More Options icon (three vertical dots) on the right-hand side. Select Uninstall Operator.
  7. On the confirmation dialog box, click Uninstall.
  8. Use OperatorHub to install the latest version of the Operator for AMQ Broker 7.10. For more information, see Section 3.3.2, “Deploying the Operator from OperatorHub”.

    If automatic updates are enabled in the CR of your deployment, the Operator’s reconciliation process upgrades each broker pod when the new Operator starts. If automatic updates are not enabled, you can enable them by setting the following attributes in your CR:

    spec:
        ...
        upgrades:
            enabled: true
            minor: true

    For more information on enabling automatic updates, see, Section 6.4, “Upgrading the broker container image by specifying an AMQ Broker version”.

    Note

    If the reconciliation process does not start, you can start the process by scaling the deployment. For more information, see Section 3.4.1, “Deploying a basic broker instance”.

6.3.4. Upgrading the Operator from 7.10.0 to 7.10.x

Use this procedure to upgrade from AMQ Broker Operator 7.10.0.

Procedure

  1. Log in to the OpenShift Container Platform web console as a cluster administrator.
  2. Uninstall the existing AMQ Broker Operator from your project.

    1. In the left navigation menu, click Operators Installed Operators.
    2. From the Project drop-down menu at the top of the page, select the project in which you want to uninstall the Operator.
    3. Locate the Red Hat Integration - AMQ Broker instance that you want to uninstall.
    4. For your Operator instance, click the More Options icon (three vertical dots) on the right-hand side. Select Uninstall Operator.
    5. On the confirmation dialog box, click Uninstall.
  3. When you upgrade a 7.10.0 Operator, the new Operator deletes the StatefulSet to remove custom and Operator metering labels, which were incorrectly added to the StatefulSet selector by the Operator in 7.10.0. When the Operator deletes the StatefulSet, it also deletes the existing broker pods, which causes a temporary broker outage. If you want to avoid the outage, complete the following steps to delete the StatefulSet and orphan the broker pods so that they continue to run.

    1. Log in to OpenShift Container Platform CLI as an administrator for the project that contains your existing Operator deployment:

      $ oc login -u <user>
    2. Switch to the OpenShift project in which you want to upgrade your Operator version.

      $ oc project <project-name>
    3. Delete the StatefulSet with the --cascade=orphan option to orphan the broker Pods. The orphaned broker Pods continue to run after the StatefulSet is deleted.

      $ oc delete statefulset <statefulset-name> --cascade=orphan
  4. Check if your main broker CR has labels called application or ActiveMQArtemis configured in the deploymentPlan.labels attribute.

    In 7.10.0, it was possible to configure these custom labels in the CR. These labels are reserved for the Operator to assign labels to Pods and cannot be added as custom labels after 7.10.0. If these custom labels were configured in the main broker CR in 7.10.0, the Operator-assigned labels on the Pods were overwritten by the custom labels. If the CR has either of these labels, complete the following steps to restore the correct labels on the Pods and remove the labels from the CR.

    1. In the OpenShift command-line interface (CLI), run the following command to restore the correct Pod labels. In the following example, 'ex-aao' is the name of the StatefulSet deployed.

      $ for pod in $(oc get pods | grep -o '^ex-aao[^ ]*') do; oc label --overwrite pods $pod ActiveMQArtemis=ex-aao application=ex-aao-app; done
    2. Delete the application and ActiveMQArtemis labels from the deploymentPlan.labels attribute in the CR.

      1. Using the OpenShift command-line interface:

        1. Log in to OpenShift as a user that has privileges to deploy CRs in the project for the broker deployment.

          oc login -u <user> -p <password> --server=<host:port>
        2. Open the sample CR file called broker_activemqartemis_cr.yaml that was included in the deploy/crs directory of the Operator installation archive that you downloaded and extracted.
        3. In the deploymentPlan.labels element in the CR, delete any custom labels called application or ActiveMQArtemis.
        4. Save the CR file.
        5. Deploy the CR instance.

          1. Switch to the project for the broker deployment.

            $ oc project <project_name>
          2. Apply the CR.

            $ oc apply -f <path/to/broker_custom_resource_instance>.yaml
      2. Using the OpenShift Container Platform web console:

        1. Log in to the console as a user that has privileges to deploy CRs in the project for the broker deployment.
        2. In the left pane, click Administration Custom Resource Definitions.
        3. Click the ActiveMQArtemis CRD.
        4. Click the Instances tab.
        5. Click the instance for your broker deployment.
        6. Click the YAML tab.

          Within the console, a YAML editor opens, enabling you to configure a CR instance.

        7. In the deploymentPlan.labels element in the CR, delete any custom labels called application or ActiveMQArtemis.
        8. Click Save.
  5. Use OperatorHub to install the latest version of the Operator for AMQ Broker 7.10. For more information, see Section 3.3.2, “Deploying the Operator from OperatorHub”.

    The new Operator can recognize and manage your previous broker deployments. If automatic updates are enabled in the CR of your deployment, the Operator’s reconciliation process upgrades each broker pod when the new Operator starts. If automatic updates are not enabled, you can enable them by setting the following attributes in your CR:

    spec:
        ...
        upgrades:
            enabled: true
            minor: true

    For more information on enabling automatic updates, see, Section 6.4, “Upgrading the broker container image by specifying an AMQ Broker version”.

    Note

    If the reconciliation process does not start, you can start the process by scaling the deployment. For more information, see Section 3.4.1, “Deploying a basic broker instance”.

  6. Add attributes to the CR for the new features that are available in the upgraded broker, as required.

6.3.5. Upgrading the Operator from 7.10.1 to 7.10.x

Use this procedure to upgrade from AMQ Broker Operator 7.10.1.

Procedure

  1. Log in to the OpenShift Container Platform web console as a cluster administrator.
  2. Check if your main broker CR has labels called application or ActiveMQArtemis configured in the deploymentPlan.labels attribute.

    These labels are reserved for the Operator to assign labels to Pods and cannot be used after 7.10.1. If these custom labels were configured in the main broker CR, the Operator-assigned labels on the Pods were overwritten by the custom labels.

  3. If these custom labels are not configured in the main broker CR, use OperatorHub to install the latest version of the Operator for AMQ Broker 7.10. For more information, see Section 3.3.2, “Deploying the Operator from OperatorHub”.
  4. If either of these custom labels are configured in the main broker CR, complete the following steps to uninstall the existing Operator, restore the correct Pod labels and remove the labels from the CR, before you install the new Operator.

    Note

    By uninstalling the Operator, you can remove the custom labels without the Operator deleting the StatefulSet, which also deletes the existing broker pods and causes a temporary broker outage.

    1. Uninstall the existing AMQ Broker Operator from your project.

      1. In the left navigation menu, click Operators Installed Operators.
      2. From the Project drop-down menu at the top of the page, select the project from which you want to uninstall the Operator.
      3. Locate the Red Hat Integration - AMQ Broker instance that you want to uninstall.
      4. For your Operator instance, click the More Options icon (three vertical dots) on the right-hand side. Select Uninstall Operator.
      5. On the confirmation dialog box, click Uninstall.
    2. In the OpenShift command-line interface (CLI), run the following command to restore the correct Pod labels. In the following example, 'ex-aao' is the name of the StatefulSet deployed.

      $ for pod in $(oc get pods | grep -o '^ex-aao[^ ]*') do; oc label --overwrite pods $pod ActiveMQArtemis=ex-aao application=ex-aao-app; done
    3. Delete the application and ActiveMQArtemis labels from the deploymentPlan.labels attribute in the CR.

      1. Using the OpenShift command-line interface:

        1. Log in to OpenShift as a user that has privileges to deploy CRs in the project for the broker deployment.

          oc login -u <user> -p <password> --server=<host:port>
        2. Open the sample CR file called broker_activemqartemis_cr.yaml that was included in the deploy/crs directory of the Operator installation archive that you downloaded and extracted.
        3. In the deploymentPlan.labels attribute in the CR, delete any custom labels called application or ActiveMQArtemis.
        4. Save the CR file.
        5. Deploy the CR instance.

          1. Switch to the project for the broker deployment.

            $ oc project <project_name>
          2. Apply the CR.

            $ oc apply -f <path/to/broker_custom_resource_instance>.yaml
      2. Using the OpenShift Container Platform web console:

        1. Log in to the console as a user that has privileges to deploy CRs in the project for the broker deployment.
        2. In the left pane, click Administration Custom Resource Definitions.
        3. Click the ActiveMQArtemis CRD.
        4. Click the Instances tab.
        5. Click the instance for your broker deployment.
        6. Click the YAML tab.

          Within the console, a YAML editor opens, enabling you to configure a CR instance.

        7. In the deploymentPlan.labels attribute in the CR, delete any custom labels called application or ActiveMQArtemis.
        8. Click Save.
  5. Use OperatorHub to install the latest version of the Operator for AMQ Broker 7.10. For more information, see Section 3.3.2, “Deploying the Operator from OperatorHub”.

    The new Operator can recognize and manage your previous broker deployments. If automatic updates are enabled in the CR of your deployment, the Operator’s reconciliation process upgrades each broker pod when the new Operator starts. If automatic updates are not enabled, you can enable them by setting the following attributes in your CR:

    spec:
        ...
        upgrades:
            enabled: true
            minor: true

    For more information on enabling automatic updates, see, Section 6.4, “Upgrading the broker container image by specifying an AMQ Broker version”.

    Note

    If the reconciliation process does not start, you can start the process by scaling the deployment. For more information, see Section 3.4.1, “Deploying a basic broker instance”.

  6. Add attributes to the CR for the new features that are available in the upgraded broker, as required.

6.4. Upgrading the broker container image by specifying an AMQ Broker version

The following procedure shows how to upgrade the broker container image for an Operator-based broker deployment by specifying an AMQ Broker version. You might do this, for example, if you upgrade the Operator to AMQ Broker 7.10.0 but the spec.upgrades.enabled property in your CR is already set to true and the spec.version property specifies 7.9.0. To upgrade the broker container image, you need to manually specify a new AMQ Broker version (for example, 7.10.0). When you specify a new version of AMQ Broker, the Operator automatically chooses the broker container image that corresponds to this version.

Prerequisites

  • As described in Section 2.4, “How the Operator chooses container images”, if you deploy a CR and do not explicitly specify a broker container image, the Operator automatically chooses the appropriate container image to use. To use the upgrade process described in this section, you must use this default behavior. If you override the default behavior by directly specifying a broker container image in your CR, the Operator cannot automatically upgrade the broker container image to correspond to an AMQ Broker version as described below.

Procedure

  1. Edit the main broker CR instance for the broker deployment.

    1. Using the OpenShift command-line interface:

      1. Log in to OpenShift as a user that has privileges to edit and deploy CRs in the project for the broker deployment.

        $ oc login -u <user> -p <password> --server=<host:port>
      2. In a text editor, open the CR file that you used for your broker deployment. For example, this might be the broker_activemqartemis_cr.yaml file that was included in the deploy/crs directory of the Operator installation archive that you previously downloaded and extracted.
    2. Using the OpenShift Container Platform web console:

      1. Log in to the console as a user that has privileges to edit and deploy CRs in the project for the broker deployment.
      2. In the left pane, click Administration Custom Resource Definitions.
      3. Click the ActiveMQArtemis CRD.
      4. Click the Instances tab.
      5. Locate the CR instance that corresponds to your project namespace.
      6. For your CR instance, click the More Options icon (three vertical dots) on the right-hand side. Select Edit ActiveMQArtemis.

        Within the console, a YAML editor opens, enabling you to edit the CR instance.

  2. To specify a version of AMQ Broker to which to upgrade the broker container image, set a value for the spec.version property of the CR. For example:

    spec:
        version: 7.10.0
        ...
  3. In the spec section of the CR, locate the upgrades section. If this section is not already included in the CR, add it.

    spec:
        version: 7.10.0
        ...
        upgrades:
  4. Ensure that the upgrades section includes the enabled and minor properties.

    spec:
        version: 7.10.0
        ...
        upgrades:
            enabled:
            minor:
  5. To enable an upgrade of the broker container image based on a specified version of AMQ Broker, set the value of the enabled property to true.

    spec:
        version: 7.10.0
        ...
        upgrades:
            enabled: true
            minor:
  6. To define the upgrade behavior of the broker, set a value for the minor property.

    1. To allow upgrades between minor AMQ Broker versions, set the value of minor to true.

      spec:
          version: 7.10.0
          ...
          upgrades:
              enabled: true
              minor: true

      For example, suppose that the current broker container image corresponds to 7.9.0, and a new image, corresponding to the 7.10.0 version specified for spec.version, is available. In this case, the Operator determines that there is an available upgrade between the 7.9.0 and 7.10.0 minor versions. Based on the preceding settings, which allow upgrades between minor versions, the Operator upgrades the broker container image.

      By contrast, suppose that the current broker container image corresponds to 7.10.0, and you specify a new value of 7.10.1 for spec.version. If an image corresponding to 7.10.1 exists, the Operator determines that there is an available upgrade between 7.10.0 and 7.10.1 micro versions. Based on the preceding settings, which allow upgrades only between minor versions, the Operator does not upgrade the broker container image.

    2. To allow upgrades between micro AMQ Broker versions, set the value of minor to false.

      spec:
          version: 7.10.0
          ...
          upgrades:
              enabled: true
              minor: false

      For example, suppose that the current broker container image corresponds to 7.9.0, and a new image, corresponding to the 7.10.0 version specified for spec.version, is available. In this case, the Operator determines that there is an available upgrade between the 7.9.0 and 7.10.0 minor versions. Based on the preceding settings, which do not allow upgrades between minor versions (that is, only between micro versions), the Operator does not upgrade the broker container image.

      By contrast, suppose that the current broker container image corresponds to 7.10.0, and you specify a new value of 7.10.1 for spec.version. If an image corresponding to 7.10.1 exists, the Operator determines that there is an available upgrade between 7.10.0 and 7.10.1 micro versions. Based on the preceding settings, which allow upgrades between micro versions, the Operator upgrades the broker container image.

  7. Apply the changes to the CR.

    1. Using the OpenShift command-line interface:

      1. Save the CR file.
      2. Switch to the project for the broker deployment.

        $ oc project <project_name>
      3. Apply the CR.

        $ oc apply -f <path/to/broker_custom_resource_instance>.yaml
    2. Using the OpenShift web console:

      1. When you have finished editing the CR, click Save.

    When you apply the CR change, the Operator first validates that an upgrade to the AMQ Broker version specified for spec.version is available for your existing deployment. If you have specified an invalid version of AMQ Broker to which to upgrade (for example, a version that is not yet available), the Operator logs a warning message, and takes no further action.

    However, if an upgrade to the specified version is available, and the values specified for upgrades.enabled and upgrades.minor allow the upgrade, then the Operator upgrades each broker in the deployment to use the broker container image that corresponds to the new AMQ Broker version.

    The broker container image that the Operator uses is defined in an environment variable in the operator.yaml configuration file of the Operator deployment. The environment variable name includes an identifier for the AMQ Broker version. For example, the environment variable RELATED_IMAGE_ActiveMQ_Artemis_Broker_Kubernetes_7100 corresponds to AMQ Broker 7.10.7.

    When the Operator has applied the CR change, it restarts each broker Pod in your deployment so that each Pod uses the specified image version. If you have multiple brokers in your deployment, only one broker Pod shuts down and restarts at a time.

Additional resources

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.

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.

© 2024 Red Hat, Inc.