Chapter 8. Enabling high availability support for Argo Rollouts
Argo Rollouts supports high availability (HA) through the RolloutManager custom resource (CR). When you enable HA, the Red Hat OpenShift GitOps Operator sets the number of pods to 2 for the Argo Rollouts controller using the .spec.ha field. It also activates leader election, so the pods run in an active-passive configuration. One pod actively manages rollouts, while the other remains passive and provides redundancy if a node fails.
HA ensures the Rollouts controller runs without downtime or manual intervention. The second replica keeps the controller running smoothly during planned maintenance. The controller remains reliable and resilient even during node failures or heavy workloads.
The Red Hat OpenShift GitOps Operator also applies anti-affinity rules by default. These rules distribute controller pods across different nodes to avoid a single point of failure.
8.1. Prerequisites Copy linkLink copied to clipboard!
- 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.2. Configuring high availability for Argo Rollouts Copy linkLink copied to clipboard!
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
RolloutManagerCR 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
hafield in theRolloutManagerCR:apiVersion: argoproj.io/v1beta1 kind: RolloutManager metadata: name: argo-rollouts namespace: openshift-gitops spec: ha: enabled: truewhere:
spec.ha.enabled-
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:
apiVersion: apps/v1 kind: Deployment metadata: name: argo-rollouts namespace: openshift-gitops spec: replicas: 2 selector: matchLabels: app.kubernetes.io/name: argo-rollouts template: metadata: labels: app.kubernetes.io/name: argo-rollouts spec: containers: - name: argo-rollouts image: argoproj/argo-rollouts:latest args: - --leader-elect=truewhere:
spec.replicas- Specifies the number of pods.
spec.template.spec.containers.args-
Specifies that the
--leader-elect=trueflag is passed to the Rollouts deployment. The--leader-elect=trueflag enables leader election, allowing only one pod to actively manage rollouts while others remain in standby.
-
In the Administrator perspective, click Workloads