2026-10-27: Keycloak Kustomization failed to build on a GitHub fetch timeout¶
Kind: reference (incident report)
Severity: warning · Status: resolved · Resolved by: operator agent · Duration: ~1 min 24 s from detection to resolution, 15:23:49–15:25:13 UTC · Taskbase task: #1751
Summary¶
On hetzner-mgmt, the Kustomization flux-system/keycloak failed with BuildFailed on its periodic
reconcile. Kustomize could not download the Keycloak Operator manifests from raw.githubusercontent.com
within its timeout. Nothing in Git had changed for Keycloak, and nothing was applied. The operator
agent retried the Kustomization once the URL answered again. It also moved the three manifests into
Git, so the build no longer depends on GitHub.
Impact¶
- Services: Keycloak kept running at the last applied revision. Its dependent Kustomization
prometheus-stackwas not Ready for 31 s (15:24:42–15:25:13, "dependency 'flux-system/keycloak' is not ready"). The other dependents,giteaandharbor, did not reconcile in that window. - Users: none noticed; no login or service was affected.
- Data: none.
- Duration: 15:23:49–15:25:13 UTC. Every earlier reconcile at 10-minute intervals had succeeded.
Timeline¶
All times UTC.
| Time | Event | Source |
|---|---|---|
| 15:13 | Last successful keycloak reconcile before the fault (health check passed) |
Healthy condition, Kustomization events |
| 15:23:49 | Detected: keycloak BuildFailed, dial tcp 185.199.109.133:443: i/o timeout |
kustomize-controller event, Taskbase #1751 |
| 15:24:18 | The three upstream URLs answer HTTP 200 from the agent runner (0.16–0.42 s) | curl |
| 15:24:42 | prometheus-stack waits: DependencyNotReady |
Kustomization event |
| 15:25:02 | operator agent retries the root: flux -n flux-system reconcile kustomization keycloak |
run log |
| 15:25:05 | keycloak applied main@sha1:ef6124ff, Ready |
Kustomization event |
| 15:25:13 | Resolved: prometheus-stack Ready on its own 30 s retry; flux get kustomizations -A --status-selector ready=false empty |
flux output |
Root cause¶
components/keycloak/base/kustomization.yaml listed three remote resources from
keycloak/keycloak-k8s-resources
at tag 26.4.7: the Keycloak and KeycloakRealmImport CRDs and the operator (kubernetes.yml).
kustomize-controller downloads remote resources on every build, so every 10-minute reconcile needs
raw.githubusercontent.com reachable from the cluster. One connection timed out, the build failed, and
the Kustomization went not Ready until the next build. The revision named in the task
(ef6124f, a docs image bump) did not touch Keycloak; the reconcile was a periodic one. Only one
i/o timeout was in the kustomize-controller log for the three hours before. The record does not
show whether the cluster's egress or GitHub caused it.
What the agent did¶
The failure fits no section of the ops runbook; the steps follow Generic Flux freeze.
flux get kustomizations -A --status-selector ready=false,flux get helmreleases -A --status-selector ready=false: onlykeycloaknot Ready, with the build error; no HelmRelease not Ready.kubectl -n flux-system get events --field-selector involvedObject.name=keycloak: five successful reconciles, then the oneBuildFailed.kubectl -n flux-system logs deploy/kustomize-controller --since=3h | grep -c 'i/o timeout': 1.curlof the three upstream URLs: HTTP 200 each.git show --stat ef6124f: onlycomponents/docs/deployment.yamlchanged.flux -n flux-system reconcile kustomization keycloak(runbook Roll forward step 2, retry the root) — exit 0,applied revision main@sha1:ef6124ff535a2be6dda01ee8aa8facd8a55ce6b4. This was the only write to the cluster.flux get kustomizations -A --status-selector ready=false45 s later: empty.prometheus-stackhad recovered by itself.- Pull request for #1751: vendored the three manifests unchanged into
components/keycloak/base/upstream/and pointed the kustomization at them.kubectl kustomize components/keycloak/baserenders byte-identical output before and after (9929 lines), so Flux applies nothing new. The Keycloak upgrade and backup docs now name the new location.
Resolution and verification¶
flux get kustomizations -A --status-selector ready=falseandflux get helmreleases -A --status-selector ready=false: both empty at 15:25.keycloakandprometheus-stack:Ready=True,lastAppliedRevisionmain@sha1:ef6124ff535a2be6dda01ee8aa8facd8a55ce6b4.- Rollback: none needed. No version changed and nothing was applied by the failed build. The vendored manifests render the same objects as the URLs did, so reverting the pull request is also a no-op on the cluster.
Follow-ups¶
-
1752 — add a runbook section for a
BuildFailedon a remote fetch timeout.¶
References¶
- Alert: none; Flux error event
BuildFailedfrom kustomize-controller - Taskbase incident task: #1751
- Runs: the
operatorrun of #1751 - Pull requests: the #1751 pull request (vendors the manifests, adds this report)
- Runbook sections: Generic Flux freeze;
BuildFailedon a remote fetch timeout, added after this incident
Open questions¶
- Whether the timeout was in the cluster's egress (Cilium, Hetzner network) or at GitHub; the record shows only one failed connection to 185.199.109.133:443.