GitOps makes a specific promise: the cluster matches git. When a change is merged, it deploys. When a resource is deleted from git, it’s deleted from the cluster. Merge equals deploy is the guarantee the whole workflow rests on.
It doesn’t always hold. A drift audit of my k3s cluster turned up three merged fixes that had never taken effect: one ArgoCD never tracked, one it reported as Synced while the cluster ran the old config, and one that synced correctly but could never have worked.
View the complete homelab infrastructure source on GitHub
How the Gap Opens: Application Files Nothing Tracks
Every system component in the cluster has an ArgoCD Application, and that Application is itself defined in a YAML file in the repo (full ArgoCD homelab setup here). Each Application was applied once by hand when the component was bootstrapped. After that, a change to the Application’s own file only reaches the cluster if some other Application tracks that file, usually through a directory.include glob.
That glob is written once, and files in the directory are only tracked if they match it. A file that doesn’t match is invisible to ArgoCD. It won’t create an Application for it, won’t sync it, and won’t alert about it. As far as ArgoCD is concerned, the file doesn’t exist.
The monitoring stack had this problem. Two files in kubernetes/system/monitoring/, application.yml and manifests-application.yml, were missing from the directory.include glob of the monitoring-manifests Application:
# the monitoring-manifests Application, before the fix
spec:
source:
directory:
include: "alertmanager-config.yml" # ← only this file tracked
# application.yml and manifests-application.yml: invisible
A fix for a broken configSecret reference had been merged to application.yml on 2026-06-27. ArgoCD never picked it up, and Discord alerting stayed dead for more than eight days. Once applied by hand, the config still failed with undefined receiver: the Prometheus Operator expects an AlertmanagerConfig to carry its own complete route. Only a real test alert, with alertmanager_notifications_total for Discord going up and no failures, closed it.
Finding the Gap: What the Drift Audit Actually Checks
The standard ArgoCD health check (kubectl get applications -n argocd) doesn’t catch this. All Applications show Synced/Healthy. The bootstrapped-but-untracked files don’t generate an Application at all, so there’s nothing to show as out-of-sync.
The audit that found it was manual: compare the contents of each kubernetes/system/*/ directory against the tracked files in the corresponding bootstrap Application, and flag any file not in the glob:
# For each subdirectory, list tracked files vs actual files
for dir in kubernetes/system/*/; do
echo "=== $dir ==="
# What ArgoCD tracks (from the bootstrap Application's directory.include)
# vs what's actually in the directory
ls "$dir"*.yml 2>/dev/null
done
The audit found about 14 more files with the same untracked-after-bootstrap gap. A full sweep of all 41 live Applications a few days later put the number at 18: the defining files of cert-manager, Vault, Velero, Traefik, the CloudNativePG operator and others were tracked by nothing. Since 2026-08-04 a dedicated system-app-bootstrap Application tracks every application.yml and manifests-application.yml under kubernetes/system/, so an edit to an Application file now reaches the cluster like any other change.
On the Terraform side, a scheduled plan that alerts to Slack on drift closes the same class of gap. A green pipeline or a Synced badge tells you the command ran, not that the running state matches intent.
The First Live Finding: Traefik allowCrossNamespace
Traefik’s allowCrossNamespace fix had been merged to git on 2026-07-04. The change allowed IngressRoutes in one namespace to reference Services in another. Without it, argo.woitzik.dev, monitoring.woitzik.dev, and status.woitzik.dev returned bare 404s.
The fix was in git. ArgoCD showed the Traefik Application as Synced. But the endpoints were still 404ing.
The cause was the same gap as above. The flag lives in the Helm values inside kubernetes/system/traefik/application.yml, the file that defines the Traefik Application itself, and nothing tracked that file. The live Application object kept its old values, and measured against those, everything was in sync. Synced means the cluster matches what the Application describes. Whether the Application matches git is a different question.
# Apply the Application definition itself, so its new Helm values reach the cluster
kubectl apply -f kubernetes/system/traefik/application.yml
After the manual apply, all three endpoints returned 302 once the rollout finished.
The Second Finding: Velero’s Fix That Couldn’t Have Worked
Velero had a merged fix for repository maintenance frequency. Kopia maintenance jobs ran too often, overlapped with backup windows, and caused timeouts. The fix set a custom maintenance frequency via Helm values.
The fix was synced correctly. It also did nothing, for two independent reasons:
Reason 1: Wrong Helm values structure.
The extraArgs key was placed at the top level of the Helm values instead of nested under configuration:
# What was merged (broken)
velero:
extraArgs:
- "--default-repo-maintenance-frequency=24h"
# What Helm actually needs
velero:
configuration:
extraArgs:
- "--default-repo-maintain-frequency=24h"
Helm doesn’t reject values the chart never reads (unless the chart ships a values.schema.json that forbids them). No error, no warning: the chart’s templates only look for configuration.extraArgs, so the extra args were never passed to the binary and Velero started with its defaults.
Reason 2: Wrong flag name.
The flag --default-repo-maintenance-frequency doesn’t exist in Velero. The real flag is --default-repo-maintain-frequency. Had the values structure been correct, the wrong name would have reached the binary, and velero server would have exited with an unknown flag error instead of starting.
Two independent mistakes, either of which would have stopped the fix on its own. The drift audit caught them by checking the running Velero container’s actual args:
kubectl get pod -n velero -l app.kubernetes.io/name=velero -o jsonpath=\
'{.items[0].spec.containers[0].args}' | tr ',' '\n'
# → no --default-repo-maintain-frequency flag present
The correct fix, both issues resolved:
velero:
configuration:
extraArgs:
- "--default-repo-maintain-frequency=24h"
The Three-Part Pattern
All three failures share the same shape:
| Traefik allowCrossNamespace | Velero maintenance frequency | Monitoring Application files | |
|---|---|---|---|
| Git state | Correct | Wrong key and flag name | Correct |
| Live state | Old Application values | Wrong values, inert even once applied | Never tracked |
| ArgoCD showed | Synced/Healthy | Synced/Healthy | No Application (invisible) |
| Found by | Endpoint check, manual apply | Checking running container args | Directory vs. glob comparison |
Each PR was closed in the reasonable belief that the fix was live, and each time it wasn’t. The merge was the easy part. The skipped part was verifying that the change took effect in the running cluster.
The Verification Step That Prevents It
For any change where “merged” isn’t sufficient proof of “deployed,” there’s one check that works:
# For a Helm values change: verify the flag is in the running container
kubectl get pod -n <namespace> -l <label-selector> \
-o jsonpath='{.items[0].spec.containers[0].args}'
# For a Kubernetes manifest change: verify the field is live
kubectl get <resource> -n <namespace> <name> \
-o jsonpath='{.spec.<changed-field>}'
# For an ArgoCD Application bootstrap: verify the file is tracked
argocd app get <bootstrap-app> --output json | \
jq '.spec.source.directory.include'
All of these are one-liners. Skipping them cost a lot more: Traefik returning 404 for three production subdomains, Velero running repository maintenance at the wrong frequency indefinitely, and monitoring fixes sitting inert.
The same GitOps verification gap exists in Azure DevOps pipelines and GitHub Actions that deploy Terraform or Helm. A pipeline that reports “succeeded” proves the deployment command ran without error. It doesn’t prove the cluster’s running state matches the manifest. Checking the running state directly, after deployment, is the only check that closes the gap.
The Phoenix Project* is still the sharpest account I know of the gap between “the change was made” and “the change took effect.” It’s fiction, but painfully accurate about how it happens.