The Incident: The Fix That Came Back

Incident Hook

Wednesday, 22:40. The backend in production restarts with OOMKilled under evening traffic. On-call finds that the memory limit is too low. Their everyday sign-in can only read production, so they take the break-glass admin kubeconfig that Terraform wrote (Chapter 01) and raise the limit by hand:

kubectl --kubeconfig infra/terraform/hcloud_cluster/kubeconfig.yaml --context hetzner-sre-control-plane \
  -n production patch deploy backend --type json \
  -p '[{"op":"replace","path":"/spec/template/spec/containers/0/resources/limits/memory","value":"512Mi"}]'

The command names its target and is correct. The path it takes is the problem: straight into the cluster, past Git.

The pods restart and stay up. At 22:48 they are OOMKilled again - the limit is back at 256Mi. On-call sets it again. Ten minutes later - the interval of the production Kustomization - it is back again.

Someone in the incident channel says: “Flux is undoing it. Suspend the backend so it stops fighting us.” They run flux suspend kustomization backend-production, set the limit one more time, and it stays. The incident is over at 23:05.

Nobody runs flux resume.

Three weeks later a security fix for the backend is merged into main. CI is green, the pull request was reviewed, and flux get kustomizations shows every row Ready. The fix is not running in production - and nobody notices for four days.

Result: one hand change, two incidents.

Diagram: Wednesday night - the first incident; 22:40 OOMKilled on-call patches the limit to 512Mi; 22:48 reconcile back to 256Mi OOMKilled again; flux suspend patch to 512Mi it stays; 23:05 incident closed nobody runs flux resume; Three weeks later - the second incident; Security fix merged into main CI green, reviewed; backend-production still suspended applies nothing new; flux get kustomizations READY True; The fix is not running unnoticed for four days

Observed Symptoms

What the team sees first, at 22:48:

$ kubectl -n production get deploy backend -o jsonpath='{.spec.template.spec.containers[0].resources.limits.memory}'
256Mi

And three weeks later:

$ flux get kustomizations -n flux-system backend-production
NAME                REVISION                SUSPENDED   READY   MESSAGE
backend-production  refs/heads/main@sha1:…  True        True    Applied revision: refs/heads/main@sha1:…

READY is True. The revision is three weeks old. The only sign is one word in the SUSPENDED column.

Confusion Phase

Flux looks broken twice, in opposite directions:

  • At 22:48: “Flux reverted my fix.” - It did. Git says 256Mi, and making the cluster match Git is Flux’s job.
  • Three weeks later: “Flux did not deploy our fix.” - It did not. It was told to stop.

Both times Flux did exactly what it was configured to do. So why did a correct fix - the limit really was too low - cause two incidents?

What AI Would Propose (Brave Junior)

  • “Suspend the Kustomization so Flux stops reverting your change.”
  • “Remove the Flux labels from the Deployment, then Flux leaves it alone.”
  • “Just kubectl apply the fix again after every reconcile.”

Why This Is Dangerous

  • A suspended Kustomization still reports Ready. Every later change to that folder in Git is silently ignored - including security fixes.
  • A hand change lives only in the cluster. It is not reviewed, not in Git history, and it disappears the moment anyone resumes Flux or rebuilds the cluster.
  • Re-applying by hand turns the loop that protects production into an opponent. It is the same loop that will put back the next object someone deletes by mistake - switch it off or race it, and you lose that too.

Pause and Predict: You are on call three weeks later and the security fix is not running. Before reading the investigation, write down the first three things you would check, in order.