Chapter 2. Using Progressive Sync in OpenShift GitOps
Progressive Sync is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
Progressive Sync is an advanced feature that improves application rollout strategies by managing synchronization stages across multiple clusters. GitOps, based on Argo CD, introduces a Progressive Sync status panel in the Application details view. Use this feature to visually monitor rollout waves, synchronization status, and application health during deployments managed by an ApplicationSet controller with a RollingSync strategy.
In addition, you can use the Red Hat OpenShift GitOps console to display real-time Progressive sync status, improve operational awareness, and simplify troubleshooting during staged rollouts.
2.1. Overview of enabling Progressive Sync Copy linkLink copied to clipboard!
Progressive Sync in GitOps enables administrators to orchestrate safe, staged rollouts of changes across groups of applications.
When enabled:
- The UI displays rollout wave, health, and messages for each application.
- Teams can track rollout progress, identify bottlenecks, and ensure compliance with deployment policies.
-
A new section, Progressive Sync, appears in the Application details panel when an application is managed by an
ApplicationSetcontroller with theRollingSyncstrategy.
This feature enhances transparency for multi-wave, staged, or progressive deployments managed through GitOps.
2.2. Prerequisites Copy linkLink copied to clipboard!
- You have logged in to the OpenShift Container Platform cluster as an administrator.
- You have installed the GitOps Operator on your OpenShift Container Platform cluster.
-
You can access the default Argo CD instance in the
openshift-gitopsnamespace. -
You have created an Argo CD ApplicationSet resource in your defined namespace, for example,
openshift-gitops. -
You have created a few Argo CD applications using the above Argo CD ApplicationSet resources, in your defined namespace, for example,
openshift-gitops.
2.3. Enabling Progressive Sync Copy linkLink copied to clipboard!
Progressive Sync is not enabled by default. You must explicitly enable this feature for the ApplicationSet controller in GitOps. You can enable this feature using either one of the following two methods:
-
Add the
extraCommandArgsargument to the Argo CD CR -
Set the
envenvironment variable in the Argo CD CR
2.3.1. Adding the extraCommandArgs argument to the Argo CD CR Copy linkLink copied to clipboard!
You can enable Progressive Sync by adding the extraCommandArgs argument in the spec section of your Argo CD CR.
Procedure
- Log in to the OpenShift Container Platform web console.
-
In the Administrator perspective of the web console, click Operators
Installed Operators. -
From the Project list, select the default Argo CD instance in the
openshift-gitopsnamespace. - From the installed Operators list, select Red Hat OpenShift GitOps, and then click the Argo CD tab.
Add the following YAML configuration in the
specsection of the Argo CD instance.Example adding the
enable-progressive-syncsparameter:apiVersion: argoproj.io/v1alpha1 kind: ArgoCD metadata: name: openshift-gitops namespace: openshift-gitops spec: applicationSet: extraCommandArgs: - --enable-progressive-syncsClick Save.
The Operator automatically reconciles and updates the
ApplicationSetcontroller deployment.
2.3.2. Setting the env environment variable in the Argo CD CR Copy linkLink copied to clipboard!
You can also enable Progressive Sync by setting the env environment variable in the Argo CD CR.
Procedure
- Log in to the OpenShift Container Platform web console.
-
In the Administrator perspective of the web console, click Operators
Installed Operators. -
From the Project list, select the default Argo CD instance in the
openshift-gitopsnamespace. - From the installed Operators list, select Red Hat OpenShift GitOps, and then click the Argo CD tab.
Add the following YAML configuration in the
specsection of the Argo CD instance.Example adding the
enable-progressive-syncsparameter:apiVersion: argoproj.io/v1alpha1 kind: ArgoCD metadata: name: openshift-gitops namespace: openshift-gitops spec: applicationSet: env: - name: ARGOCD_APPLICATIONSET_CONTROLLER_ENABLE_PROGRESSIVE_SYNCS value: "true"Click Save.
The Operator automatically reconciles and updates the
ApplicationSetcontroller deployment.
2.4. Creating an ApplicationSet manifest using RollingSync Copy linkLink copied to clipboard!
To configure Progressive Sync, you must select one of two strategies, RollingSync or AllAtOnce. The Progressive Sync status is displayed in the GitOps Operator Web UI when the rollingSync strategy is defined in the ApplicationSet manifest.
Procedure
Set the
RollingSyncparameter for theApplicationSetspec. The following example contains a sample YAML configuration.Example enabling
rollingsyncparameter to use Progressive Sync:apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: guestbook-rollingsync namespace: openshift-gitops spec: generators: - list: elements: - cluster: in-cluster env: dev - cluster: in-cluster env: qa - cluster: in-cluster env: prod strategy: type: RollingSync rollingSync: steps: - matchExpressions: - key: envLabel operator: In values: [dev] - matchExpressions: - key: envLabel operator: In values: [qa] maxUpdate: 0 - matchExpressions: - key: envLabel operator: In values: [prod] maxUpdate: 10% template: metadata: name: 'guestbook-{{.env}}' labels: envLabel: '{{.env}}' spec: project: default source: repoURL: https://github.com/your-org/your-repo.git targetRevision: HEAD path: guestbook/{{.env}} destination: server: https://kubernetes.default.svc namespace: guestbook-{{.env}}Apply the YAML file by running the following command:
$ oc apply -f guestbook-rollingsync.yamlNote-
When deploying an application by using the
ApplicationSetcontroller, the Argo CD controller will only manage an application in its own namespace. If an application is created in another namespace, it will not be recognized. -
RollingSyncupdates application groups sequentially based onmatchExpressions, and therollingSync.stepsfield defines which groups to sync and in what order using label selectors.
-
When deploying an application by using the
Verify that Red Hat OpenShift GitOps Operator has enabled Progressive Sync in the Argo CD Web UI by completing the following steps:
- In the Argo CD Web UI, navigate to the Argo CD Application details page for your deployed application.
In the Application Status panel, a new section,
PROGRESSIVE SYNCappears if the Progressive Sync feature is enabled successfully for your application.The Progressive Sync panel displays the following information:
Progressive Sync status fields:
Field Description Progressive Sync Status
Health status:
Waiting,Pending,Progressing,Healthy, orErrorWave
Current rollout wave number
Last Transition
Timestamp of the last state change
Message
Additional details or error messages
2.5. Troubleshooting when Progressive Sync section does not appear Copy linkLink copied to clipboard!
If the Progressive Sync section is missing from the Application details, verify the configuration and application resources.
-
Confirm that the application is managed by an
ApplicationSetcontroller with theRollingSyncstrategy. - Verify that Progressive Sync is enabled in the Argo CD CR.
Inspect the resources by running the following commands:
$ oc get applicationsets -n openshift-gitops $ oc get applications -n openshift-gitops
2.6. Troubleshooting when application shows Unknown state Copy linkLink copied to clipboard!
If the status of an application is Unknown, verify the application configuration and check the ApplicationSet controller logs.
- Ensure that the required labels and annotations are applied.
- Verify that the application exists in the same namespace as the Argo CD instance.
-
Review the
ApplicationSetcontroller logs for error messages.