A. B. Khan

GitOps for the mesh — when the pull request becomes the change record

The Mesh Series · Article 31

GitOpsMicrosoft Entra IDCompliance evidenceAuthorizationPolicyDrift & posturePolicy as codeSecrets & certificatesAmbient mesh

Cover: GitOps for the mesh

You have spent thirty articles turning security controls into declarative objects: PeerAuthentication, default-deny AuthorizationPolicy, NetworkPolicy, Gatekeeper constraints, Telemetry, ComplianceProfiles. Every one of them is a YAML file. Which raises a question the series has quietly deferred: where do those files live, who is allowed to change them, and how does the cluster stay matched to them?

GitOps is the answer, and in a regulated shop its value is not the one the marketing leads with. Faster deploys are nice. What matters here is that Git becomes two things at once — the single source of truth the cluster is reconciled to, and a signed, reviewed, timestamped audit trail of every change to a security control. In a regulated institution, a merged pull request is the change-management record. But only if you build it so that Git is the only way in.

Diagram: gitops loop

The loop is simple: desired state in Git, a reconciler that continuously drives the cluster toward it, observed state compared back. The two annotations on the diagram are the whole regulated story — the reviewed merge is your change control, and the locked-down cluster is what stops anyone from writing around it.

Why this matters now

Change management is not a DevOps nicety in this world — it is an explicit, tested control in every framework the last two articles mapped. PCI-DSS 4.0.1 Requirement 6.5 governs changes to system components. ISO 27001:2022 A.8.32 is change management outright. RBI's IT directions and SAMA's framework both demand documented, authorized change with segregation of duties. The traditional way institutions satisfy these is a change-advisory board, a ticket, and a screenshot — the demo-to-audit gap in bureaucratic form.

GitOps collapses that. A change to a mesh policy is a commit: it has an author, a reviewer who approved the merge, a timestamp, and a diff showing exactly what changed. That is maker-checker (RBI's segregation-of-duties expectation) enforced by branch protection, and it is change evidence generated as a byproduct of the work rather than assembled for the auditor afterward. The signed-evidence pipeline from Article 27 can read the same Git SHA the cluster is running and attest this control, at this commit, reviewed by this person — an evidence chain that runs from the pull request to the running pod.

There is a second reason this lands now. Article 28 established that drift detection is the detect half of keeping controls holding; the reconciler is the correct half. Together they are what SAMA's maturity model means by continuous enforcement. But — and this is the sharp edge — the correct half has a way of destroying the evidence the detect half produced.

How it comes together

Everything the series built becomes a directory in a Git repository, and one reconciler — Argo CD or Flux — drives the cluster to match.

The mesh policy layer (Articles 14–24) — PeerAuthentication, AuthorizationPolicy, NetworkPolicy, Telemetry — is plain manifests. The admission guardrails from Article 21 (Gatekeeper constraints, Kyverno policies) live beside them, which produces a satisfying property: the policies that enforce the rules and the rules about which policies must exist are versioned together, reviewed together, and reconciled together. The egress allow-list from Article 22, the threat model from Article 23, the ComplianceProfiles from Articles 29 and 30 — all of it is desired state in the same repo.

Even the identity plane joins. Entra app registrations, Conditional Access policies, and app-role assignments are expressible as infrastructure-as-code (Terraform's azuread provider, or Bicep) — which matters because Entra's mandatory-MFA enforcement now covers exactly those IaC and CLI paths, so your delivery pipeline itself authenticates with a phishing-resistant, federated identity rather than a client secret in a pipeline variable.

Which is where Entra secures GitOps, not just the workloads GitOps ships. Argo CD is, functionally, a cluster administrator that never sleeps — it holds god-mode over every mesh policy in the cluster. Its console is now native-OIDC federated to Entra (Dex is no longer required as of recent Argo versions), so who can log in, who can sync production, and who can override a sync is governed by Entra groups mapped to Argo RBAC roles, gated by the same Conditional Access and phishing-resistant MFA as every other privileged surface. Concentrating all your controls behind one reconciler is only safe if that reconciler is secured like the privileged actor it is.

And secrets stay out of Git entirely. This is where the passwordless work pays off again: because workloads authenticate by federated identity (Articles 9 and 15), there is almost nothing to commit. The residual secrets that cannot be federated away are referenced by name through the External Secrets Operator or the Key Vault CSI driver (Article 19) — Git holds a pointer to Key Vault, never the value.

From map to code

Start with the reconciler pointed at the mesh-policy repo. This is the whole loop in one object:

Code: application

That selfHeal: true is the line to think hardest about. Left naive, it is the evidence shredder from Article 28: someone runs kubectl edit on a production AuthorizationPolicy, the reconciler quietly reverts it within minutes, Git shows no change, the dashboard stays green — and the honest answer to "was that policy ever weakened?" is now unrecoverable. Self-heal is correct behaviour only when the drift event is recorded before it is corrected. Reconcile the cluster; keep the record.

The second control is who may drive that reconciler. Argo RBAC, fed by the Entra group claim, is where "only a reviewer can sync prod" stops being a policy on paper:

Code: rbac

Note the shape: deny-by-default, least privilege, identity from Entra — the exact principles the mesh enforces for workloads, now applied to the pipeline that ships the mesh. The auditors get a real, read-only Entra-authenticated seat instead of a screenshot.

And the secret that cannot be federated away is referenced, never committed:

Code: externalsecret

Security · Audit · Integration

Security property. GitOps concentrates change into one reviewed, authenticated path and — with cluster write access locked down — removes the out-of-band ones. Deny-by-default reconciler RBAC and Entra-federated sign-in mean the pipeline that governs every control is itself governed like a privileged system.

Audit evidence. The commit history is the change-management record: author, reviewer, timestamp, diff, per control, mapped straight to PCI 6.5, ISO A.8.32, and RBI/SAMA change requirements. Tie the Article 27 signing job to the deployed Git SHA and the evidence chain runs unbroken from pull request to running pod.

Integration. This is the article that binds the series into one system: the primitives (14–23) are the controls, observability and signing (24–28) are the proof, the framework maps (29–30) make the proof legible, and GitOps is the delivery loop that enforces all of it from a single reviewed source — the reconcile side of the drift story from Article 28.

Alternatives, and where each fits

Argo CD vs Flux. Both are mature CNCF-graduated reconcilers and either will do this job. Pick Argo CD when you want a first-class UI and console-level RBAC — valuable precisely because auditors and reviewers get an authenticated read-only window into desired-vs-live state. Pick Flux when you want a lean, controller-and-CRD toolkit with no standing console to secure and a strong fit for fleets driven entirely from Git. In a regulated shop the Argo console is an asset and a liability in the same breath: it is the audit window, and it is the privileged surface you must lock down.

Helm vs Kustomize. Kustomize for the policy and CRD layer — overlays express per-environment differences (a stricter prod AuthorizationPolicy, a wider dev egress list) as plain patches with no templating language to reason about, which keeps a security-critical diff readable. Helm where you are consuming a packaged third-party application that ships as a chart. Reach for templating power only when you need it; a policy diff an auditor can read beats a clever template.

Push-based CI instead of a reconciler. The tempting shortcut: kubectl apply from your CI pipeline. Choose this only for throwaway environments. It cannot self-heal — nothing watches for drift between deploys — and it forces you to hand the CI system standing write credentials to production, which is exactly the concentrated, long-lived privilege the rest of this series works to eliminate. Pull-based reconciliation keeps the credential inside the cluster and the drift loop always running.

From one repo to a compliance-delivery plane

The toy version is one Application pointed at one repo, syncing your mesh baseline. Build it this week — even alone it converts every policy change into a reviewed, attributable commit.

The industry-standard version is the app-of-apps: an ApplicationSet that fans the same reviewed source across environments and clusters, ComplianceProfiles reconciled alongside the primitives they map, Entra configuration delivered as IaC through the same gate, and the signing job from Article 27 attesting each control at the exact Git SHA the cluster is running. One reviewed source of truth, one reconcile loop, one evidence chain — the pull request at one end, the signed pack and the running pod at the other.

Which leaves one architectural promise the series has been making since Article 5 and has not yet paid off: the sidecar tax. Everything so far assumes a proxy in every pod. Next up: migrating a regulated workload from sidecar to Istio ambient with zero downtime — what ztunnel makes nearly free, what still needs a waypoint, and how to do the whole cutover as a reviewed GitOps rollout rather than a big-bang leap.


GitOps only makes Git the source of truth if nobody can write around it. In your environment, is a reviewed merge genuinely the only path to a production policy change — or can someone still kubectl apply? I'm curious how hard that was to actually close.

Key skills & topics in this article

GitOpsMicrosoft Entra IDCompliance evidenceAuthorizationPolicyDrift & posturePolicy as codeSecrets & certificatesAmbient mesh

  • #ServiceMesh
  • #Istio
  • #Azure
  • #dotnet
  • #ZeroTrust
  • #Kubernetes
  • #GitOps
  • #ArgoCD
  • #Compliance

Also on LinkedIn.