From f3c3c57bbfe3be5368cdae3b53ba45ef775867c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Fri, 24 Jul 2026 10:14:54 +0200 Subject: [PATCH] Remove syncWaves from applications This change allows ArgoCD to start every applications at the same time. This change, in addition to the automated sync and the retry policy, converges toward a better Validated Patterns integration: they mostly rely on the "eventually converging" for the applications. Doing so also enables a faster deployment: in CI, getting up to the Controlplane takes about 15 minutes - it was closer to 20 minutes with the sync-waves. Claude Opus 4.6 was used to ensure tests and documentation were consistent. --- charts/all/rhoso-gitops/README.md | 38 ++++++++----------- .../rhoso-gitops/tests/application_test.yaml | 28 +++++++++++--- charts/all/rhoso-gitops/values.yaml | 7 ---- overrides/values-rhoso-gitops.yaml | 7 ---- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/charts/all/rhoso-gitops/README.md b/charts/all/rhoso-gitops/README.md index 8d0d963..4f64c42 100644 --- a/charts/all/rhoso-gitops/README.md +++ b/charts/all/rhoso-gitops/README.md @@ -150,29 +150,23 @@ Enabled by default in chart `values.yaml` except `openstack-secrets` `overrides/values-rhoso-gitops.yaml` pin paths to the upstream `example/*` directories at tag `v0.1.0`. -| Application | Purpose (summary) | Default `syncWave` | Sync | -| --- | --- | --- | --- | -| `operator-dependencies` | Infra + optional VSO/ESO via `kustomize.components` | `-20` | automated | -| `openstack-operator` | OpenStack operator | `-20` | automated | -| `openstack-operator-cr` | Main `OpenStack` CR | `-15` | automated | -| `openstack-secrets` | Secure-backend sync (disabled until configured) | `-10` | automated | -| `openstack-networks` | Networks | `0` | automated | -| `openstack-controlplane` | `OpenStackControlPlane` | `10` | automated | -| `openstack-dataplane` | Data plane | `20` | automated | - -### Sync wave ordering - -```mermaid -flowchart TD -A["operator-dependencies (-20)"] --> C["openstack-operator-cr (-15)"] -B["openstack-operator (-20)"] --> C -C --> D["openstack-secrets (-10)"] -D --> E["openstack-networks (0)"] -E --> F["openstack-controlplane (10)"] -F --> G["openstack-dataplane (20)"] -``` +| Application | Purpose (summary) | Sync | +| --- | --- | --- | +| `operator-dependencies` | Infra + optional VSO/ESO via `kustomize.components` | automated | +| `openstack-operator` | OpenStack operator | automated | +| `openstack-operator-cr` | Main `OpenStack` CR | automated | +| `openstack-secrets` | Secure-backend sync (disabled until configured) | automated | +| `openstack-networks` | Networks | automated | +| `openstack-controlplane` | `OpenStackControlPlane` | automated | +| `openstack-dataplane` | Data plane | automated | + +### Deployment convergence + +All applications deploy at sync-wave `0` (the default) and converge +eventually. Argo CD launches every child application simultaneously when the +parent **rhoso-gitops** Application syncs; each child then retries +(per `syncPolicy.retry`) until its upstream dependencies are satisfied. -Sync waves apply when Argo CD deploys the parent **rhoso-gitops** Application (app-of-apps). After changing overrides, confirm child apps in the Argo CD UI or with `oc get applications -n openshift-gitops`. diff --git a/charts/all/rhoso-gitops/tests/application_test.yaml b/charts/all/rhoso-gitops/tests/application_test.yaml index acab2e5..575b661 100644 --- a/charts/all/rhoso-gitops/tests/application_test.yaml +++ b/charts/all/rhoso-gitops/tests/application_test.yaml @@ -29,7 +29,7 @@ tests: value: resources-finalizer.argocd.argoproj.io/foreground - equal: path: metadata.annotations["argocd.argoproj.io/sync-wave"] - value: "10" + value: "0" - equal: path: spec.project value: default @@ -118,6 +118,28 @@ tests: path: metadata.annotations["argocd.argoproj.io/sync-wave"] value: "0" + - it: uses explicit syncWave when set + set: + applicationNamespace: openshift-gitops + destinationServer: https://kubernetes.default.svc + applications: + late-app: + enabled: true + repoURL: https://github.com/example/repo + path: "." + targetRevision: main + syncWave: "10" + syncPolicy: + syncOptions: + - Prune=true + documentSelector: + path: metadata.name + value: late-app + asserts: + - equal: + path: metadata.annotations["argocd.argoproj.io/sync-wave"] + value: "10" + - it: omits spec.source.kustomize when not set in values values: - ../values.yaml @@ -138,7 +160,6 @@ tests: repoURL: https://github.com/example/repo path: examples/foo targetRevision: main - syncWave: "0" syncPolicy: syncOptions: - Prune=true @@ -166,7 +187,6 @@ tests: enabled: true path: "." targetRevision: main - syncWave: "0" asserts: - failedTemplate: errorPattern: repoURL @@ -181,7 +201,6 @@ tests: repoURL: https://github.com/example/repo path: "." targetRevision: main - syncWave: "0" asserts: - failedTemplate: errorPattern: destinationServer @@ -262,7 +281,6 @@ tests: repoURL: https://github.com/example/repo path: "." targetRevision: main - syncWave: "0" finalizers: - resources-finalizer.argocd.argoproj.io/invalid asserts: diff --git a/charts/all/rhoso-gitops/values.yaml b/charts/all/rhoso-gitops/values.yaml index 61be887..cd5d999 100644 --- a/charts/all/rhoso-gitops/values.yaml +++ b/charts/all/rhoso-gitops/values.yaml @@ -21,7 +21,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-20" targetRevision: v0.1.0 # Deploy openstack-operator. # This covers "Deploying RHOSO - chapter 1" @@ -40,7 +39,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-20" targetRevision: v0.1.0 # Create the main OpenStack Custom Resource. # This covers "Deploying RHOSO - chapter 1" @@ -59,7 +57,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-15" targetRevision: v0.1.0 # Create cluster secrets by syncing from the secure backend (placeholder path). # Runs after operator-dependencies provides vault-secrets-operator or external-secrets-operator. @@ -79,7 +76,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-10" targetRevision: v0.1.0 # Create underlying networks for controlplane and dataplane. # Covers "Deploying RHOSO - chapter 3" @@ -98,7 +94,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "0" targetRevision: v0.1.0 # Deploy and configure OpenStackControlPlane resource. # Covers "Deploying RHOSO - chapter 4" @@ -119,7 +114,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "10" targetRevision: v0.1.0 # Deploy and configure OpenStackDataPlaneNodeSet and OpenStackDataPlaneDeployment resources. # Covers "Deploying RHOSO - chapter 5" @@ -138,5 +132,4 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "20" targetRevision: v0.1.0 diff --git a/overrides/values-rhoso-gitops.yaml b/overrides/values-rhoso-gitops.yaml index 7ce0dd1..38a8719 100644 --- a/overrides/values-rhoso-gitops.yaml +++ b/overrides/values-rhoso-gitops.yaml @@ -18,7 +18,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-20" openstack-operator: enabled: true repoURL: https://github.com/openstack-k8s-operators/gitops @@ -34,7 +33,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-20" openstack-operator-cr: enabled: true repoURL: https://github.com/openstack-k8s-operators/gitops @@ -50,7 +48,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-15" openstack-secrets: enabled: false repoURL: https://github.com/openstack-k8s-operators/gitops @@ -66,7 +63,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "-10" openstack-networks: enabled: true repoURL: https://github.com/openstack-k8s-operators/gitops @@ -82,7 +78,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "0" openstack-controlplane: enabled: true repoURL: https://github.com/openstack-k8s-operators/gitops @@ -100,7 +95,6 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "10" openstack-dataplane: enabled: true repoURL: https://github.com/openstack-k8s-operators/gitops @@ -116,4 +110,3 @@ applications: maxDuration: 3m syncOptions: - Prune=true - syncWave: "20"