In Aether, a push to main reaches the cluster in about a second. A signed GitHub webhook tells Argo CD, and Argo CD applies whatever is in Git. That’s the point of GitOps, and it’s also the risk: a typo travels just as fast as a fix. I’m the only operator, the repository is public, and nobody reviews my pull requests but me.
This post follows a change from my editor to a running system. It covers the 15 hooks that run before a commit exists, the CI that repeats them, how Renovate decides which updates arrive and when, and the two very different ways a change deploys. It’s also honest about the weakest link: CI here is a signal, not a gate, and that cost me three red pushes in one afternoon.
The problem: one operator, fast deploys, two kinds of target #
Three facts shaped the pipeline:
- Deploys are fast. Argo CD polls Git every three minutes, and a signed webhook cuts that to about a second (part 9 covers the day that webhook refreshed every app at once). Whatever lands on
mainis live almost immediately. - The repository is public. CI can’t print secrets or plan values, and a pull request from a fork must be safe to run.
- There are two kinds of target. The cluster is GitOps: merging is deploying. The cloud host runs Docker Compose outside Argo CD, so merging deploys nothing there. Terraform and Ansible are applied by hand.
So the pipeline has three jobs: catch mistakes before they reach main, control which outside changes (new image versions) arrive and when, and deploy each kind of target in the way that suits it.
Every route a change can take, from a push or a Renovate pull request to a running cluster or cloud host.
Layer 1: 15 hooks before a commit exists #
Pre-commit runs on every git commit on my workstation. A failing hook blocks the commit.
| Group | Hooks | What they catch |
|---|---|---|
| Hygiene | trailing whitespace, end of file, merge conflicts, YAML syntax | Noise and merge leftovers |
| Secrets | detect-private-key, gitleaks, check-sops-encryption, sops-recipients |
A committed key, a plaintext secret, or an encrypted file missing one of its two keys |
| Infrastructure | terraform_fmt, terraform_validate, kubeconform, yamllint, shellcheck |
Invalid Terraform, invalid Kubernetes manifests, YAML mistakes, shell bugs |
| Repository integrity | tracked-refs, docs-index |
An Ansible task pointing at a file Git doesn’t track; a doc nobody links to, or a dead link |
Several hooks found real problems on their first run. shellcheck found 26 unquoted variables in one script. The recipients check found a secret that had been encrypted to only one of its two keys for three weeks, so losing that one key would have made it unreadable (part 7 has the story). A check that finds something on day one was overdue.
Tool versions come from one mise.toml, which the workstation and CI both read. “Works on my machine” can’t be caused by two different versions of kubeconform.
Layer 2: CI repeats it all, plus what needs more #
Local hooks are easy to skip: git commit --no-verify, a fresh clone without task setup, or GitHub’s web editor. So validate.yml runs on every push to main and every pull request, and does four things:
- The same 15 hooks, across the whole tree.
- A Helm values lint. Helm silently ignores a values key it doesn’t recognise, which caused three separate bugs where a setting did nothing (part 9). A script compares every key against the chart’s own values.
- The tracked-references check, again.
promtool: a syntax check of the alert rules, and their unit tests (part 27 has the honest count of how many rules are tested).
Because the repository is public, the workflow is built to be safe even for a stranger’s pull request:
- it has read-only permissions;
- it holds no secrets;
- every action is pinned to a commit SHA;
- a newer run cancels an older one on the same branch.
Drift detection is a separate nightly workflow with its own keyless identity. It never writes state.
The honest part: CI here can’t block anything #
main has a ruleset: no force-pushes and no deletion, so every commit hash quoted in the docs and on the status page stays valid. What it doesn’t have is “CI must pass before merge”. On a ruleset, a required check also rejects direct pushes, and as the only operator I push directly. I chose that trade-off on purpose and recorded it in ADR-015.
The consequence arrived on 20 November. A fix set a priority class in a Helm chart’s values. The chart’s template reads that key, so the live pods got it and nothing was wrong. But the chart’s default values file only shows the key commented out, so the Helm values lint called it unknown and failed the build. Three pushes went out red over about three hours, because I didn’t look at CI between them. Argo CD applied all three anyway, as designed.
Nothing broke. But a check that can’t block a push only works if someone looks at it. The fix was an allow-list entry for that one key, with a comment pointing at the chart’s template line. The lesson went into the incident review: wait for the CI run after every push. It’s a habit standing in for a gate. That’s weaker than a gate, and the post should say so.
Layer 3: Renovate decides which updates arrive #
Most changes I don’t write. New image versions arrive through Renovate, and its rules decide which updates arrive, and when:
| Rule | Why |
|---|---|
| Every image is pinned by digest | A tag can be moved; a digest can’t |
| A cloud-host image waits 3 days after release before Renovate proposes it | Fast-moving apps sometimes follow a release with a fix. Three days lets that fix arrive first |
| Patch and digest updates are grouped into one pull request per target | One review a week, not one per image |
| Major versions wait for approval on Renovate’s dashboard issue | They need migrations, or they change CRDs |
| Database major versions are never proposed | A major PostgreSQL or Redis upgrade needs a dump and restore, not a version bump |
| A K3s minor version waits for approval | Read the release notes; upgrade one minor at a time (part 25) |
| Kubernetes API version suggestions are off | API moves happen by hand, with the K3s upgrade |
| At most 5 open pull requests | So updates never pile up faster than I can read them |
Dependabot covers what Renovate doesn’t: the observer’s compose file, and the GitHub Actions themselves (pinned by SHA, so they need bumping).
Two ways to deploy #
The cluster: merging is deploying #
A merge to main sends a signed webhook through Cloudflare and the observer’s outbound tunnel to Argo CD. Argo CD refreshes only the apps whose files changed, and syncs them in waves (part 8). Encrypted secrets are decrypted inside the cluster, during the sync.
Because merging is deploying, cluster updates never merge themselves. Every Renovate pull request for the cluster waits for me.
The cloud host: merge, then press a button #
The cloud host runs Docker Compose, so a merge changes a file in Git and nothing else. That gap is useful: it separates “this version is acceptable” from “deploy it now”.
-
Renovate merges patch, minor and digest updates for cloud-host apps by itself, once CI is green and the 3-day wait is over. Majors and database images still wait for me.
-
A Kestra flow checks every 5 minutes whether an allowlisted app’s compose file on
maindiffers from the deployed one. If only itsimage:lines differ, it sends me a Telegram message with Deploy now and Skip buttons. Any other difference gets a plain notice: that’s a job for Ansible. -
Tapping Deploy now (only from my own chat, and only if the file still matches the one in the message):
- dumps the app’s database first;
- pulls the new image and recreates the container;
- waits up to three minutes for it to be healthy.
If it isn’t healthy, the flow restores the previous compose file on its own.
-
A message reports the result. A failed deploy fails the flow, which withholds its heartbeat, so Uptime Kuma pages me even if I missed the message.
An app joins the allowlist only if:
- its image is pinned in its compose file;
- it has a container health check;
- I know how to undo its database migrations.
Today one app qualifies. The rest are deployed with Ansible.
Terraform and Ansible: by hand, after CI #
Infrastructure changes are applied by hand, after CI is green, and the nightly drift check says whether reality still matches Git.
What I learned #
- Put each check in two places. Locally it’s fast and catches most mistakes. In CI it can’t be skipped. One configuration (
mise.tomland the hook list) keeps the two identical. - A check that can’t block needs a habit. I chose speed over a required status check, and the three red pushes were the price. Be honest about which of your checks are gates and which are only signals.
- Separate accepting a change from deploying it, wherever the target isn’t GitOps. Renovate decides a version is acceptable, and a human decides when it goes live.
- Slow down what you don’t control. A three-day wait costs almost nothing and avoids the releases that need a follow-up fix.
Architecture takeaways #
Fast deploys need early checks #
In GitOps, deploy speed and blast radius go together: the faster main reaches production, the earlier mistakes have to be caught. Here the checks run before the commit exists and again before anyone could merge, because after the push there’s almost no time left to catch anything.
A gate is a policy, not a tool #
The same CI run is a gate on a team that requires it and a report on a project that doesn’t. Whether a check protects production depends on the branch rules around it, not on the check itself. Write down which you have, and why.
Rollback is part of the deploy #
The cloud-host flow dumps the database before it deploys, and restores the previous compose file on failure. Rollback isn’t a separate runbook for a bad day. It’s built into every deploy, so it’s tested every time something ships.
This continues from part 27, How a Failure Reaches My Phone. The whole series is on the series page.