Commit 2d574e2
feat: add k0s 1.36 support and refresh 1.34/1.35 patches (#3771)
* feat: add k0s 1.36 support, refresh 1.34/1.35 patches
Adds k0s 1.36 to the supported window (default 1.36.1+k0s.0; 1.32-1.35 keep
rolling via the relative CI matrix) and bumps 1.34->v1.34.8 / 1.35->v1.35.5.
Regenerates go.mod/go.sum (+kinds) k8s.io replace directives -> v0.36.1, CRDs,
and the metadata-1_3{4,5,6}.yaml image lists.
The load-bearing change is containerd v1 -> v2 (k0s 1.36 ships containerd 2.x),
which rejects the legacy version=2 / io.containerd.grpc.v1.cri drop-in schema.
- Image metadata pinned to the mirrored proxy.replicated.com tags that match
each k0s release (e.g. kube-proxy tracks the cluster's Kubernetes version)
rather than the greatest available patch.
- k0s airgap.GetImageURIs signature changed in 1.35
(GetImageURIs(spec, all) -> GetImageURIs(TargetEnv{Platform, Spec}, all)).
EC builds one binary per supported minor and 1.34/1.33 still use the old API,
so the call is isolated in a build-tagged allK0sImageURIs (images_targetenv.go
default / images_legacy.go behind k0s_legacy_airgap, gated by the Makefile on
K0S_MINOR_VERSION < 35). The new path also skips k0s 1.36's Traefik NLLB image.
- Containerd v2 -> v3: AddInsecureRegistry emits the v3 schema (config_path
drop-in + hosts.toml skip_verify) for k0s 1.36+, legacy below. Because k0s is
upgraded via autopilot (no per-node Plan hook), the stale v2
embedded-registry.toml on airgap nodes is migrated by a new idempotent
`local-artifact-mirror migrate-containerd-config` command run by the per-node
copy-artifacts job (now mounting /etc/k0s) before k0s 1.36 starts. V2-only
paths tagged TODO(k0s-1.36-oldest).
- Host preflights: add a kernel >= 4.5 floor and strict cgroup v2 for k8s 1.35+;
legacy 3.10 / "v1 or v2" checks gated to older minors.
- Remove canDisableUpdateProber: the update prober is disableable on all
supported k0s versions (k0sproject/k0s#6326).
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: add cleanup TODO for etc-k0s upgrade-job mount
Note that the /etc/k0s mount and the migrate-containerd-config step in the
airgap copy-artifacts job can be dropped once the oldest supported k0s minor
is >= 1.36 (no v2 containerd drop-ins left to migrate).
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(build): gate k0s_legacy_airgap on the go.mod module, not K0S_MINOR_VERSION
The installer (and buildtools during a normal build) always compile against
the committed go.mod (k0s 1.36, new airgap.GetImageURIs API); K0S_MINOR_VERSION
only selects the embedded k0s binary, not the Go module. Gating the legacy
build tag on K0S_MINOR_VERSION therefore wrongly tagged the previous-k0s-2/-3
CI legs (1.34/1.33) as legacy, compiling the old-API images_legacy.go against
the 1.36 module -> build failure.
Key the tag off the k0s version actually pinned in go.mod instead. The legacy
path now only engages when the k0s-update scripts temporarily re-pin go.mod to
a < 1.35 module while regenerating that minor's metadata.
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(config): drop k0s_legacy_airgap build tag, always use the new API
ListK0sImages now calls airgap.GetImageURIs with the k0s 1.35+ TargetEnv
signature directly. The installer and buildtools always compile against the
committed go.mod (current k0s minor), so the legacy build-tag split
(images_legacy.go / images_targetenv.go and the Makefile gate) was unnecessary
and broke the previous-k0s CI legs. Removes the split, the build tag, and the
Makefile machinery.
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Use constant
Signed-off-by: Evans Mungai <evans@replicated.com>
* test(e2e): shorten containerd v3 migration assertion comment
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(operator): shorten etc-k0s mount comment
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(operator): document autopilot containerd-migration timing window
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix formatting
Signed-off-by: Evans Mungai <evans@replicated.com>
* Update dockerfiles to 1.26.4
Signed-off-by: Evans Mungai <evans@replicated.com>
* fix(config): restore k0s_legacy_airgap build tag, gated at k0s < 1.36
Only k0s 1.36 has the new airgap.GetImageURIs(TargetEnv, all) signature; 1.33/
1.34/1.35 still use GetImageURIs(spec, all). The binary build re-pins go.mod to
K0S_GO_VERSION (via build-deps -> go.mod) for the selected K0S_MINOR_VERSION, so
each per-minor build leg compiles against that minor's k0s module. Using the new
API unconditionally broke the < 1.36 build legs.
Isolate the version-specific call in a build-tagged allK0sImageURIs
(images_targetenv.go for 1.36+ / images_legacy.go behind k0s_legacy_airgap for
<= 1.35); the Makefile applies the tag when K0S_MINOR_VERSION < 36. The Traefik
skip stays in the shared ListK0sImages via a "/traefik" string match since the
typed constant only exists in the 1.36 module.
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(build): apply k0s_legacy_airgap gate in shared versions.mk
The gate lived only in the root Makefile, so the operator image build
(operator/Makefile `build`, run via melange with `-tags ...,$(GO_BUILD_TAGS)`)
never received k0s_legacy_airgap. On the previous-k0s legs (go.mod re-pinned to
< 1.36) it compiled the new-API images_targetenv.go and failed with
`undefined: airgap.TargetEnv`.
Move the gate to versions.mk, which the root, operator, and local-artifact-mirror
Makefiles all include (after common.mk), so every build that compiles pkg/config
picks up the tag. dagger propagates K0S_MINOR_VERSION into the operator/LAM
melange envs, so the gate evaluates correctly there. LAM doesn't import pkg/config,
so it's unaffected.
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): fall back to oldest previous-minor release in find-previous-stable
When the previous k0s minor is newly added it may have fewer than
previous_release_gap (5) stable releases, so `.[5]` resolved to null and
EC_VERSION came back empty — ci-release-app.sh then fell back to `git describe`
on the shallow checkout and failed with "No names found". Adding 1.36 makes the
previous minor 1.35, which currently has a single stable release.
Fall back to the oldest available release (`.[-1]`) when `.[gap]` is absent.
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: pin k0s 1.36 sandbox image by plain tag for containerd 2.x
The pause/sandbox image was pinned as <tag>-<arch>@<digest>. containerd 2.x
(k0s 1.36) pulls it by digest but then resolves the sandbox image by its full
reference; the synthetic arch-suffixed tag does not exist in the registry, so
the lookup fails ("failed to get sandbox image ...: not found") and no pod
sandbox can start (node never becomes ready). Earlier k0s/containerd tolerated
the phantom tag.
Emit the sandbox image tag as-is (no arch/digest suffix) via a usePlainTag
flag on the buildtools pause component, and update metadata-1_36.yaml to
pause:3.10.2 to match.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Pin helm to same version as embedded-cluster
Signed-off-by: Evans Mungai <evans@replicated.com>
* Fix tests
Signed-off-by: Evans Mungai <evans@replicated.com>
* Fix tests
Signed-off-by: Evans Mungai <evans@replicated.com>
* Add logging
Signed-off-by: Evans Mungai <evans@replicated.com>
* Add missing k0s version
Signed-off-by: Evans Mungai <evans@replicated.com>
* Remove embedded-registry.toml in online installs
Signed-off-by: Evans Mungai <evans@replicated.com>
* Do not create embedded-registry.toml for online installs
Signed-off-by: Evans Mungai <evans@replicated.com>
* Update pause image before k0s upgrade
Signed-off-by: Evans Mungai <evans@replicated.com>
* Fix config loading
Signed-off-by: Evans Mungai <evans@replicated.com>
* Update docs strings
Signed-off-by: Evans Mungai <evans@replicated.com>
---------
Signed-off-by: Evans Mungai <evans@replicated.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent bec5d94 commit 2d574e2
41 files changed
Lines changed: 936 additions & 767 deletions
File tree
- .github/workflows
- cmd
- buildtools
- installer/cli
- local-artifact-mirror
- dev/dockerfiles
- local-artifact-mirror
- operator
- e2e
- kinds
- local-artifact-mirror
- operator/pkg
- artifacts
- cli/migratev2
- pkg-new
- hostutils
- k0s
- preflights/specs
- upgrade
- pkg
- config
- static
- helpers
- runtimeconfig
- tests/dryrun
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
158 | | - | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
234 | | - | |
| 239 | + | |
235 | 240 | | |
236 | 241 | | |
237 | 242 | | |
| |||
261 | 266 | | |
262 | 267 | | |
263 | 268 | | |
264 | | - | |
| 269 | + | |
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
| |||
528 | 533 | | |
529 | 534 | | |
530 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
531 | 539 | | |
532 | 540 | | |
533 | | - | |
| 541 | + | |
534 | 542 | | |
535 | 543 | | |
536 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | | - | |
114 | | - | |
115 | 124 | | |
116 | 125 | | |
117 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
683 | 687 | | |
684 | 688 | | |
685 | 689 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments