此内容没有您所选择的语言版本。

Chapter 8. Enabling high availability support for Argo Rollouts


Argo Rollouts support enabling high availability (HA) in the RolloutManager Custom Resource (CR). When you configure high availability in Argo Rollouts, the Red Hat OpenShift GitOps Operator automatically sets the number of pods to 2 for the Argo Rollouts controller using the .spec.ha field in the RolloutManager CR. It also activates leader election, allowing the pods to run in an active-passive process. A single pod actively manages rollouts, while the other pod remains in a passive state, ensuring the additional replica provides redundancy and availability if a node fails.

This feature benefits the Rollouts controller by ensuring it runs without downtime or manual intervention. It also operates during planned maintenance, as the second replica ensures the controller runs smoothly. Enabling high availability in Argo Rollouts ensures the controller remains reliable and resilient, even during node failures or heavy workloads.

The Red Hat OpenShift GitOps Operator also ensures that anti-affinity rules apply by default. Although these rules are not user-defined, they ensure the controller pods distribute across different nodes to avoid a single point of failure, providing resilience against node failure.

Prerequisites

  • You are logged in to the OpenShift Container Platform cluster as an administrator.
  • You installed Red Hat OpenShift GitOps on your OpenShift Container Platform cluster.
  • You installed Argo Rollouts on your OpenShift Container Platform cluster.

8.1. Configuring high availability for Argo Rollouts

To enable high availability, configure the ha specification in the RolloutManager custom resource (CR) by completing the following steps:

Procedure

  1. Log in to the OpenShift Container Platform web console as a cluster administrator.
  2. In the Administrator perspective, click Operators Installed Operators.
  3. Create or select the project where you want to create and configure a RolloutManager CR from the Project drop-down menu.
  4. Select Red Hat OpenShift GitOps from the installed Operators.
  5. In the Details tab, under the Provided APIs section, click Create instance in the RolloutManager pane.
  6. On the Create RolloutManager page, select the YAML view and edit the YAML.

    Example enabling the ha field in the RolloutManager CR

    apiVersion: argoproj.io/v1alpha1
    kind: RolloutManager
    metadata:
      name: argo-rollouts
      namespace: openshift-gitops
    spec:
      ha:
        enabled: true 
    1
    Copy to Clipboard Toggle word wrap

    1
    Specifies whether high availability is enabled or not. If the value is set to true, high availability is enabled.
  7. Click Create.
  8. In the RolloutManager tab, under the RolloutManagers section, verify that the Status field of the RolloutManager instance shows Phase: Available.
  9. Verify the status of the Rollouts deployment by completing the following steps:

    1. In the Administrator perspective, click Workloads Deployments.
    2. Click the argo-rollouts deployment.
    3. Click the Details tab and confirm that the number of replicas in the Rollouts deployment is now set to 2.
    4. Click the YAML tab and confirm that the following configuration is displayed:

      Example Argo Rollouts deployment configuration file

      kind: Deployment
      metadata:
        name: argo-rollouts
        namespace: openshift-gitops
      spec:
        replicas: 2 
      1
      
        selector:
          matchLabels:
            app.kubernetes.io/name: argo-rollouts
        template:
          metadata:
            creationTimestamp: null
            labels:
              app.kubernetes.io/name: argo-rollouts
          spec:
            containers:
                args:
                  - '--leader-elect'
                  - 'true' 
      2
      Copy to Clipboard Toggle word wrap

      1
      Specifies the number of pods.
      2
      Specifies that the --leader-elect=true flag is passed to the Rollouts deployment. Although this flag is set to true by default, explicitly setting it ensures that leader election remains consistently enforced.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat