The Simplest Way to Make Gerrit and Kustomize Work Like They Should
Teams pair gerrit and kustomize to review and build app manifests before they deploy. Gerrit holds and checks your changes, while Kustomize builds the final files for each cluster. This workflow keeps base files clean and easy to read. Developers submit small patch files instead of copying full manifests across folders. Review gates in Gerrit stop bad changes before they reach a live cluster. Build bots then run Kustomize to merge the base files with stage overlays. How gerrit and kustomize h
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair gerrit and kustomize to review and build app manifests before they deploy. Gerrit holds and checks your changes, while Kustomize builds the final files for each cluster.
This workflow keeps base files clean and easy to read. Developers submit small patch files instead of copying full manifests across folders. Review gates in Gerrit stop bad changes before they reach a live cluster. Build bots then run Kustomize to merge the base files with stage overlays.
How gerrit and kustomize handle permissions and data flow
Data flows in one clear line from the developer to the target cluster. An engineer writes a patch for a Kustomize overlay and pushes it to Gerrit. Gerrit holds this change in a staging branch until checks pass. A build runner pulls the pending change using a dedicated SSH key or token.
Next, the runner runs Kustomize to render the full YAML output. The runner posts the rendered diff back to the Gerrit review page. Reviewers read the exact change that will hit the cluster. They check both the small patch and the final merged output.
Gerrit rules control who can approve changes for each folder or branch. Junior engineers might have rights to approve dev overlays on their own. Senior leads hold the rights to approve production overlays and base files. Once a reviewer gives a plus two vote, Gerrit merges the commit. A deploy controller then reads the merged branch and updates the cluster.
Common failure modes and how to scope roles
Many teams fail by giving their build runners broad admin rights in Gerrit. If an attacker steals that shared key, they can bypass code review. They could push malicious manifests straight to the main branch. You should give the runner a read-only role on the repo instead. Let the runner post scores, not merge code.
Remote bases in Kustomize create a second major risk for your team. Kustomize can pull base files from outside Git servers during a build. If a build runner uses a broad SSH key, any patch can read private repos. A developer could change an overlay to point at a secret repo. The build bot would fetch those files and print them in the review log. Lock down network paths so runners only reach approved Git hosts.
End-to-End Encryption + Kustomize Security Overlays: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged manual runs also break your audit trail during an outage. Engineers often build manifests on their laptops and push them straight to the cluster. This habit skips Gerrit checks and leaves your Git repo out of sync. Turn off direct cluster write rights for human users to stop this drift. Force every urgent fix to go through a fast-track Gerrit review instead.
How to structure repos for fast reviews
Keep your base files and overlays in the same Gerrit repo when you start. This layout lets one build job check the whole tree in seconds. When a base file changes, the runner builds every overlay right away. Reviewers see at once if a shared change breaks staging or production.
Also, keep secrets out of your Git tree at all times. Kustomize can generate secret objects, but raw keys belong in a safe store. Store encrypted references in Gerrit and let the cluster decrypt them at runtime. If raw data leaks into logs, masking rewrites matched fields like emails or card numbers. This setup keeps your review history clean and safe for every team member to read.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Should we commit the rendered Kustomize output to Gerrit?
Most teams only commit the base files and overlays to keep reviews small. Still, having a bot post the rendered diff as a comment helps reviewers spot mistakes.
How do we stop Kustomize from pulling unapproved remote bases?
Block outbound internet traffic on your build runners at the firewall level. Only allow the runner to talk to your internal Gerrit host over approved ports.
How can we speed up urgent production fixes in Gerrit?
Create a break-glass rule in Gerrit for your on-call team. This role lets one on-call engineer approve and merge an overlay patch while still logging the event.
Related guides
In this post