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 Log in to the OpenShift Container Platform web console as a cluster administrator. In the Administrator perspective, click Operators Installed Operators . Create or select the project where you want to create and configure a RolloutManager CR from the Project drop-down menu. Select Red Hat OpenShift GitOps from the installed Operators. In the Details tab, under the Provided APIs section, click Create instance in the RolloutManager pane. 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 1 Specifies whether high availability is enabled or not. If the value is set to true , high availability is enabled. Click Create . In the RolloutManager tab, under the RolloutManagers section, verify that the Status field of the RolloutManager instance shows Phase: Available . Verify the status of the Rollouts deployment by completing the following steps: In the Administrator perspective, click Workloads Deployments . Click the argo-rollouts deployment. Click the Details tab and confirm that the number of replicas in the Rollouts deployment is now set to 2. 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 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.

Commands:
apiVersion: argoproj.io/v1alpha1 kind: RolloutManager metadata: name: argo-rollouts namespace: openshift-gitops spec: ha: enabled: true 1
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