Skip to content

Commit 1d5d3cc

Browse files
wrkodeclaude
andcommitted
ci: assert kubeadm exposes the upgrade-path surface per minor (U-N)
After building each per-minor image, run the bundled kubeadm and assert it exposes exactly the subcommands/flags the upgrade path drives, so an upstream removal/rename is caught on every PR before it breaks an upgrade at runtime: - upgrade apply: --yes, --certificate-renewal - upgrade node: subcommand exists - init phase kubelet-start: --config (ADR-12-R1 API-free kubelet repair) - init phase upload-certs: --config (cert-key via config, never argv -- the mint keystone, ADR-11 #3 / ADR-12 B3) Runs inside the images CI already builds (1.34/1.35/1.36) -- no release/tag needed. Pure edge logic (accept +1 minor; refuse skip/downgrade/out-of-window) is already covered by TestUpgradePath; the full live upgrade stays the libvirt smoke. Verified the flags against real kubeadm v1.35.5 before committing. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: William Rizzo <william.rizzo@gmail.com>
1 parent 588baa7 commit 1d5d3cc

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,37 @@ jobs:
139139
*) echo "crictl minor mismatch: want v${{ matrix.minor }}.x, got ${crictl_v}" >&2; exit 1 ;;
140140
esac
141141
echo "OK: image bundles the k8s ${{ matrix.minor }} toolchain"
142+
143+
- name: Verify kubeadm exposes the upgrade-path surface (ADR-12)
144+
run: |
145+
set -euo pipefail
146+
img="kairos-kubeadm:ci-${{ matrix.minor }}"
147+
ka() { docker run --rm --entrypoint /usr/bin/kubeadm "$img" "$@"; }
148+
need() { # <help-output> <flag> <label>
149+
printf '%s\n' "$1" | grep -q -- "$2" \
150+
|| { echo "MISSING $2 in '$3' (bundled kubeadm ${{ matrix.minor }})" >&2; exit 1; }
151+
echo " ok: $3 supports $2"
152+
}
153+
# The provider drives only these kubeadm subcommands/flags for upgrades.
154+
# Asserting them against the SHIPPED binary per minor catches an upstream
155+
# removal/rename before it breaks an upgrade at runtime (ADR-12 U-N).
156+
157+
# `kubeadm upgrade apply <ver> --yes --certificate-renewal=true`
158+
apply_help="$(ka upgrade apply --help)"
159+
need "$apply_help" --yes "upgrade apply"
160+
need "$apply_help" --certificate-renewal "upgrade apply"
161+
162+
# `kubeadm upgrade node` (follower / worker convergence) must exist.
163+
ka upgrade node --help >/dev/null
164+
echo " ok: upgrade node subcommand exists"
165+
166+
# `kubeadm init phase kubelet-start --config` (ADR-12-R1 API-free repair).
167+
ks_help="$(ka init phase kubelet-start --help)"
168+
need "$ks_help" --config "init phase kubelet-start"
169+
170+
# `kubeadm init phase upload-certs --config` (cert-key flows via config,
171+
# never on argv -- the mint keystone, ADR-11 #3 / ADR-12 B3).
172+
uc_help="$(ka init phase upload-certs --help)"
173+
need "$uc_help" --config "init phase upload-certs"
174+
175+
echo "OK: kubeadm ${{ matrix.minor }} exposes the upgrade-path subcommands/flags"

0 commit comments

Comments
 (0)