2026-11-18: harbor-preupgrade health check canceled when the flux2 2.20.0 upgrade replaced kustomize-controller¶
Kind: reference (incident report)
Severity: warning · Status: resolved · Resolved by: kustomize-controller's next reconcile, checked by the operator agent · Duration: 0:08 from detection to resolution, 19:10:46–19:18:19 UTC · Taskbase task: #3397
Summary¶
The amazon/aws-cli 2.38.2 → 2.41.0 merge (ce86bcf2, #1553) recreated the harbor-preupgrade gate Job. That is expected for a tooling-only change inside the gate's pod template (Renovate ADR §11, Backup tooling only). While the Kustomization's health check waited on that Job, the flux2 chart 2.20.0 merge (ce536ba3, #1558) replaced kustomize-controller. Stopping the old controller canceled the 45-minute wait, so harbor-preupgrade reported health check failed after 45m20.711805172s: context canceled. The gate itself never failed. The new controller reconciled the same Job, the Job verified its backup and completed, and the Kustomization was Ready at 19:18:19. Nothing was changed on the cluster and nothing was rolled back.
Impact¶
- Services: none from this failure.
flux-system/harbor-preupgradewas not Ready from 19:10:46 to 19:18:19, and theharborandharbor-postupgradeKustomizations waited on it. Harbor's earlier downtime (core, jobservice and registry at 0 from 18:25:41 to 18:45:18 for the dump) was the gate working as designed. It is recorded in the merge run's evidence on #1553 (task #3382) and is not part of this incident. - Users: none noticed.
- Data: none. Backup
hetzner-mgmt/harbor/preupgrade/20261118T182540Z-1.19.4-to-1.19.4was uploaded and verified by restoring it. - Duration: 7 min 33 s from detection (19:10:46) to resolution (19:18:19). The fault was only the canceled wait.
Timeline¶
All times UTC.
| Time | Event | Source |
|---|---|---|
| 18:18:00 | ce86bcf2 merged: amazon/aws-cli 2.41.0, including the preflight and publish containers of harbor-preupgrade |
commit, #1553 |
| 18:25:25 | Flux recreated Job harbor/harbor-preupgrade (force: Enabled), pod harbor-preupgrade-qh97m on worker-2. The health check began waiting |
Job creationTimestamp, startTime |
| 18:25:40 | Gate: Backing up Harbor chart 1.19.4 (docker.io/goharbor/harbor-db:v2.15.4) before 1.19.4 |
gate log |
| 18:25:41–18:45:18 | Gate scaled harbor-core, harbor-jobservice and harbor-registry to 0 for the dump, then back |
gate log |
| 18:45:19–18:56:47 | Upload pod harbor-preupgrade-upload ran and succeeded |
gate log |
| 18:56:49 | Restore check started in harbor-scratch |
gate log |
| 19:10:03 | ce536ba3 merged: flux2 chart 2.19.1 → 2.20.0 (Flux 2.10.0) |
commit, #1558 |
| 19:10:34 | helm history flux2 revision 10 failed: Upgrade "flux2" failed: context canceled (helm-controller replacing itself) |
helm history |
| 19:10:40 | New kustomize-controller pod kustomize-controller-54fb4bdc88-hkqtr (v1.10.1) started |
pod startTime |
| 19:10:46 | Old pod kustomize-controller-5f79c7c8bb-9k7bz: Stopping container manager, then stopped leading. The same second, detected: HealthCheckFailed, health check failed after 45m20.711805172s: context canceled. Taskbase raised #3397 |
flux-system events |
| 19:10:58 | New kustomize-controller became leader | lease kustomize-controller-leader-election |
| 19:11:00–19:12:12 | harbor-preupgrade: Dependencies do not meet ready condition, retrying in 30s, while its dependencies reconciled ce536ba3 |
kustomize-controller log |
| 19:11:30 | helm history flux2 revision 11 deployed, flux2-2.20.0 |
helm history |
| 19:16:06 | Gate: Backup hetzner-mgmt/harbor/preupgrade/20261118T182540Z-1.19.4-to-1.19.4 verified. |
gate log |
| 19:18:09 | Gate trap ran resume. Writers were already at their replicas, so nothing changed |
gate log |
| 19:18:19 | Resolved: Job Complete. harbor-preupgrade reported Health check passed in 5m5.042606015s, Applied revision: main@sha1:ce536ba3 |
Kustomization status |
| 19:19:07 | Post-upgrade smoke Job harbor-smoke completed |
Job status |
Root cause¶
kustomize-controller runs a Kustomization's health check inside the reconcile, bound to the controller's context. harbor-preupgrade health-checks its gate Job, with spec.timeout: 8h5m. When the Deployment is replaced, the old pod's context is canceled, and the wait in progress ends with context canceled rather than a timeout. Flux records that as HealthCheckFailed.
The flux2 chart 2.20.0 changes the kustomize-controller image (now ghcr.io/fluxcd/kustomize-controller:v1.10.1), so the merge of ce536ba3 replaced the pod. That happened 45 minutes into the ce86bcf2 gate. This is the same self-replacement as 2026-10-25, but it hit another controller's in-flight work instead of the flux2 release. The ops runbook covers that case only for HelmRelease flux-system/flux2 (flux2 self-upgrade fails with context canceled).
The gate Job was not affected. ce536ba3 does not touch components/harbor (git diff --stat ce86bcf2 ce536ba3: docs image, flux2 HelmRelease, ci-base Dockerfile, Flux page). So the new controller re-applied an unchanged Job. Its uid 1dc073d4-… and creationTimestamp 18:25:25 are unchanged, it has one pod and no restarts. The new controller waited for the Job to finish.
What the agent did¶
Read-only only, by the runbook's triage order and its flux2 self-upgrade section. No write command was run on any cluster.
flux --context admin@mgmt-cluster get kustomizations -A --status-selector ready=falseand the same forhelmreleases: both empty.harbor,harbor-preupgradeandharbor-postupgradewere Ready onmain@sha1:ce536ba3.kubectl --context admin@mgmt-cluster -n flux-system get kustomization harbor-preupgrade -o yaml: Ready and Healthy at 19:18:19,Health check passed in 5m5.042606015s.ce86bcf2is absent from its history, and the next entry aftera8a2576fisce536ba3.kubectl --context admin@mgmt-cluster -n harbor get job harbor-preupgradeand its pod: created 18:25:25,Completeat 19:18:19, one pod, 0 restarts. Initgateran 18:25:38–19:18:09 with exit 0, andpublishexited 0.kubectl --context admin@mgmt-cluster -n harbor logs harbor-preupgrade-qh97m --all-containers --timestamps: writers down 18:25:41–18:45:18, upload succeeded, restore check passed,Backup … verified.kubectl --context admin@mgmt-cluster -n flux-system get podsandget events: all Flux controllers started 19:10:39–19:10:42. The old kustomize-controller was killed and theHealthCheckFailedevent came in the same second, followed by a new leader.helm --kube-context admin@mgmt-cluster -n flux-system history flux2: revision 10failed(context canceled), revision 11deployedonflux2-2.20.0. The self-upgrade had recovered, so the runbook says to change nothing.curl https://harbor.prod.skatzi.com/api/v2.0/health: every componenthealthy.helm history harbor: revision 17deployed,harbor-1.19.4.harbor-scratchheld only the completed weekly drill pods.- Roll forward, by the runbook's "it has recovered" case. The next reconcile was already Ready, so no Flux or Helm action was needed. Deleting or recreating the gate Job was rejected: it would take another backup with Harbor's writers stopped. There was nothing to roll back, because the gate changes no version (
1.19.4-to-1.19.4). - Task #3399: a runbook follow-up for this case.
Resolution and verification¶
flux get kustomizations -A --status-selector ready=falseandflux get helmreleases -A --status-selector ready=false, run at 19:22: both empty.harbor-preupgrade:Applied revision: main@sha1:ce536ba36f1b11ff1276f7aa76ba8ad1f3bb24ae, Healthy.- Job
harbor/harbor-preupgrade:succeeded: 1, conditionComplete. Jobharbor/harbor-smoke: completed 19:19:07. - Harbor
/api/v2.0/health:"status":"healthy". All six Harbor Deployments 1/1. - Rollback evidence: none needed. Harbor stays on chart 1.19.4 (Helm revision 17, deployed 2026-11-05), the version the gate backed up and that the backup restored.
Follow-ups¶
-
3399: amend the ops runbook so that
context canceledon any Kustomization's health check during a flux2 upgrade is recognised, checked read-only, and left alone once the next reconcile is Ready (technical-writer).¶
References¶
- Alert: none. This was a Flux error event (
HealthCheckFailed) turned into a post-merge failure task. - Taskbase incident task: #3397. Merge run of #1553: #3382.
- Pull requests: #1553 (
amazon/aws-cli2.41.0, with the gate timeline), #1558 (flux2 2.20.0) - Runbook sections: Triage order,
flux2self-upgrade fails withcontext canceled, Harbor backups: the upgrade gate
Open questions¶
- Whether the 2026-11-04
harborKustomization'scontext canceled(report, open question) had the same cause, a controller restart. That record does not show it. - Whether to keep flux2 merges away from running gate Jobs, for example by also listing gate Jobs in progress before merging a flux2 upgrade. It is cheap to recover from, as here, so this report proposes no rule.