Commit Graph

14070 Commits

Author SHA1 Message Date
Derek McGowan
9104e6a24f
Add events proxy interface
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-01 14:27:27 -08:00
Laura Brehm
892dc54bd2
runc-shim: process exec exits before init
For a given container, as long as the init process is the init process
of that PID namespace, we always receive the exits for execs before we
receive them for the init process.

It's important that we uphold this invariant for the outside world by
always emitting a TastExit event for a container's exec before we emit
one for the init process because this is the expected behavior from
callers, and changing this creates issues - such as Docker, which will
delete the container after receiving a TaskExit for the init process,
and then not be able to handle the exec's exit after having deleted
the container (see: https://github.com/containerd/containerd/issues/9719).

Since 5cd6210ad0, if an exec is starting
at the same time that an init exits, if the exec is an "early exit"
i.e. we haven't emitted a TaskStart for it/put it in `s.running` by the
time we receive it's exit, we notify concurrent calls to `s.Start()` of
the exit and continue processing exits, which will cause us to process
the Init's exit before the exec, and emit it, which we don't want to do.

This commit introduces a map `s.pendingExecs` to keep track of the
number of pending execs keyed by container, which allows us to skip
processing exits for inits if there are pending execs, and instead
have the closure returned by `s.preStart` handle the init exit after
emitting the exec's exit.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-03-01 16:43:19 +00:00
Derek McGowan
9128ee0a91
Move nri packages to plugin and internal
NRI is still newer and mostly used by CRI plugin. Keep the package in
internal to allow for interfaces as the project matures.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-29 21:37:36 -08:00
Abel Feng
d0da3d1caf sandbox: make event monitor in CRI independent
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-03-01 10:30:52 +08:00
Phil Estes
9a2b85561a
Merge pull request #9867 from daghack/oci-add-mediatype
adds mediatype to oci index record
2024-02-29 21:32:59 +00:00
Talon
17ea3959bc adds mediatype to oci index record
Signed-off-by: Talon Bowler <talon.bowler@docker.com>
2024-02-29 10:04:48 -08:00
Fu Wei
6333db7701
Merge pull request #9891 from dmcgowan/move-events-plugin
Move events to plugins and core
2024-02-29 12:45:25 +00:00
Akihiro Suda
1f69774af3
Merge pull request #9893 from dmcgowan/update-client-support
Add Go client stability in RELEASES.md for 2.0
2024-02-29 01:51:50 +00:00
Fu Wei
2cdf012387
Merge pull request #9617 from abel-von/sandbox-plugin-0109
sandbox: use sandboxService in CRI plugin instead of calling controller API directly
2024-02-28 15:49:12 +00:00
Anthony Nandaa
c5ef8a2c26 fix(docs): fix duplicate instructions for windows installation
This commit fixes the duplicate copy and configure steps for
the Windows powershell scripts.

fixes #9887

It also adds the architecture as a variable in preparation for
the ARM64 support that is coming.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2024-02-28 11:21:28 +03:00
Derek McGowan
87e8e9c7f6
Add Go client stability in releases for 2.0.
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-27 23:27:07 -08:00
Derek McGowan
72f21833b1
Move events to plugins and core
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-27 22:09:20 -08:00
Phil Estes
f0c64a9fa0
Merge pull request #9859 from DataDog/jb/zstd-support
mediatypes: support zstd compression
2024-02-27 22:31:41 +00:00
Phil Estes
dc0f1aef56
Merge pull request #9888 from thaJeztah/bump_bolt
vendor: go.etcd.io/bbolt v1.3.9
2024-02-27 21:10:42 +00:00
Mike Brown
caa9e20759 add k8s 1.29 and 1.30preview to support table
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2024-02-27 12:38:48 -06:00
Phil Estes
ef1cba3a10
Merge pull request #9881 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.7
build(deps): bump github.com/klauspost/compress from 1.17.6 to 1.17.7
2024-02-27 16:41:51 +00:00
Sebastiaan van Stijn
154ed26a77
vendor: go.etcd.io/bbolt v1.3.9
full diff: https://github.com/etcd-io/bbolt/compare/v1.3.8...v1.3.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-27 15:12:15 +01:00
Iceber Gu
6d1dfe55fb cri: ensure the pause image loaded in older versions is pinned
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2024-02-27 16:40:43 +08:00
Derek McGowan
c9c8346bfa
Merge pull request #9878 from amghazanfari/main
refactor: clean switch statements and convert if to switch
2024-02-27 05:14:01 +00:00
Phil Estes
b1624c3628
Merge pull request #9869 from fuweid/move_local_sb_to_service
plugins/sandbox: move local plugin into services
2024-02-27 00:00:38 +00:00
dependabot[bot]
2884b318f9
build(deps): bump github.com/klauspost/compress from 1.17.6 to 1.17.7
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.6 to 1.17.7.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.17.6...v1.17.7)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 23:42:38 +00:00
amghazanfari
bd44df8a1c refactor code - clean switch and if statements
Signed-off-by: amghazanfari <a.m.ghazanfari76@gmail.com>
2024-02-26 22:07:14 +03:30
Abel Feng
a60e52f582 sandbox: add struct tags for PinnedImages
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-26 10:15:24 +08:00
Abel Feng
a0b73ae114 sandbox: optimize the lock in PodSandbox
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-26 10:15:18 +08:00
Abel Feng
0f1d27412f sandbox: add methods to sandboxService
so that we cri service don't have to get sandbox controller everytime it
needs to call sandbox controller api.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-26 10:10:11 +08:00
Fu Wei
7f0f49b438
Merge pull request #9871 from fuweid/fix-windows-ci-main
.github: windows should use fix critool version
2024-02-25 22:53:10 +00:00
Wei Fu
5351ad6b4a .github: windows should use fix critool version
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-24 22:48:53 +08:00
Wei Fu
a2768f19d9 plugins/sandbox: move local plugin into services
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-24 20:45:17 +08:00
Phil Estes
290194fe77
Merge pull request #9852 from containerd/dependabot/go_modules/google.golang.org/grpc-1.62.0
build(deps): bump google.golang.org/grpc from 1.61.0 to 1.62.0
2024-02-23 19:34:09 +00:00
Phil Estes
74dd6e6f3f
Merge pull request #9861 from mxpv/pause
Remove pause package from runc shim
2024-02-23 19:26:27 +00:00
Adrien Delorme
bb9d923aa6
content: add a BlobReadSeeker func to allow multipart blob streaming
A downstream library (s3) needs a read seeker to be able to do its own multipart upload.

See: https://github.com/moby/buildkit/pull/4551

Signed-off-by: Adrien Delorme <azr@users.noreply.github.com>
2024-02-23 10:00:35 +01:00
Maksym Pavlenko
33e544e94a
Merge pull request #9800 from austinvazquez/update-golangci-lint
Update golangci-lint version to v1.56.1 and resolve warnings
2024-02-22 21:22:56 +00:00
Maksym Pavlenko
c3ec84c3ab
Merge pull request #9584 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.18.0
build(deps): bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0
2024-02-22 21:18:40 +00:00
Maksym Pavlenko
65588b5238
Merge pull request #7609 from dmcgowan/generate-ttrpc-services
Generate proto services with go-ttrpc
2024-02-22 20:38:21 +00:00
Maksym Pavlenko
464319b3ab
Remove pause package from runc shim
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 11:42:16 -08:00
Maksym Pavlenko
c7f5443e2b
Merge pull request #9841 from containerd/dependabot/go_modules/github.com/opencontainers/runtime-spec-1.2.0
build(deps): bump github.com/opencontainers/runtime-spec from 1.1.1-0.20230823135140-4fec88fd00a4 to 1.2.0
2024-02-22 19:32:00 +00:00
Julien Balestra
d651cb743d mediatypes: support zstd compression
Signed-off-by: Julien Balestra <julien.balestra@gmail.com>
2024-02-22 18:35:08 +01:00
Fu Wei
7467d81987
Merge pull request #9836 from kinvolk/rata/userns-runtimeHandler
Add support for userns (k8s >= 1.30)
2024-02-22 15:31:38 +00:00
Rodrigo Campos
2cd08156ed cri: Expose runtimeHandler support for userns
Since kubernetes 1.30, the kubelet will query the runtime handlers
features and only start pods with userns if the runtime handler used for
that pod supports it.

Let's expose the user namespace support to the kubelet.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-02-22 11:42:18 -03:00
Rodrigo Campos
358aef4bcb go.mod: Update cri-api to include userns changes
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-02-22 10:37:41 -03:00
dependabot[bot]
105f2d7273
build(deps): bump google.golang.org/grpc from 1.61.0 to 1.62.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.61.0 to 1.62.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.61.0...v1.62.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 05:40:45 +00:00
dependabot[bot]
02db6beb80
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 05:21:17 +00:00
Derek McGowan
7628c046be
Merge pull request #9849 from containerd/dependabot/go_modules/k8s-ee769a58bd
build(deps): bump the k8s group with 5 updates
2024-02-22 05:03:31 +00:00
Akihiro Suda
fcdfd923cb
Merge pull request #8970 from cpuguy83/otel_off_by_default
Configure otel from env instead of config.toml
2024-02-22 04:57:50 +00:00
Maksym Pavlenko
fde15badb0
Merge pull request #9738 from abel-von/add-vsock
sandbox: support vsock connection to task api
2024-02-22 03:26:41 +00:00
dependabot[bot]
75f58579c8
build(deps): bump github.com/opencontainers/runtime-spec
Bumps [github.com/opencontainers/runtime-spec](https://github.com/opencontainers/runtime-spec) from 1.1.1-0.20230823135140-4fec88fd00a4 to 1.2.0.
- [Release notes](https://github.com/opencontainers/runtime-spec/releases)
- [Changelog](https://github.com/opencontainers/runtime-spec/blob/main/ChangeLog)
- [Commits](https://github.com/opencontainers/runtime-spec/commits/v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runtime-spec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-22 02:23:36 +00:00
Abel Feng
522130a667 sandbox: support vsock connection to task api
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-22 01:36:38 +00:00
Derek McGowan
f0e8749411
Add ttrpc generated services
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-21 14:22:25 -08:00
Derek McGowan
65031eadec
Update protobuild to build ttrpc services
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-21 14:22:25 -08:00
Maksym Pavlenko
67ff3dbc8d
Merge pull request #9795 from catap/prevent-zero-timer
Prevent GC from schedule itself with 0 period.
2024-02-21 21:15:00 +00:00