Commit Graph

16038 Commits

Author SHA1 Message Date
Maksym Pavlenko
eb586b5ef2 Regenerate proto files
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 15:13:02 -08:00
Maksym Pavlenko
e63f1d3ab4 Use buf to generate proto code
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-08 15:12:50 -08:00
Maksym Pavlenko
2bf3fcf007 Merge pull request #11406 from chrishenzie/update-pod-sandbox-api
UpdatePodSandboxResources CRI API handler
2026-01-08 17:06:37 +00:00
Chris Henzie
de5b622bd9 Persist pod sandbox resource updates
Introduces changes to make pod sandbox updates persistent across
restarts.

This is achieved by:
- Storing the updated Overhead and Resources as an extension on the core
  sandbox object and in the in-memory sandbox status store.
- Modifying the sandbox recovery logic to read this extension on startup
  (this is not working in recovery unit tests yet and needs fixing).
- Updating the PodSandboxStatus CRI handler to include updated resources
  from the sandbox status store.

Signed-off-by: Chris Henzie <chrishenzie@google.com>
2026-01-07 09:44:46 -08:00
Chris Henzie
ffd3691c92 Implement UpdatePodSandboxResources CRI API handler
Signed-off-by: Chris Henzie <chrishenzie@google.com>
2026-01-07 09:44:46 -08:00
Fu Wei
a800acbac8 Merge pull request #12714 from fuweid/fix-oom-issue
*: update OOMKilled event handling
2026-01-07 14:04:45 +00:00
Wei Fu
016f4a6360 *: move new oom package into internal
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-06 20:44:04 -05:00
Wei Fu
bdff34ef61 *: skip critest OOMKilled testcase for systemd cgroup
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-06 20:44:04 -05:00
Wei Fu
cbb1b13a81 cri-integration: add stress test for TestOOMEventMonitor
The test was validated locally by running 100 pods for 100 rounds without
observing any failures. Due to limited resources in the CI environment,
the test parameters were reduced to 8 pods and 10 rounds.

```bash
FOCUS=TestOOMEventMonitor CGROUP_DRIVER=cgroupfs taskset -c 0,1 make cri-integration | tee /tmp/log
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-06 20:44:04 -05:00
Wei Fu
aa3c507925 internal/cri/server: check if OOM event occurred before update status
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-06 20:44:04 -05:00
Wei Fu
8ac7e3c06d cmd/containerd-shim-runc-v2: use experimental OOM package
We should always send oom event before exit event.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-06 20:44:04 -05:00
Wei Fu
21707e6c3b cmd/containerd-shim-runc-v2: add experimental OOM package
The OOM handling code is intended to live under pkg/oom/v2. However, the
cgroupv2 package still needs further refinement, such as exporting the
cgroup path and allowing callers to query specific stats instead of
returning all of them.

Until that work is complete, introduce the OOM package as experimental
and place it under containerd-shim-runc-v2.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2026-01-06 20:44:04 -05:00
Maksym Pavlenko
1e3446f24b Merge pull request #12666 from aadhar-agarwal/aadagarwal/fix-st1005
Fix ST1005 lint violations: lowercase error strings
2026-01-07 01:06:39 +00:00
Fu Wei
4dd1489b4f Merge pull request #12746 from mxpv/tests
Simplify/Cleanup unit tests
2026-01-07 00:53:27 +00:00
Maksym Pavlenko
4d47b9a8c8 Merge pull request #12749 from akhilerm/1.35-support-matrix
doc: add k8s 1.35 to support matrix
2026-01-07 00:52:30 +00:00
Aadhar Agarwal
d6ee6f69b2 Fix ST1005 lint violations: lowercase error strings
Error strings should not be capitalized (unless beginning with proper
nouns or acronyms) or end with punctuation, per Go style guide and
staticcheck ST1005.

This change lowercases the first letter of error messages in fmt.Errorf
calls throughout the codebase, while preserving uppercase for acronyms
at the start of error strings (e.g., NRI, RDT, CDI, UID, GID, VHD, FUSE).

Also fixes typo 'faild' -> 'failed' in resolver_test.go.

Changes:
- core/metadata: target.Digest, target.Size, target.MediaType
- core/remotes/docker: fetcher.Seek, fetcherByDigest
- integration: various test error messages
- internal/cri/server: containerConfig
- plugins/snapshots: erofs

Fixes #12011

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
2026-01-07 00:26:28 +00:00
Maksym Pavlenko
253fbe756a Cleanup unit tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2026-01-06 10:52:49 -08:00
Akhil Mohan
b5ee44fe8e add k8s 1.35 to support matrix
- add k8s 1.35 into support matrix
- remove k8s 1.31 as its EOL in Nov 2025
- 2.0 is removed from the supported list as it was EOL when 1.35
released

Co-authored-by: Mike Brown <brownwm@us.ibm.com>
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2026-01-06 11:00:08 -06:00
Derek McGowan
415b5a534a Merge pull request #12567 from ChengyuZhu6/erofs-mediatype
images: add EROFS layer media type
2026-01-06 06:28:28 +00:00
Kazuyoshi Kato
7d1514ab17 Merge pull request #12709 from singholt/cni-load-fix
cri: update log level to warn for CNI load failure during CRI init
2026-01-06 04:20:49 +00:00
Anuj Singh
b66f92f591 cri: update log level to warn for CNI load failure during init
Signed-off-by: Anuj Singh <singholt@amazon.com>
2026-01-05 17:40:00 -06:00
Maksym Pavlenko
7b632915c1 Merge pull request #12702 from wadey/simplify-client-mount-label
simplify selinux dependency in client
2026-01-05 22:39:43 +00:00
Maksym Pavlenko
2bddff3f21 Merge pull request #12566 from rawahars/main
Set annotations parameter in CreateSandbox request
2026-01-05 18:45:37 +00:00
Phil Estes
2d8e4b6d16 Merge pull request #12722 from containerd/dependabot/github_actions/docker/setup-buildx-action-3.12.0
build(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0
2025-12-30 21:33:51 +00:00
Phil Estes
964ffd3c22 Merge pull request #12723 from containerd/dependabot/github_actions/actions/attest-build-provenance-3.1.0
build(deps): bump actions/attest-build-provenance from 3.0.0 to 3.1.0
2025-12-30 21:33:31 +00:00
Phil Estes
86e412890f Merge pull request #12724 from containerd/dependabot/github_actions/github/codeql-action-4.31.9
build(deps): bump github/codeql-action from 4.31.8 to 4.31.9
2025-12-30 21:33:08 +00:00
Phil Estes
03a7310ab3 Merge pull request #12736 from containerd/dependabot/go_modules/google.golang.org/grpc-1.78.0
build(deps): bump google.golang.org/grpc from 1.77.0 to 1.78.0
2025-12-30 21:32:45 +00:00
Akihiro Suda
31594c0638 Merge pull request #12374 from erofs/erofs-snapshotter-fsmerge
Add support for EROFS fsmerge feature
2025-12-30 12:08:18 +00:00
dependabot[bot]
e7ba3c35c5 build(deps): bump google.golang.org/grpc from 1.77.0 to 1.78.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.77.0 to 1.78.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.77.0...v1.78.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.78.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-29 23:07:31 +00:00
Harsh Rawat
53e696d625 set annotations parameter in CreateSandbox request
In the CreateSandbox request, which is part of the Sandbox Controller, we ignored the `Annotations` parameter which could have been set by the caller via `WithAnnotations` option.

This commit rectifies the same and adds the Annotations parameter to the request.

Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
2025-12-29 17:01:14 +05:30
Gao Xiang
9a7500a974 Add support for EROFS fsmerge feature
EROFS has supported a tiny metadata-only image to reference external
blobs since Linux 5.16. This eliminates the need to mount each EROFS
layer one by one and is also useful for VM-based containers (e.g.
nerdbox and Kata containers.)

Similar to LCOW/CimFS, `snapshots.UnpackKeyPrefix` is used to
trigger fsmerge generation (typically < 100 ms) on demand in Prepare().

In the future, we can also generate fsmeta in Commit() of the final
unpacking layer (by introducing an annotation to keep the chainID).
However, in the case of intermediate layer reuse, the Prepare() handling
will still be required.

```toml
[plugins."io.containerd.snapshotter.v1.erofs"]
  max_unmerged_layers = 1      # enable fsmerge if image layers >= 2
```

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2025-12-29 17:39:09 +08:00
Mike Brown
5566f35c18 Merge pull request #12719 from zhangyoufu/patch-1
pkg/oci: add WithUmask for SpecOpts
2025-12-24 21:34:20 +00:00
Youfu Zhang
01fd590a77 pkg/oci: add WithUmask for SpecOpts
opencontainers/runtime-spec#941 added umask field and released with v1.0.2.
This commit add the missing helper function for this field.

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2025-12-24 09:23:07 +08:00
Mike Brown
1e154a8b25 Merge pull request #12695 from samuelkarp/concurrent-create-container
cri: emit warning for concurrent CreateContainer
2025-12-23 21:16:05 +00:00
ChengyuZhu6
36f8999b94 images: add EROFS layer media type
Signed-off-by: ChengyuZhu6 <hudson@cyzhu.com>
2025-12-23 23:19:50 +08:00
dependabot[bot]
b3fdd83a99 build(deps): bump github/codeql-action from 4.31.8 to 4.31.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.8 to 4.31.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b168cd394...5d4e8d1aca)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 23:06:13 +00:00
dependabot[bot]
4d7ce17462 build(deps): bump actions/attest-build-provenance from 3.0.0 to 3.1.0
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](977bb373ed...00014ed6ed)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 23:05:54 +00:00
dependabot[bot]
ddc35aca2d build(deps): bump docker/setup-buildx-action from 3.11.1 to 3.12.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.11.1 to 3.12.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](e468171a9d...8d2750c68a)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 3.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 23:05:48 +00:00
Davanum Srinivas
90e8fb931b Merge pull request #12720 from dims/drop-skip-for-Feature-ResourceMetrics-in-node-e2e-tests
Drop skip for `[Feature:ResourceMetrics]` in node e2e tests
2025-12-22 19:12:37 +00:00
Mike Brown
cdc828fdc5 Merge pull request #12710 from fidencio/fix-snapshotter-per-runtime-handler
cri: Use the runtimeHandler parameter in PullImage
2025-12-22 15:35:12 +00:00
Davanum Srinivas
b58f6579c7 Drop skip for [Feature:ResourceMetrics] in node e2e tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-12-22 10:13:17 -05:00
Davanum Srinivas
25dde29394 Merge pull request #12704 from dims/ensure-ListMetricDescriptors-gets-tested-with-latest-k/k
Ensure ListMetricDescriptors gets tested with latest k/k
2025-12-22 13:22:07 +00:00
Mike Brown
34ba1eac32 Merge pull request #12675 from klihub/fixes/main/error-on-disabled-cdi
cri: deprecate `enable_cdi`, treat disabled CDI an error for injection requests.
2025-12-20 18:26:45 +00:00
Davanum Srinivas
a31236b4d0 cri: populate Network.Interfaces in PodSandboxStats on Linux
Added getAllContainerNetIO() to collect stats for all interfaces in
the pod's network namespace.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-12-19 19:40:17 -05:00
Davanum Srinivas
635b301430 Ensure ListMetricDescriptors gets tested with latest k/k
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-12-19 19:40:17 -05:00
Fabiano Fidêncio
b8ae0412ff cri: Use the runtimeHandler parameter in PullImage
The runtimeHandler parameter was added to PullImage() but never used.
Instead, the code relied on an experimental annotation
(io.containerd.cri.runtime-handler) passed in the pod sandbox config.

This annotation was a workaround because CRI's PullImageRequest didn't
include the runtime handler. However, since cri-api v0.29.0, the runtime
handler is available in the API and passed as a parameter to PullImage().

For backward compatibility with CRI clients that don't yet pass the
runtime handler parameter, we fall back to the annotation if the
parameter is empty. The annotation-based fallback is deprecated and
will be removed in containerd 2.5.

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2025-12-20 01:27:55 +01:00
Maksym Pavlenko
78cb5b591a Merge pull request #12715 from samuelkarp/noisy-cdi
cri: move noisy CDI logs to debug level
2025-12-19 20:59:45 +00:00
Samuel Karp
f2ad3aedbc cri: move noisy CDI logs to debug level
WithCDI currently emits logs at Info level for every container even when
len(Config.CDIDevices) == 0.  Move these to Debug level.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2025-12-19 11:42:08 -08:00
Mike Brown
92fec18e76 Merge pull request #12705 from cadeniyi/fix-image-decryption
Uncomment call to add options for pulling encrypted images
2025-12-19 15:24:27 +00:00
Chris Adeniyi-Jones
c0052e1c69 Reinstate image decryption
Signed-off-by: Chris Adeniyi-Jones <chris.adeniyi-jones@arm.com>
2025-12-18 21:57:37 +00:00