Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 16 additions & 22 deletions charts/all/rhoso-gitops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
28 changes: 23 additions & 5 deletions charts/all/rhoso-gitops/tests/application_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -138,7 +160,6 @@ tests:
repoURL: https://github.com/example/repo
path: examples/foo
targetRevision: main
syncWave: "0"
syncPolicy:
syncOptions:
- Prune=true
Expand Down Expand Up @@ -166,7 +187,6 @@ tests:
enabled: true
path: "."
targetRevision: main
syncWave: "0"
asserts:
- failedTemplate:
errorPattern: repoURL
Expand All @@ -181,7 +201,6 @@ tests:
repoURL: https://github.com/example/repo
path: "."
targetRevision: main
syncWave: "0"
asserts:
- failedTemplate:
errorPattern: destinationServer
Expand Down Expand Up @@ -262,7 +281,6 @@ tests:
repoURL: https://github.com/example/repo
path: "."
targetRevision: main
syncWave: "0"
finalizers:
- resources-finalizer.argocd.argoproj.io/invalid
asserts:
Expand Down
7 changes: 0 additions & 7 deletions charts/all/rhoso-gitops/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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.
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -138,5 +132,4 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "20"
targetRevision: v0.1.0
7 changes: 0 additions & 7 deletions overrides/values-rhoso-gitops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "-20"
openstack-operator:
enabled: true
repoURL: https://github.com/openstack-k8s-operators/gitops
Expand All @@ -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
Expand All @@ -50,7 +48,6 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "-15"
openstack-secrets:
enabled: false
repoURL: https://github.com/openstack-k8s-operators/gitops
Expand All @@ -66,7 +63,6 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "-10"
openstack-networks:
enabled: true
repoURL: https://github.com/openstack-k8s-operators/gitops
Expand All @@ -82,7 +78,6 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "0"
openstack-controlplane:
enabled: true
repoURL: https://github.com/openstack-k8s-operators/gitops
Expand All @@ -100,7 +95,6 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "10"
openstack-dataplane:
enabled: true
repoURL: https://github.com/openstack-k8s-operators/gitops
Expand All @@ -116,4 +110,3 @@ applications:
maxDuration: 3m
syncOptions:
- Prune=true
syncWave: "20"
Loading