ArgoCD-managed configuration for the OAC OpenShift clusters. A bootstrap Application discovers ApplicationSets, which deploy Helm charts to the hub and managed clusters using ACM placements.
If you are working with this repository you will need:
You may want:
- ct the chart testing tool
- kustomize because everyone loves kustomize
- chainsaw for writing declarative tests of kubernetes
| Directory | Description |
|---|---|
bootstrap/ |
One-time setup: bootstrap Application and OIDC scripts |
applicationsets/ |
ArgoCD ApplicationSets (Helm chart rendered with hubName) |
applicationsets/templates/hub/ |
ApplicationSets targeting the hub cluster |
applicationsets/templates/managed/ |
ApplicationSets targeting managed (spoke) clusters via ACM |
charts/ |
Helm charts, one per component |
charts/operator-library/ |
Shared library chart providing helpers for operator installation |
values/ |
Per-hub, per-cluster Helm values overrides (optional) |
values/<hub>/ |
Hub-wide defaults, applied to every cluster in that hub |
values/<hub>/<cluster>/ |
Per-cluster overrides (local-cluster = the hub itself) |
apps/ |
Drop-in raw ArgoCD manifests, applied per hub (see below) |
apps/<hub>/ |
Manifests applied verbatim to that hub's ArgoCD |
hosted-clusters/ |
HyperShift hosted cluster definitions |
scripts/ |
Operational and CI scripts |
docs/ |
Documentation |
bootstrap/ is a small Helm chart that renders an ArgoCD Application pointing at applicationsets/. Deploy it per hub with helm template bootstrap ./bootstrap --set hubName=<hub> | oc apply -f -; hubName has no default, so an unparameterized render fails closed. The hub name flows through to the bootstrap Application's hubName parameter, and ArgoCD discovers all ApplicationSets under that directory:
applicationsets/templates/hub/hub-components.yamldeploys charts to the hub cluster. Each Application lists a hub-wide values file (values/<hub>/<component>.yaml) then a per-cluster file (values/<hub>/local-cluster/<component>.yaml), both optional viaignoreMissingValueFiles.applicationsets/templates/hub/hosted-clusters.yamluses a Git directory generator to deploy thehosted-clusterchart once per directory underhosted-clusters/<hub>/, creating a HyperShift HostedCluster on the hub for each. Its hub-side prerequisites (theclustersnamespace, pull secret, SSH key, and IngressController) are installed by thehcp-configchart.applicationsets/templates/managed/*.yamluse ACM Placements to deploy charts to spoke clusters. Each Application lists a hub-wide values file then a per-cluster file, both optional viaignoreMissingValueFiles.applicationsets/templates/hub/cluster-apps.yamlis an "app of apps" that applies any manifests found underapps/<hub>/verbatim (see Per-hub drop-in apps).
Placements are defined in two charts:
charts/acm-gitops-integrationdefines theall-managed-clustersPlacement used by the GitOpsCluster resource to register managed clusters with ArgoCD.charts/acm-placementsdefines workload-targeting Placements (e.g.,gpu-clusters,portworx-clusters) referenced by the managed-cluster ApplicationSets.
There is no cross-component ordering. Each component is a separate ArgoCD Application created directly by the ApplicationSet controller, and every Application syncs independently and in parallel.
Components converge via retry and self-heal: an Application whose dependency is not yet ready (e.g. a CustomResource whose operator CRDs do not exist yet) fails, backs off, and is retried until it succeeds. Hard ordering that genuinely matters (namespaces before namespaced resources, CRDs before CRs) is expressed with resource-level sync-waves inside each chart, where the annotation does work.
Each chart under charts/ installs a single component. Many use the operator-library library chart to install an OLM operator subscription. Charts with required values include ci/test-values.yaml for use with ct lint.
- Create a chart under
charts/. - Add the component to the appropriate ApplicationSet template under
applicationsets/templates/. - Only if the chart needs overrides, add
values/<hub>/<component>.yaml(hub-wide) and/orvalues/<hub>/<cluster>/<component>.yaml(per-cluster). Charts with no overrides need no values file at all.
The common hub-components set deploys the same components to every hub. When
you want a component (or any resource) on one specific cluster and not
others, drop a raw ArgoCD manifest into apps/<hub>/ instead of adding it to
the shared set.
The cluster-apps Application (applicationsets/templates/hub/cluster-apps.yaml)
applies everything under apps/<hub>/ verbatim, so a file there is a manifest
ArgoCD applies as-is — typically an Application, but any manifest works.
- Files can be Applications targeting the hub itself or any managed/hosted
cluster: the manifest's own
spec.destinationis what routes it. Subdirectories underapps/<hub>/are for your own organization only — nothing consumes their names. - No scaffolding is needed to start.
cluster-appswatches the always-presentapps/root scoped to<hub>/*, so a hub with no drop-in apps renders zero resources and stays healthy; the first file inapps/<hub>/lights it up. - For an app-of-apps child that should clean up its own resources when its file
is removed, add the
resources-finalizer.argocd.argoproj.iofinalizer (seeapps/oac-dev-infra/github-oauth.yaml).
apps/oac-dev-infra/github-oauth.yaml and github-group-sync.yaml are worked
examples: both were once in the common hub-components set but are only
configured for oac-dev-infra, so they now live as per-hub drop-ins.
- Render and apply the bootstrap Application with the new hub's name:
helm template bootstrap ./bootstrap --set hubName=<newhub> | oc apply -f -. - Create
values/<newhub>/and per-cluster subdirectories only where a chart needs an override. - Add
hosted-clusters/<newhub>/if that hub runs HyperShift hosted clusters.
No apps/<newhub>/ directory is needed up front; create it only when you have a
per-hub drop-in app for that hub.
Everything on main is shared across hubs; the only per-hub input is the
hubName parameter in the bootstrap Application.