infra/stacks/k8s-version-upgrade/scripts
Viktor Barzin e5250f417e
All checks were successful
ci/woodpecker/push/default Pipeline was successful
k8s-version-upgrade: compat gate must not false-block patch upgrades
The compat gate compared every addon's matrix ceiling against the target
k8s minor unconditionally. That is correct for a minor JUMP, but it also
blocked patch upgrades within the minor the cluster is ALREADY running:
ESO v0.12's matrix ceiling is 1.31, the cluster runs 1.34.9, so a target of
1.34.10 (a patch) was refused with "external-secrets supports k8s <= 1.31;
target 1.34 exceeds it" — even though the running cluster is itself proof ESO
0.12 works on 1.34. That silently defeats autonomous patching (it would have
bitten the moment a 1.34.10 was published).

Fix: a target at or below the running minor crosses into no new k8s minor, so
every installed addon is already empirically proven on it — check_addons now
returns no reasons when target_minor <= running_minor. Added running_minor()
(oldest kubelet across nodes, mirroring the detector; RUNNING_K8S env override
for tests) and pass it in. Minor jumps are unchanged: 1.34->1.35 still blocks
on ESO 0.12 + kyverno 1.16. removed-API + containerd checks are naturally
inert for patches (no API removal / containerd floor inside a minor) and keep
running as defence. Added test_compat_gate.py (8 cases) covering both paths.

Verified end-to-end against live Prometheus: target 1.34.10 -> EXIT 0 (safe),
target 1.35.6 -> EXIT 2 (blocked on ESO+kyverno).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 08:14:50 +00:00
..
addon-compat.json k8s-version-upgrade: compat gate — auto-upgrade when safe, halt + alert when not 2026-06-19 11:23:30 +00:00
compat-gate.py k8s-version-upgrade: compat gate must not false-block patch upgrades 2026-06-20 08:14:50 +00:00
test_compat_gate.py k8s-version-upgrade: compat gate must not false-block patch upgrades 2026-06-20 08:14:50 +00:00
upgrade-step.sh k8s-version-upgrade: complete autonomy P0 — blocked alert + deeper postflight + runbook 2026-06-19 11:27:17 +00:00