diff --git a/content/patterns/rhoso-gitops/troubleshooting.adoc b/content/patterns/rhoso-gitops/troubleshooting.adoc index c32b53fb3..4e87dc30c 100644 --- a/content/patterns/rhoso-gitops/troubleshooting.adoc +++ b/content/patterns/rhoso-gitops/troubleshooting.adoc @@ -32,18 +32,18 @@ The pattern uses two Argo CD namespaces. List applications in each: [source,terminal] ---- $ oc get applications -n vp-gitops -$ oc get applications -n openshift-gitops +$ oc get applications -n rhoso-gitops-standalone ---- Inspect a child application that is out of sync or unhealthy: [source,terminal] ---- -$ oc describe application -n openshift-gitops +$ oc describe application -n rhoso-gitops-standalone ---- -Use the Argo CD UI in the `openshift-gitops` namespace to review sync waves, -resource health, and diff details for upstream overlays. +Use the Argo CD UI in the `rhoso-gitops-standalone` namespace to review +application status, resource health, and diff details for upstream overlays. [id="rhoso-gitops-check-pods"] == Checking pod status @@ -75,8 +75,8 @@ $ oc logs -n `overrides/values-rhoso-gitops.yaml` match a tag or branch that exists in link:https://github.com/openstack-k8s-operators/gitops[openstack-k8s-operators/gitops]. * *Operator install delays* — Infrastructure operators in `operator-dependencies` - subscribe from the cluster catalog; allow time for OLM to resolve CSVs before - later sync waves run. + subscribe from the cluster catalog; allow time for OLM to resolve CSVs. + Other applications retry automatically until their dependencies are satisfied. For community support, open an issue in the link:https://github.com/validatedpatterns-sandbox/rhoso-gitops/issues[pattern repository]. diff --git a/modules/rhoso-gitops/rhoso-gitops-about.adoc b/modules/rhoso-gitops/rhoso-gitops-about.adoc index 29fcb8367..1e97349b7 100644 --- a/modules/rhoso-gitops/rhoso-gitops-about.adoc +++ b/modules/rhoso-gitops/rhoso-gitops-about.adoc @@ -52,7 +52,7 @@ fan-out. | Initial cluster | Yes | Validated Patterns clustergroup (`values-standalone.yaml`), *rhoso-gitops* - meta-chart, and child {rh-rhoso-short} Applications in `openshift-gitops` + meta-chart, and child {rh-rhoso-short} Applications in `rhoso-gitops-standalone` | Managed clusters | None diff --git a/modules/rhoso-gitops/rhoso-gitops-architecture.adoc b/modules/rhoso-gitops/rhoso-gitops-architecture.adoc index bd032a8cd..d4976015e 100644 --- a/modules/rhoso-gitops/rhoso-gitops-architecture.adoc +++ b/modules/rhoso-gitops/rhoso-gitops-architecture.adoc @@ -17,25 +17,26 @@ The delivery path is: . Validated Patterns operator reconciles the pattern clustergroup . Parent *rhoso-gitops* Application runs in `vp-gitops` (Validated Patterns GitOps) -. Meta-chart renders child Applications in `openshift-gitops` ({gitops-title}) +. Meta-chart renders child Applications in `rhoso-gitops-standalone` (dedicated Argo CD instance) . Child apps sync upstream `example/*` overlays in order (operators, networks, control plane, dataplane) -.GitOps application delivery and sync-wave ordering +.GitOps application delivery image::rhoso-gitops/rhoso-gitops-applications.svg[{rhoso-gitops-pattern} GitOps application delivery,700] The diagram shows the parent Application in `vp-gitops`, child Applications in -`openshift-gitops`, and the upstream Kustomize overlays they sync. Sync-wave -annotations order deployment from infrastructure operators through the data -plane. +`rhoso-gitops-standalone`, and the upstream Kustomize overlays they sync. +All child applications deploy at sync-wave 0 and converge eventually through +retry policies. [id="rhoso-gitops-dual-argocd"] == Dual Argo CD namespaces * The pattern operator deploys the parent *rhoso-gitops* Application into *`vp-gitops`* (Validated Patterns GitOps). -* Child {rh-rhoso-short} Applications are created in *`openshift-gitops`* - ({gitops-title} operator), per the meta-chart defaults. +* Child {rh-rhoso-short} Applications are created in *`rhoso-gitops-standalone`*, + a dedicated Argo CD instance managed by the pattern (see `applicationNamespace` + in the chart). [id="rhoso-gitops-infrastructure-topology"] == Infrastructure topology @@ -55,44 +56,39 @@ image::rhoso-gitops/rhoso-gitops-infrastructure.svg[{rhoso-gitops-pattern} infra * *Data plane hosts* — one or more {rhel-short} compute nodes run {rh-rhoso-short} dataplane elements, connected to the control plane -[id="rhoso-gitops-sync-waves"] -== Application sync order +[id="rhoso-gitops-deployment-convergence"] +== Deployment convergence -Child Applications deploy in sync-wave order when Argo CD reconciles the parent -*rhoso-gitops* Application: +All child Applications deploy at sync-wave `0` (the default) when Argo CD +reconciles the parent *rhoso-gitops* Application. Argo CD launches every child +simultaneously; each retries (per `syncPolicy.retry`) until its upstream +dependencies are satisfied and converges eventually. -[cols="2,3,1",options="header"] +[cols="2,3",options="header"] |=== -| Application | Purpose | Sync wave +| Application | Purpose | `operator-dependencies` | Infrastructure operators (cert-manager, MetalLB, nmstate, observability) -| `-20` | `openstack-operator` | OpenStack operator subscription -| `-20` | `openstack-operator-cr` | Main `OpenStack` custom resource -| `-15` | `openstack-secrets` | Secure-backend sync (disabled by default) -| `-10` | `openstack-networks` | Network configuration -| `0` | `openstack-controlplane` | `OpenStackControlPlane` -| `10` | `openstack-dataplane` | Data plane -| `20` |=== After changing overrides, confirm child apps in the Argo CD UI or with -`oc get applications -n openshift-gitops`. +`oc get applications -n rhoso-gitops-standalone`. diff --git a/modules/rhoso-gitops/rhoso-gitops-configuration.adoc b/modules/rhoso-gitops/rhoso-gitops-configuration.adoc index 009c86c89..214e68034 100644 --- a/modules/rhoso-gitops/rhoso-gitops-configuration.adoc +++ b/modules/rhoso-gitops/rhoso-gitops-configuration.adoc @@ -53,39 +53,50 @@ link:https://github.com/openstack-k8s-operators/gitops[openstack-k8s-operators/g at the revision pinned in `overrides/values-rhoso-gitops.yaml`. .Default upstream applications -[cols="2,2,1",options="header"] +[cols="2,2,1,1",options="header"] |=== -| Argo CD application | Upstream path | Enabled +| Argo CD application | Upstream path | Enabled | Sync | `operator-dependencies` | `example/dependencies` | yes +| automated | `openstack-operator` | `example/openstack-operator` | yes +| automated | `openstack-operator-cr` | `example/openstack-operator-cr` | yes +| automated | `openstack-secrets` | not configured (`path: TODO`) | no +| automated | `openstack-networks` | `example/openstack-networks` | yes +| automated | `openstack-controlplane` | `example/openstack-controlplane` | yes +| automated | `openstack-dataplane` | `example/openstack-dataplane` | yes +| automated |=== +All applications include a default retry policy (5 retries with exponential +backoff from 30 seconds to 3 minutes) to handle transient failures during +deployment convergence. + Product, framework, upstream Git, and operator versions are listed in the pattern repository link:https://github.com/validatedpatterns-sandbox/rhoso-gitops/blob/main/VERSIONS.md[VERSIONS.md] @@ -94,20 +105,45 @@ file. [id="rhoso-gitops-pin-revision"] == Pinning a different upstream revision +Child applications use *automated sync* by default: Argo CD reconciles them +whenever the upstream Git repository changes. If `targetRevision` points to a +branch name like `main` or `HEAD`, any push to that branch triggers an automatic +deployment, which can cause unexpected changes in production. + +[IMPORTANT] +==== +Always pin `targetRevision` to a *tag* or *commit hash* for stability. +==== + In `overrides/values-rhoso-gitops.yaml`: [source,yaml] ---- applications: openstack-operator: - targetRevision: "v0.2.0" + targetRevision: "v0.2.0" # tag — recommended openstack-controlplane: - targetRevision: "v0.2.0" + targetRevision: "abc123def456" # commit hash — also safe ---- Apply the same key under every application you want on that revision, or only the entries you need to change; unspecified keys keep chart defaults. +[id="rhoso-gitops-disable-automated-sync"] +== Disabling automated sync for an application + +To switch a specific application to manual sync, override its `syncPolicy` +without the `automated` key: + +[source,yaml] +---- +applications: + openstack-dataplane: + syncPolicy: + syncOptions: + - Prune=true +---- + [id="rhoso-gitops-disable-stage"] == Disabling a deployment stage diff --git a/modules/rhoso-gitops/rhoso-gitops-deploying.adoc b/modules/rhoso-gitops/rhoso-gitops-deploying.adoc index ef0cc72e9..e954b2974 100644 --- a/modules/rhoso-gitops/rhoso-gitops-deploying.adoc +++ b/modules/rhoso-gitops/rhoso-gitops-deploying.adoc @@ -67,7 +67,7 @@ $ ./pattern.sh make install [source,terminal] ---- $ oc get applications -n vp-gitops -$ oc get applications -n openshift-gitops +$ oc get applications -n rhoso-gitops-standalone ---- . After install, run the pattern health check: diff --git a/static/images/rhoso-gitops/rhoso-gitops-applications.svg b/static/images/rhoso-gitops/rhoso-gitops-applications.svg index 633860e1f..8c2453594 100644 --- a/static/images/rhoso-gitops/rhoso-gitops-applications.svg +++ b/static/images/rhoso-gitops/rhoso-gitops-applications.svg @@ -170,19 +170,19 @@ Validated Pattern: rhoso-​gitopsWave -20: operator-​dependenciesoperator-​dependenciesInfra + VSO/ESOWave -20: openstack-​operatoropenstack-​operatorOpenStack operatorWave -15: openstack-​operator-​cropenstack-​operator-​crMain OpenStack CRWave -10: openstack-​secretsopenstack-​secretsSecure backend syncWave 0: openstack-​networksopenstack-​networksNetworksWave 10: openstack-​controlplaneopenstack-​controlplaneOpenStackControlPlaneWave 20: openstack-​dataplaneopenstack-​dataplaneData planeOpenShift Cluster (OCP)Red Hat OpenStack Services on OpenShift syncWave 20converges syncWave 20converges syncWave 15converges syncWave 10converges syncWave 0converges syncWave 10converges