Senior Devops Engineer
Neetesh specializes in designing, automating, and managing scalable DevOps pipelines across cloud-native infrastructures.
This article is part of a five-blog series where we share a real client use case — how we reimagined their cloud infrastructure strategy with Crossplane, GitOps, and a hybrid approach with Terraform.
Missed earlier posts? Read Blog 1 – Why We Looked Beyond Terraform, Blog 2 – Designing a Hybrid Crossplane Architecture, and Blog 3 – Onboarding & Importing AWS Resources.
Blog 3 was about safe adoption. Blog 4 is about keeping that adoption safe at scale. In Blog 3, we showed how we onboarded AWS resources with Crossplane — installing the provider, creating our first AWS RDS, and safely importing existing infrastructure using:
That solved the adoption problem. But it immediately raised a bigger question:
“How do we make sure developers don’t accidentally create unsafe infrastructure — or worse, delete production resources?”
This is where governance and lifecycle protection became critical.
Takeaway: Adoption made Crossplane usable. Governance made it safe.
Crossplane gave us declarative infrastructure, but it didn’t guarantee that developers would declare it safely. Without governance, a single YAML mistake could put production at risk.
In early trials, we saw common risks:
In a GitOps workflow, every commit flows straight to the cluster. That’s the magic — but also the danger. Without guardrails, one wrong YAML = direct production impact.

Takeaway: GitOps makes delivery fast. Governance makes it safe.
We needed a policy engine that could:
There were several options — including OPA/Gatekeeper — but Kyverno stood out because:
Takeaway: Kyverno matched Crossplane’s philosophy — declarative, Kubernetes-native, YAML-first.


OPA is more flexible for multi-domain policies, but for Kubernetes-native infra governance, Kyverno’s YAML-first approach aligned better with GitOps and developer workflows.
Takeaway: “Kyverno gave us safety rails without slowing teams. OPA stayed in our toolkit for future, complex cross-domain policies.”
Installing Kyverno was our first governance milestone. Just like Crossplane, we kept it simple at first — install, verify, and build trust.
Kyverno installation (from official docs):

Verify:

Before enforcing policies, we started small — focusing on visibility first. We didn’t enforce policies on day one. First, we started in Audit Mode → warnings only (visible in ArgoCD logs).
Once teams were comfortable and had fixed their manifests, we switched to Enforce Mode → strict blocking of unsafe configs.

Takeaway: Warn first, then block — smooth adoption without slowing developers.
By Blog 3, one rule had become sacred: never break prod.
That meant no accidental deletions, no unsafe imports, and no public databases slipping through.
We baked this golden rule into Kyverno policies:
Example: Disallow Public RDS
This Kyverno policy blocks any AWS RDS that tries to go public or skips deletion protection:
These policies ensured that even if developers made mistakes, production resources remained safe.


With this in place, unsafe DBs never made it past ArgoCD — GitOps caught them before AWS ever saw them.
Takeaway: Governance isn’t about slowing teams down — it’s about making the safe path the default.
Validation blocks unsafe configurations — but mutation auto-fixes them before they reach production.
Instead of just warning developers, Kyverno automatically adds missing safety defaults, such as deletionPolicy: Orphan.

Even if developers forgot, Kyverno ensured infrastructure stayed safe — protecting production by default.

Takeaway: Mutation policies auto-heal YAMLs — safety without extra steps.
Governance isn’t only about YAML policies — it’s also about who can touch what.
To prevent accidental production changes, we introduced strict access boundaries.
Developers got view-only access. This ensured every Crossplane action was authorized and auditable. Infrastructure changes flowed through GitOps pipelines, never through random kubectl commands.
Crossplane itself assumed AWS roles dynamically via IRSA (AWS IAM Roles for Service Accounts) — no more long-lived access keys sitting in Kubernetes Secrets.
Example: RBAC + IRSA Setup


This design enforces least-privilege access while keeping every action traceable through both Kubernetes audit logs and AWS CloudTrail.

Takeaway:
Once guardrails were in place, compliance came naturally.
GitOps and Kyverno turned reviews from a checklist into a continuous system:
Compliance-as-code replaced manual governance meetings and Excel trackers.
Mapped to real-world standards:
What used to be manual checklists became automated GitOps rules.

Takeaway: “With GitOps + policy automation, compliance stopped being a burden — it became a byproduct of how infra was managed.”
In a shared Crossplane platform, multiple teams worked within the same cluster — but with strict boundaries. Governance wasn’t just about safety; it was about containment.
We used namespace-level guardrails to prevent blast radius incidents:

Takeaway: Shared doesn’t mean risky — guardrails made multi-tenancy safe by design.\
Right after Blog 3’s onboarding, a developer accidentally pushed an RDS manifest with publiclyAccessible: true.
ArgoCD Sync → Failed
Kyverno’s webhook intercepted the manifest and blocked the change before it could ever reach AWS.
The developer fixed the values.yaml, re-synced, and ✅ the deployment succeeded.

It proved our policies worked — safety was built-in, not bolted on.
Takeaway: GitOps + Kyverno prevented unsafe infrastructure from reaching production — automation became the new safety net.
Governance isn’t a checkbox — it’s a heartbeat that keeps evolving with your platform.
New AWS services mean new policies. New compliance rules bring new guardrails. Security teams raise new requirements.
Instead of a one-time setup, we treated governance as a living system — continuously adapting, reviewing, and improving through GitOps.

Each GitOps sync became an opportunity to refine and improve our rules.
Takeaway: “Good governance doesn’t slow change — it grows with it.”
Blog 3 was about adoption — Blog 4 was about safe adoption at scale.
Here’s what we learned along the way:
Governance transformed Crossplane from an infra engine into a trusted enterprise platform.
With these guardrails in place, leadership gained the confidence to scale Crossplane adoption safely across teams, environments, and services.
Next: Blog 5 – GitOps Integration and the Road Ahead
We’ll show how we fully integrated Crossplane with ArgoCD workflows — including sync waves, drift correction, and ephemeral environments per pull request — to achieve true GitOps-native infrastructure delivery.
Speak with our advisors to learn how you can take control of your Cloud Cost