Skip to content

Splitting Platform and Application Delivery with Two Argo CD Instances

Interactive Diagram

새 탭 ↗

In From Terraform to a GitOps Control Plane, IaC created the cluster and the first controller, then stepped back. The next question is whether that single controller should also own both platform addons and business applications.

The answer depends on scale, but there are common signals for when the boundary becomes necessary. This article covers splitting the controller into two tiers, bootstrap-cd and delivery-cd, and what that split actually isolates.

When one Argo CD becomes a coupled control plane

Section titled “When one Argo CD becomes a coupled control plane”

At the start, one controller is correct. There are few components and one team touching them. The cost of coupling appears with the following signals.

  • Permissions: for an application team to open the console, the ingress controller, certificate issuer, and CNI configuration appear on the same screen. Projects and RBAC can hide them, but the single controller’s service account still holds both classes of rights.
  • Change cadence: platform charts move quarterly while application overlays change several times a day. Both flows share one controller’s reconciliation queue.
  • Blast radius: one wrong Prune setting or one overly broad kustomize patch touches platform components and applications at the same time.
  • Availability: application delivery is blocked during a platform controller upgrade, and conversely application-side load delays platform reconciliation.

If two or more of these have become real problems, it is time to split. Before that, one controller is enough and splitting is premature optimization.

bootstrap-cd: reconcile the platform and create delivery-cd

Section titled “bootstrap-cd: reconcile the platform and create delivery-cd”

bootstrap-cd is the controller installed by IaC. Define its scope narrowly.

  • Cluster-essential components such as the ingress controller, certificate management, and storage classes
  • Observability components and the policy engine
  • delivery-cd itself: the second controller is treated as just another platform component
  • Change authority limited to the platform team

The key technique is to give the second controller no special treatment. Deploy the same chart once more under a different release name and namespace, and keep that definition in the same kind of kustomize overlay as every other platform component.

clusters/aks-platform-dev-01/delivery-cd/kustomization.yaml
namespace: delivery-cd
resources:
- ./namespaces.yaml
helmCharts:
- name: argo-cd
releaseName: delivery-cd
namespace: delivery-cd
valuesFile: values.yaml
patches:
# Inject a toleration so it lands only on the platform node pool
- patch: |-
kind: not-important
metadata:
name: not-important
spec:
template:
spec:
tolerations:
- key: PLATFORM
operator: Exists
target:
kind: (Deployment|StatefulSet)

kind: not-important is an idiomatic kustomize form. The kind and name in the patch body are ignored; the target block decides the real subjects. This single patch adds the toleration to every Deployment and StatefulSet the chart renders.

delivery-cd sees only the desired state of business workloads.

  • Application CRs pointing at overlays in the application GitOps repository
  • The console the application team accesses
  • Project, destination, and RBAC constrained to application namespaces
  • Platform charts and cluster-scoped resources are not this controller’s concern

Application definitions repeat many common fields. Copying destination, project, and syncOptions into every CR invites drift. Declare them once with a kustomize patch targeting kind: Application.

clusters/aks-platform-dev-01/delivery-cd-apps/kustomization.yaml
resources:
- ./namespaces.yaml
- ./serviceaccount.yaml
- ./applications.yaml
patches:
- patch: |-
kind: not-important
metadata:
name: not-important
spec:
destination:
server: https://kubernetes.default.svc
project: default
syncPolicy:
syncOptions:
- Prune=true
target:
kind: (Application)

Each individual Application then carries only what is unique to it.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: orders-api
namespace: delivery-cd
spec:
source:
path: orders-api/overlays/dev
# repoURL points at the application GitOps repository

The DRY benefit is clear, and so is the risk. The broader the regex in target.kind, the more unintended objects it catches. (Deployment|StatefulSet) misses a DaemonSet or Job the chart adds later, while a pattern like .* reaches CRDs and RBAC objects. Enforce two rules.

  • List only the required kinds explicitly in the regex.
  • After changing a patch, run kustomize build and diff the rendered output to confirm the number of affected objects matches expectation.

The reconciliation boundary between the two tiers

Section titled “The reconciliation boundary between the two tiers”
PlantUML Diagram

The boundary buys three things. First, the two controllers’ service accounts can be scoped differently. Second, platform chart upgrades and application deployments no longer block each other’s queue. Third, a misapplied Prune=true stays confined to one set of namespaces.

Everything above is actually wired. What follows is not yet, and it matters not to describe it as implemented fact.

ItemCurrent stateConsequence
Sync wave / sync hook annotationsNot usedOrdering between applications is not guaranteed
Automated sync policy (automated)Declared but disabledMerging to Git does not apply itself
Pinned targetRevisionNot specifiedTracks the default branch HEAD; the CR alone does not tell you which commit is deployed
Application creationManually triggered workflowA human must run it, and the run history is the deployment record

Registration and synchronization look closer to a workflow invoking the CLI.

Terminal window
# Validate the rendered output first
kustomize build --enable-helm ./clusters/aks-platform-dev-01/orders-api/
argocd app create orders-api --upsert \
--path clusters/aks-platform-dev-01/orders-api/ \
--dest-server https://kubernetes.default.svc \
--sync-option ServerSideApply=true
# Use an explicit retry ceiling rather than unbounded retries
argocd app sync --retry-limit 3 orders-api

This shape has real merits. --upsert makes reruns idempotent, and ServerSideApply=true reduces field-ownership conflicts on large CRDs and fields written by other controllers. --retry-limit 3 returns failure to a human instead of hiding it behind infinite retries. Running kustomize build before sync is a pragmatic gate that catches rendering errors in CI rather than in the cluster.

Fill the gaps in that table in order. Judge each item by what it gains and what it demands.

Next stepGainsRequires
Pin targetRevision to an immutable tag or commitThe deployed version is readable from the CR aloneA promotion procedure to move the version
Adopt sync wave annotationsOrdering across namespaces, CRDs, and workloadsActually documenting dependencies between components
Enable automated.prune and selfHealGit becomes the truth with no manual runRevision pinning and ordering must exist first to be safe
Restrict destination/repo per projectThe application team cannot touch other namespacesProject and RBAC design must come first
Pin images to registry.example.com/orders-api:<immutable-tag>Rollback becomes reproducibleThe build pipeline must generate and record the tag

Order matters. Enabling automated sync without pinned revisions and guaranteed ordering means an unreviewed commit on a tracked HEAD reaches the cluster immediately. Turn automation on only after determinism is secured.

Splitting the controller in two is isolation, not duplication. bootstrap-cd reconciles cluster-essential components and delivery-cd itself; delivery-cd sees only Application CRs. Declare common spec once with a kustomize patch targeting kind: Application, but keep the regex scope narrow and verify it with a rendering diff. And admitting honestly that this structure alone guarantees neither deployment ordering nor automatic application is what lets you take the next steps in the right order: pin revisions, then guarantee ordering, then enable automated sync.

How to deliver the secrets an application needs without putting them in Git is covered in the next article on Workload Identity and CSI, and building the observability pipeline on top of this structure follows after that.