Skip to content

Commit e298919

Browse files
committed
Merge branch 'improvement/mk8s-151-migrate-to-containerd.io' into q/133.0
2 parents 4cb7dba + 14b2ab5 commit e298919

File tree

22 files changed

+93
-918
lines changed

22 files changed

+93
-918
lines changed

.github/workflows/lifecycle-dev.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ jobs:
5858
needs:
5959
- get-dev-artifacts-url
6060
uses: ./.github/workflows/downgrade-test.yaml
61+
# NOTE: Downgrade is not supported from 133 to 132 (see CHANGELOG.md)
62+
# Should be removed in `development/134.0`
63+
if: ${{ ! startsWith(inputs.dev-branch, 'development/132') }}
6164
secrets: inherit
6265
with:
6366
from-artifacts-url: ${{ inputs.artifacts-url }}

.github/workflows/lifecycle-promoted.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ jobs:
208208

209209
promoted-downgrade:
210210
uses: ./.github/workflows/downgrade-test.yaml
211+
# NOTE: Downgrade is not supported from 133 to 132 (see CHANGELOG.md)
212+
# Should be removed in `development/134.0`
213+
if: ${{ ! startsWith(inputs.promoted-version, '132.') }}
211214
secrets: inherit
212215
with:
213216
from-artifacts-url: ${{ inputs.artifacts-url }}

.pylint-dict

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ scality
7878
sdk
7979
skopeo
8080
sls
81+
sosreport
8182
srv
8283
Thanos
8384
timestamp

BUMPING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ This guide is applied for both `metalk8s-operator` and `storage-operator`.
148148

149149
## Containerd
150150

151-
Instructions to bump Containerd version are in its [spec file](./packages/redhat/common/containerd.spec)
151+
The version just needs to be updated in `buildchain/buildchain/versions.py`.
152152

153153
## Update the sls state
154154

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22

33
## Release 133.0.0 (in development)
44

5+
### Breaking changes
6+
7+
- Due to the migration from our own RPM for containerd v1 to the official
8+
containerd.io RPM from docker.io, downgrading from 133 to 132 will not be
9+
possible.
10+
511
### Enhancements
612

713
- Bump Kubernetes version to [1.33.7](https://github.com/kubernetes/kubernetes/releases/tag/v1.33.7)
814
(PR[#4769](https://github.com/scality/metalk8s/pull/4769))
915

16+
- Move from our own RPM for containerd v1 to the official containerd.io RPM from docker.io
17+
to version [v2.2.2](https://github.com/containerd/containerd/releases/tag/v2.2.2)
18+
(PR[#4821](https://github.com/scality/metalk8s/pull/4821))
19+
1020
- Bump etcd version to [3.5.26](https://github.com/etcd-io/etcd/releases/tag/v3.5.26)
1121
(PR[#4769](https://github.com/scality/metalk8s/pull/4769))
1222

@@ -30,6 +40,10 @@
3040
and Loki image version to [3.6.5](https://github.com/grafana/loki/releases/tag/v3.6.5)
3141
(PR[#4792](https://github.com/scality/metalk8s/pull/4792))
3242

43+
- Configure containerd using `config_path` for registries so that changes of
44+
registries mirrors does no longer require a restart of the containerd service
45+
(PR[#4821](https://github.com/scality/metalk8s/pull/4821))
46+
3347
- Allow to enable metrics collection for the solutions operators
3448
(PR[#4813](https://github.com/scality/metalk8s/pull/4813))
3549

buildchain/buildchain/builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def _builder_image(name: str, dockerfile: Path, **kwargs: Any) -> LocalImage:
5353
file_dep=[
5454
REDHAT_REPOS_ROOT / "kubernetes.repo",
5555
REDHAT_REPOS_ROOT / "saltstack.repo",
56+
REDHAT_REPOS_ROOT / "docker-ce.repo",
5657
],
5758
build_args={
5859
# Used to template the repository definition

buildchain/buildchain/packaging.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
┌─────────┐ │──────>│ build │──────>│ build │
2323
│ mkdir │──────>│ │ packages │ │ repositories │
2424
└─────────┘ └──────────┘ └──────────────┘
25-
(e.g: containerd) (e.g.: scality)
25+
(e.g.: sosreport) (e.g.: scality)
2626
"""
2727

2828

@@ -311,20 +311,6 @@ def _rpm_repository(
311311
)
312312

313313

314-
def _rpm_package_containerd(releasever: str) -> targets.RPMPackage:
315-
"""Containerd RPM package."""
316-
return _rpm_package(
317-
name="containerd",
318-
releasever=releasever,
319-
sources=[
320-
Path("0001-Revert-commit-for-Windows-metrics.patch"),
321-
Path("containerd.service"),
322-
Path("containerd.toml"),
323-
Path(f"v{versions.CONTAINERD_VERSION}.tar.gz"),
324-
],
325-
)
326-
327-
328314
def _rpm_package_metalk8s_sosreport(releasever: str) -> targets.RPMPackage:
329315
"""SOS report custom plugins RPM package."""
330316
return _rpm_package(
@@ -339,10 +325,7 @@ def _rpm_package_metalk8s_sosreport(releasever: str) -> targets.RPMPackage:
339325

340326
RPM_TO_BUILD: Dict[str, Dict[str, Tuple[targets.RPMPackage, ...]]] = {
341327
"scality": {
342-
"8": (
343-
_rpm_package_containerd("8"),
344-
_rpm_package_metalk8s_sosreport("8"),
345-
),
328+
"8": (_rpm_package_metalk8s_sosreport("8"),),
346329
},
347330
}
348331

@@ -381,6 +364,7 @@ def _rpm_package_metalk8s_sosreport(releasever: str) -> targets.RPMPackage:
381364
_rpm_repository(name="epel", releasever="8"),
382365
_rpm_repository(name="kubernetes", releasever="8"),
383366
_rpm_repository(name="saltstack", releasever="8"),
367+
_rpm_repository(name="docker-ce", releasever="8"),
384368
),
385369
}
386370

buildchain/buildchain/versions.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727

2828
CALICO_VERSION: str = "3.29.3"
2929
SALT_VERSION: str = "3002.9"
30-
CONTAINERD_VERSION: str = "1.6.38"
30+
CONTAINERD_VERSION: str = "2.2.2"
3131

32-
CONTAINERD_RELEASE: str = "1"
3332
SOSREPORT_RELEASE: str = "2"
3433

3534

@@ -399,6 +398,7 @@ def rpm_full_name(self) -> str:
399398
# Pinned packages
400399
PackageVersion(name="kubectl", version=K8S_VERSION),
401400
PackageVersion(name="kubelet", version=K8S_VERSION),
401+
PackageVersion(name="containerd.io", version=CONTAINERD_VERSION),
402402
# Latest packages
403403
PackageVersion(name="coreutils"),
404404
PackageVersion(name="cri-tools"),
@@ -424,11 +424,6 @@ def rpm_full_name(self) -> str:
424424
),
425425
"redhat": {
426426
"8": (
427-
PackageVersion(
428-
name="containerd",
429-
version=CONTAINERD_VERSION,
430-
release=f"{CONTAINERD_RELEASE}.el8",
431-
),
432427
PackageVersion(name="container-selinux"),
433428
PackageVersion(name="iptables-ebtables", override="ebtables"),
434429
PackageVersion(

packages/redhat/8/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,3 @@ RUN dnf install -y --setopt=skip_missing_names_on_install=False \
3030
libseccomp-devel \
3131
&& \
3232
dnf clean all
33-
34-
# To build containerd
35-
RUN curl -ORL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz \
36-
&& tar xzvf go${GO_VERSION}.linux-amd64.tar.gz \
37-
&& rm go${GO_VERSION}.linux-amd64.tar.gz \
38-
&& mv go /usr/local \
39-
&& ln -s $GOROOT/bin/go /usr/local/bin/go \
40-
&& ln -s $GOROOT/bin/gofmt /usr/local/bin/gofmt \
41-
&& go install github.com/cpuguy83/go-md2man/v2@v2.0.2 \
42-
&& ln -s $GOPATH/bin/go-md2man /usr/local/bin/go-md2man

packages/redhat/common/0001-Revert-commit-for-Windows-metrics.patch

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)