Compare commits

...

2481 Commits

Author SHA1 Message Date
90d73c9e88 Ignore reading-only judgment to support CDI volume
Downgrade log level for task exit.
2025-06-10 11:22:13 +08:00
Shiming Zhang
a3c777afd1 Add OCI/Image Volume Source support
Signed-off-by: Shiming Zhang <wzshiming@hotmail.com>
2025-06-05 10:21:04 +08:00
Brad Davidson
890953d3c6
Enable btrfs/fuse-overlayfs/stargz snapshotter plugins
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:41 +00:00
Brad Davidson
f660f4424f
Add rewrite support to hosts.toml loader
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:14 +00:00
Jacob Blain Christen
ba6b205d0f
Mirror repository rewrites (v1.1)
Support CRI configuration to allow for request-time rewrite rules
applicable only to the repository portion of resource paths when pulling
images. Because the rewrites are applied at request time, images
themselves will not be "rewritten" -- images as stored by CRI (and the
underlying containerd facility) will continue to present as normal.

As an example, if you use the following config for your containerd:
```toml
[plugins]
  [plugins."io.containerd.grpc.v1.cri"]
    [plugins."io.containerd.grpc.v1.cri".registry]
      [plugins."io.containerd.grpc.v1.cri".registry.mirrors]
        [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
          endpoint = ["https://registry-1.docker.io/v2"]
       	  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io".rewrite]
            "^library/(.*)" = "my-org/$1"
```

And then subsequently invoke `crictl pull alpine:3.13` it will pull
content from `docker.io/my-org/alpine:3.13` but still show up as
`docker.io/library/alpine:3.13` in the `crictl images` listing.

This commit has been reworked from the original implementation. Rewites
are now done when resolving instead of when building the request, so
that auth token scopes stored in the context properly reflect the
rewritten repository path. For the original implementation, see
06c4ea9baec2b278b8172a789bf601168292f645.
Ref: https://github.com/k3s-io/k3s/issues/11191#issuecomment-2455525773

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:14 +00:00
Brad Davidson
676ba43ad3
Remove GRPC metrics
These conflict with other GRPC servers when running embedded

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:14 +00:00
ningmingxiao
b9ab7a3f49
cri:fix containerd panic when can't find sandbox extension
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-05-06 22:38:13 +00:00
Maksym Pavlenko
fb4c30d4ed
Merge pull request #11717 from dmcgowan/backport-go-1.23.8
[release/2.0] Update go to 1.23.8
2025-04-17 12:39:09 -07:00
Maksym Pavlenko
d60230c0a2
Merge pull request #11713 from dmcgowan/prepare-v2.0.5
[release/2.0] Prepare release notes for v2.0.5
2025-04-17 12:37:45 -07:00
Akhil Mohan
5bcf0a95e3
use go1.23.8 as the default go version
use go1.23.8 as the default go version for running in CI and making
release binaries.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 6f93c65f52c9e1c5e25595429fd50ce2e5da6843)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-17 11:18:09 -07:00
Akhil Mohan
4838f33f7e
update to go 1.24.2, 1.23.8
- go1.23.8 (released 2025-04-01) includes security fixes to the net/http
  package, as well as bug fixes to the runtime and the go command.
  Ref: https://github.com/golang/go/issues?q=milestone%3AGo1.23.8+label%3ACherryPickApproved
- go1.24.2 (released 2025-04-01) includes security fixes to the net/http
  package, as well as bug fixes to the compiler, the runtime, the go
  command, and the crypto/tls, go/types, net/http, and testing packages.
  Ref: https://github.com/golang/go/issues?q=milestone%3AGo1.24.2+label%3ACherryPickApproved

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 5629e9fff7de69a36f5f563d41966aa562866258)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-17 11:18:09 -07:00
Derek McGowan
a8082cd60d
Prepare release notes for v2.0.5
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 21:55:18 -07:00
Phil Estes
ab513cdec2
Merge pull request #11710 from dmcgowan/backport-11707
[release/2.0] Disable criu test on arm64
2025-04-16 20:59:16 -04:00
Phil Estes
58b715ad8d
Disable arm64 criu testing in GH Actions
Due to current 100% failure rate on arm64 with the current OS image, disable criu testing for now

Signed-off-by: Phil Estes <estesp@amazon.com>
(cherry picked from commit 9ca6a7ee0aa0ea8added551dd16e00b2102fdea4)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 16:17:25 -07:00
Akhil Mohan
b4a53e8264
disable portmap test in ubuntu-22 to make CI happy
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 338e0a1266302fed4b52a852735b90a832ad2b0f)
(cherry picked from commit 70db1bd00fb5db7c3958da4aefac0c41c89bb654)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 16:15:12 -07:00
Akhil Mohan
4bcf472de6
add option to skip tests in critest
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
(cherry picked from commit 4ba3d82ca270937a428d4b6c006bd7e9f8261743)
(cherry picked from commit 8e6c93b6b057230915b449349836bf198f8ebcfe)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-04-16 16:14:51 -07:00
Derek McGowan
ea7be04cb4
Merge pull request #11698 from k8s-infra-cherrypick-robot/cherry-pick-11670-to-release/2.0
[release/2.0] Prevent panic on zero length push
2025-04-16 08:57:13 +08:00
Derek McGowan
ebd9a50325
Merge pull request #11688 from estesp/cp-11641
[release/2.0] backport: Set default differ for the default unpack config of transfer service
2025-04-16 08:56:47 +08:00
Derek McGowan
ff47757ae4
Merge pull request #11703 from k8s-infra-cherrypick-robot/cherry-pick-11479-to-release/2.0
[release/2.0] ci: update GitHub Actions release runner to ubuntu-24.04
2025-04-16 08:53:11 +08:00
Austin Vazquez
b184a97d30 ci: update GitHub Actions release runner to ubuntu-24.04
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2025-04-16 00:16:49 +00:00
Cesar Talledo
8a638b71ae Prevent panic in Docker pusher.
Prevent a panic in the Docker pusher pushWriter, by checking that
the pipe is non nil before attempting to use it.

The panic was found by Moby issue #46746 (https://github.com/moby/moby/issues/46746).
With this fix the panic no longer reproduces.

Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
2025-04-14 21:25:41 +00:00
Henry Wang
84d9658c36
Set default differ for the default unpack config of transfer service
Signed-off-by: Henry Wang <henwang@amazon.com>
(cherry picked from commit a083b669c9412eef55ee103fe2bb1dec7c6178bc)
2025-04-11 12:09:53 -04:00
Fu Wei
9e97c2e626
Merge pull request #11621 from k8s-infra-cherrypick-robot/cherry-pick-11475-to-release/2.0
[release/2.0] fix: call checkCopyShimLogError(shimCtx) to avoid expected error log flood
2025-03-28 19:12:21 -04:00
yylt
e04543db09 use shimCtx for fifo copy
Signed-off-by: yylt <yang8518296@163.com>
2025-03-28 20:28:58 +00:00
Fu Wei
a5b872b5c8
Merge pull request #11618 from k8s-infra-cherrypick-robot/cherry-pick-11569-to-release/2.0
[release/2.0] update taskOptions based on runtimeOptions when creating a task
2025-03-28 15:24:53 -04:00
Iceber Gu
9f46e7a449 integration/client: add tests for TaskOptions is not empty
Co-authored-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-28 18:33:13 +00:00
Iceber Gu
8a16a6a04a prefer task options for PluginInfo request
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-28 18:33:13 +00:00
Iceber Gu
a183b2d232 update taskOptions based on runtimeOptions when creating a task
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2025-03-28 18:33:13 +00:00
Fu Wei
c146996f3f
Merge pull request #11599 from k8s-infra-cherrypick-robot/cherry-pick-11581-to-release/2.0
[release/2.0] *: CRIImageService should delete image synchronously
2025-03-25 09:47:53 -04:00
Wei Fu
091143135b *: CRIImageService should delete image synchronously
Use memory service instead of metadata store.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-03-25 02:36:45 +00:00
Phil Estes
148fbbb92f
Merge pull request #11583 from k8s-infra-cherrypick-robot/cherry-pick-11560-to-release/2.0
[release/2.0] Update runc binary to v1.2.6
2025-03-24 16:16:45 +01:00
Austin Vazquez
c2372c072c Update runc binary to v1.2.6
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2025-03-22 18:53:57 +00:00
Akihiro Suda
ceb33770d2
Merge pull request #11566 from klihub/2.0/deps/bump-cdi-version
[release/2.0] go.{mod,sum}: bump CDI deps to stable v1.0.0.
2025-03-20 02:57:31 +09:00
Phil Estes
c0d93d20be
Merge pull request #11571 from AkihiroSuda/dev-2.0
[release/2.0] silence govulncheck false positives
2025-03-19 17:58:09 +01:00
Krisztian Litkey
e8506511b2
go.{mod,sum}: bump CDI deps to stable v1.0.0.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2025-03-19 17:29:35 +02:00
Akihiro Suda
4cfb89430c
go.mod: github.com/go-jose/go-jose/v4
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 23:00:47 +09:00
Akihiro Suda
2b9e6a29d7
go.mod: golang.org/x/oauth2 v0.28.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 23:00:20 +09:00
Akihiro Suda
6df1ea0d9e
go.mod: golang.org/x/net v0.37.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-03-19 22:59:07 +09:00
Akihiro Suda
dcd661b138
Merge pull request #11567 from klihub/fixes/2.0/ci-lint-errors
[release/2.0] Fix CI lint error (cherry-picked #11555)
2025-03-19 22:49:23 +09:00
Jin Dong
16f20abdff
Fix CI lint error
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
(cherry picked from commit c8effff1a823bed757194584a80a043c3a69da1a)
2025-03-19 11:35:45 +02:00
Derek McGowan
1a43cb6a10
Merge commit from fork
[release 2.0] validate uid/gid
2025-03-18 01:23:21 +08:00
Derek McGowan
bf82ae2582
Merge pull request #11541 from dmcgowan/prepare-2.0.4
[release/2.0] Prepare release notes for v2.0.4
2025-03-18 01:21:27 +08:00
Derek McGowan
06a886a8e4
Prepare release notes for v2.0.4
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-03-13 18:47:26 -07:00
Akihiro Suda
e9989a2147
Merge pull request #11536 from k8s-infra-cherrypick-robot/cherry-pick-11508-to-release/2.0
[release/2.0] Respect `client.WithTimeout` option on connect
2025-03-14 09:30:39 +09:00
Akihiro Suda
b6ab437d2b
Merge pull request #11537 from k8s-infra-cherrypick-robot/cherry-pick-11327-to-release/2.0
[release/2.0] Update image type checks to avoid unnecessary logs for attestations
2025-03-14 09:07:49 +09:00
Paweł Gronowski
916d487226 core/remotes: Handle attestations in MakeRefKey
Don't produce `reference for unknown type: application/vnd.in-toto+json`
warning logs when pushing/fetching an image containing the attestation
manifests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-13 18:18:21 +00:00
Paweł Gronowski
df4d905a6f core/images: Ignore attestations when traversing children
Before this patch, calling `image.Children` on an image built with
BuildKit would produce unnecessary `encountered unknown type
application/vnd.in-toto+json; children may not be fetched` debug logs,
because the media type is neither a known layer or config type.

Make the `image.Children` aware of the attestation layers and don't
attempt to traverse them.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-13 18:18:21 +00:00
Paweł Gronowski
6b5efba83b client: Respect client.WithTimeout option
Fix the gRPC client dialer not using the timeout passed by the
containerd client timeout option.

Commit 63b4688175 replaced the usage of deprecated `grpc.DialContext`
with `grpc.NewClient`.

However, the `dialer.ContextDialer` relied on the context deadline to
propagate the timeout:

388fb336b0/vendor/google.golang.org/grpc/clientconn.go (L216)

This assumption is now broken, because `grpc.NewClient` doesn't do any
initial connection and defers it to the first RPC usage.

This commit passes the timeout via the `MinConnectTimeout` grpc
connection param, which will be applied to **every** connection attempt
(not just the first).

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-13 18:11:16 +00:00
Derek McGowan
76db0585af
Merge pull request #11529 from ningmingxiao/v2.0_fix
[release/2.0] Fix incorrect runtime name being passed to NRI
2025-03-13 23:58:57 +08:00
Craig Ingram
07a0b5419c (cherry picked from commit de1341c201ffb0effebbf51d00376181968c8779) 2025-03-11 14:52:44 +00:00
ningmingxiao
4f037050ce add name in package version
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2025-03-11 09:31:53 +08:00
Akihiro Suda
5a3ac90a7a
Merge pull request #11514 from akhilerm/2.0-update-go1.24.1
[release/2.0] update build to go1.23.7, test go1.24.1
2025-03-10 04:20:40 +09:00
Akhil Mohan
e5ad0d0a0e
update build to go1.23.7, test go1.24.1
- go1.23.7 (released 2025-03-04) includes security fixes to the net/http
package, as well as bug fixes to cgo, the compiler, and the reflect,
runtime, and syscall packages. See the Go 1.23.7 milestone on our issue
tracker for details

- go1.24.1 (released 2025-03-04) includes security fixes to the net/http
package, as well as bug fixes to cgo, the compiler, the go command, and
the reflect, runtime, and syscall packages. See the Go 1.24.1 milestone
on our issue tracker for details.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-03-09 19:06:40 +05:30
Phil Estes
ad6934d599
Merge pull request #11506 from k8s-infra-cherrypick-robot/cherry-pick-11502-to-release/2.0
[release/2.0] docs: include note about unprivileged sysctls
2025-03-07 16:34:33 -05:00
Phil Estes
62f18de18b
Merge pull request #11503 from k8s-infra-cherrypick-robot/cherry-pick-11489-to-release/2.0
[release/2.0] e2e: use the shim bundled with containerd artifact
2025-03-07 16:05:43 -05:00
Samuel Karp
a39f1146b0 docs: include note about unprivileged sysctls
We changed the default setting for `enable_unprivileged_ports` and
`enable_unprivileged_icmp` in the CRI plugin in
https://github.com/containerd/containerd/pull/9348, but missed including
this change in the release notes.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2025-03-07 08:34:08 +00:00
Akhil Mohan
81b3384a0d e2e: use the shim bundled with containerd artifact
use the shim bundled with cri-cni-containerd tar rather than using
the shim present on the host machine for running e2e

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-03-07 02:26:35 +00:00
Samuel Karp
a7f1ff94d7
Merge pull request #11497 from akhilerm/update-ltag-2.0
[release/2.0] build(deps): bump containerd/project-checks from 1.1.0 to 1.2.1
2025-03-06 10:29:25 -08:00
dependabot[bot]
7215a7d2ca
build(deps): bump containerd/project-checks from 1.1.0 to 1.2.1
Bumps [containerd/project-checks](https://github.com/containerd/project-checks) from 1.1.0 to 1.2.1.
- [Commits](434a071576...800740a80e)

---
updated-dependencies:
- dependency-name: containerd/project-checks
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 69c0d7f60f74210d6e41515e9064bb96362683c7)
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-03-06 14:43:05 +05:30
Derek McGowan
06b99ca80c
Merge pull request #11443 from dmcgowan/prepare-v2.0.3
[release/2.0] Prepare release notes for v2.0.3
2025-02-28 10:54:00 -08:00
Derek McGowan
84e6cbafd5
Merge pull request #11457 from jsternberg/backport-remote-write-grpc-limits-exceeded
[release/2.0] Update remote content to break up writes to avoid grpc message size limits
2025-02-28 10:51:56 -08:00
Derek McGowan
b98cdb39df
Merge pull request #11456 from k8s-infra-cherrypick-robot/cherry-pick-11271-to-release/2.0
[release/2.0] Fix privileged container sysfs can't be rw because pod is ro by default
2025-02-28 10:51:43 -08:00
Jonathan A. Sternberg
eaa7ca80dc
proxy: break up writes from the remote writer to avoid grpc limits
The remote content writer proxy already has the capability to break up
large files into multiple writes, but the current API doesn't recognize
when it's about to exceed the limits and attempts to send the data over
grpc in one message instead of breaking it into multiple messages.

This changes the behavior of `Write` to automatically break up the size
of the content based on the max send message size.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit f25f36c334144d87233e06b0de90522ebd97e144)
2025-02-28 11:29:51 -06:00
fengwei0328
c7f64196fc Fix privileged container sysfs can't be rw because pod is ro by default
Signed-off-by: fengwei0328 <feng.wei8@zte.com.cn>
2025-02-28 16:07:00 +00:00
Akihiro Suda
67bb32a8b2
Merge pull request #11430 from klihub/fixes/release/2.0.x/cdi-emfile-sigsegv
[release/2.0] go.{mod,sum}: bump CDI deps to v.0.8.1.
2025-02-27 23:52:49 +09:00
Akihiro Suda
02b70eaa9b
Merge pull request #11446 from k8s-infra-cherrypick-robot/cherry-pick-11442-to-release/2.0
[release/2.0] Prefer runtime options for PluginInfo request
2025-02-27 23:51:44 +09:00
Akihiro Suda
1bdee2c4b8
Merge pull request #11439 from k8s-infra-cherrypick-robot/cherry-pick-11433-to-release/2.0
[release/2.0] pkg: prevent oom watcher from depending on shim pkg
2025-02-27 17:46:32 +09:00
Jose Fernandez
569af34cbb Prefer runtime options for PluginInfo request
Previously, PluginInfo was called with task options as the primary
value, resulting in opts.BinaryName being omitted. Consequently, the
containerd-shim-runc-v2 fell back to the system's runc binary in the
PATH rather than the explicitly specified one. This change inverts the
option fallback by preferring runtime options over task options,
ensuring the correct binary is used for the PluginInfo request.

Closes: https://github.com/containerd/containerd/issues/11169

Signed-off-by: Jose Fernandez <josef@netflix.com>
Reviewed-by: Erikson Tung <etung@netflix.com>
2025-02-27 07:37:01 +00:00
Derek McGowan
b8dde9189d
Prepare release notes for v2.0.3
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-02-26 17:34:07 -08:00
Phil Estes
968d9452ed
Merge pull request #11436 from AkihiroSuda/cherrypick-11427-2.0
[release/2.0] CI: arm64-8core-32gb -> ubuntu-24.04-arm
2025-02-26 10:20:17 -05:00
Lei Liu
0ce93e16a9 prevent oom watcher depend on shim pkg.
Signed-off-by: Lei Liu <liulei.pt@bytedance.com>
2025-02-26 01:46:25 +00:00
Akihiro Suda
f3284aa68f
CI: arm64-8core-32gb -> ubuntu-24.04-arm
GHA now provides ARM runners for free

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 4e7484d3f40a8ec07126eb16fae614aedafe630a)
> Conflicts:
>	.github/workflows/ci.yml
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-02-26 10:15:20 +09:00
Krisztian Litkey
92ae2951ff
Update CDI dependency to v0.8.1.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2025-02-25 09:39:55 +02:00
Akihiro Suda
6b4c4a19f5
Merge pull request #11403 from k8s-infra-cherrypick-robot/cherry-pick-11323-to-release/2.0
[release/2.0] Revert "Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG"
2025-02-25 12:41:15 +09:00
Akihiro Suda
6a3f071b8b
Merge pull request #11411 from k8s-infra-cherrypick-robot/cherry-pick-11362-to-release/2.0
[release/2.0] move the device after the options when using mkfs.ext4
2025-02-21 10:57:51 +09:00
zouyee
f95a426b83 move the device after the options when using mkfs.ext4
Signed-off-by: zouyee <zouyee1989@gmail.com>
2025-02-20 07:44:00 +00:00
Maksym Pavlenko
6b5e19bdc5
Merge pull request #11410 from akhilerm/2.0-update-go1.24
[release/2.0] update build to go1.23.6, test go1.24.0
2025-02-19 09:18:17 -08:00
Akhil Mohan
4d19a6adfe
update build to go1.23.6, test go1.24.0
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-02-19 20:40:03 +05:30
Samuel Karp
e7efb877ca
Merge pull request #11405 from djdongjin/release-2.0-bump-up-cache-action
[release/2.0] build(deps): bump actions/cache from 4.1.2 to 4.2.0
2025-02-18 16:48:04 -08:00
Phil Estes
67931999d8
Merge pull request #11387 from frcai/users/frcai/upgrade-x-net-33
[release/2.0] Upgrade x/net to 0.33.0 to fix vulnerability GHSA-w32m-9786-jp63
2025-02-18 16:40:13 -05:00
dependabot[bot]
c738c3aabc build(deps): bump actions/cache from 4.1.2 to 4.2.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6849a64899...1bd1e32a3b)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 9270122437f5a0105c74b49089fddc1a2c2648af)
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-02-18 20:26:38 +00:00
Chris Henzie
b5313993c1 Revert "Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG"
This reverts commit b5290726d2.

Signed-off-by: Chris Henzie <chrishenzie@google.com>
2025-02-18 15:31:16 +00:00
Akihiro Suda
6b5df746e4
Merge pull request #11357 from k8s-infra-cherrypick-robot/cherry-pick-11019-to-release/2.0
[release/2.0] Update install-imgcrypt to allow change install repo
2025-02-18 19:03:14 +09:00
Fu Wei
cb68d980c5
Merge pull request #11394 from k8s-infra-cherrypick-robot/cherry-pick-11388-to-release/2.0
[release/2.0] Update runc binary to v1.2.5
2025-02-18 11:38:15 +08:00
Austin Vazquez
697c59c635 Update runc binary to v1.2.5
This is the fifth patch release in the 1.2.z series of runc. It
primarily fixes an issue caused by an upstream systemd bug.

There was a regression in systemd v230 which made the way we define device
rule restrictions require a systemctl daemon-reload for our transient
units. This caused issues for workloads using NVIDIA GPUs. Workaround the
upstream regression by re-arranging how the unit properties are defined.
Dependency github.com/cyphar/filepath-securejoin is updated to v0.4.1,
to allow projects that vendor runc to bump it as well.
CI: fixed criu-dev compilation.
Dependency golang.org/x/net is updated to 0.33.0.

diff: opencontainers/runc@v1.2.4...v1.2.5

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2025-02-17 22:20:04 +00:00
Chifeng Cai
fcf64305ce Update vendor files to fix build failure
Signed-off-by: Chifeng Cai <frcai@microsoft.com>
2025-02-13 17:06:05 -08:00
Chifeng Cai
d3437eb291 Upgrade x/net to 0.33.0
Signed-off-by: Chifeng Cai <frcai@microsoft.com>
2025-02-13 17:01:36 -08:00
Jing Xu
0785bd8cc6 Update install-imgcrypt to allow change install repo
Add repo env similar to other install script

Signed-off-by: Jing Xu <jinxu@google.com>
2025-02-07 21:52:14 +00:00
Mike Brown
29be12a668
Merge pull request #11269 from MikeZappa87/bugfix/gocnirace
[release/2.0] Update go-cni version to fix Race Condition issue
2025-02-05 16:26:14 -06:00
Fu Wei
be08040e8d
Merge pull request #11329 from klihub/fixes/containerd/2.0.x/nri-plugin-sync
[release/2.0] fix initial sync race of registering NRI plugins.
2025-02-04 09:35:57 -05:00
Michael Zappa
06891f899d
fix go-cni race condition
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
2025-02-03 16:26:08 -07:00
Phil Estes
7319817149
Merge pull request #11325 from kiashok/update-imgcrypt
[release/2.0] Update github.com/containerd/imgcrypt to v2.0.0
2025-02-03 14:02:20 -05:00
Krisztian Litkey
79cdbf61b6
cri,nri: block NRI plugin sync. during event processing.
Block the synchronization of registering NRI plugins during
CRI events to avoid the plugin ending up in an inconsistent
starting state after initial sync (missing pods, containers
or missed events for some pods or containers).

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2025-02-03 10:24:20 +02:00
Kirtana Ashok
9d5cfce833 Update github.com/containerd/imgcrypt to v2.0.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2025-01-30 10:09:20 -08:00
Mike Brown
e465b45f9c
Merge pull request #11265 from dmcgowan/2.0-fix-cdi-oci-opt
[release/2.0] Move CDI device spec out of the OCI package
2025-01-23 13:19:23 -06:00
Derek McGowan
c18314700a
Merge pull request #11297 from k8s-infra-cherrypick-robot/cherry-pick-11277-to-release/2.0
[release/2.0] update to go1.23.5 / go1.22.11
2025-01-22 10:09:18 -07:00
Akhil Mohan
1f4e5688ef update to go1.23.5 / go1.22.11
- go1.23.5 (released 2025-01-16) includes security fixes to the
crypto/x509 and net/http packages, as well as bug fixes to the compiler,
the runtime, and the net package. See the Go 1.23.5 milestone on our
issue tracker for details.

- go1.22.11 (released 2025-01-16) includes security fixes to the
crypto/x509 and net/http packages, as well as bug fixes to the runtime.
See the Go 1.22.11 milestone on our issue tracker for details.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-01-22 05:12:48 +00:00
Derek McGowan
f58939c33d
Remove deprecated WithCDIDevices in oci spec opts
This function has been moved to prevent an unintended dependency on CDI.

Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit bdc847f1eb535a6728b6db3f2619d2a5ed0edbb9)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-01-17 08:58:34 -08:00
Derek McGowan
3d53430fe1
Move CDI device spec out of the OCI package
The CDI device injection spec opt was mistakenly added to the OCI
package which brought in an unintended dependency on CDI and its
transitive dependencies.

Signed-off-by: Derek McGowan <derek@mcg.dev>
(cherry picked from commit e20f7f4a2425c005d85855abfd4556d7b4ccbf87)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-01-14 14:16:18 -08:00
Derek McGowan
0fbf3c3b38
Merge pull request #11263 from thaJeztah/2.0_backport_protobuf_1.35.2
[release/2.0 backport] build(deps): bump google.golang.org/protobuf from 1.35.1 to 1.35.2
2025-01-14 10:50:48 -07:00
dependabot[bot]
3a6ab80d01
build(deps): bump google.golang.org/protobuf from 1.35.1 to 1.35.2
Bumps google.golang.org/protobuf from 1.35.1 to 1.35.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit dd2d891672305ab756b4b93970ac1342c952ffc8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-14 09:53:24 +01:00
Derek McGowan
c507a0257e
Merge pull request #11245 from AkihiroSuda/prepare-v2.0.2
Prepare release notes for v2.0.2
2025-01-13 22:21:27 -07:00
Akihiro Suda
cdaf4dfb4d
Prepare release notes for v2.0.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-01-14 11:14:20 +09:00
Kazuyoshi Kato
0d9aa65eba
Merge pull request #11259 from k8s-infra-cherrypick-robot/cherry-pick-11257-to-release/2.0
[release/2.0] Update platforms to latest rc
2025-01-13 16:00:04 -08:00
Derek McGowan
eb125e1dd3 Update platforms to latest rc
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-01-13 22:26:42 +00:00
Derek McGowan
c334ae68b8
Merge pull request #11256 from k8s-infra-cherrypick-robot/cherry-pick-10980-to-release/2.0
[release/2.0] Remove confusing warning in cri runtime config migration
2025-01-13 09:09:32 -07:00
Jin Dong
468079c5c4 Remove confusing warning in cri runtime config migration
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-01-13 15:26:45 +00:00
Akihiro Suda
b48e1080c2
Merge pull request #11248 from k8s-infra-cherrypick-robot/cherry-pick-11165-to-release/2.0
[release/2.0] Fix runtime platform loading in cri image plugin init
2025-01-11 23:06:22 +09:00
Jin Dong
a2d9d4fd55 Fix runtime platform loading in cri image plugin init
The cri image service init has a bug where, after getting FSPath
for snapshotter_i, it stores it under defaultSnapshotter instead
of snapshotter_i.

Also make a few other refactor:

1. Dedup the snapshotRoot loading for defaultSnapshotter
2. Remove some unnecessary logic in RuntimePlatforms for-loop

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-01-10 21:12:46 +00:00
Maksym Pavlenko
e1b0bb601e
Merge pull request #11246 from k8s-infra-cherrypick-robot/cherry-pick-11161-to-release/2.0
[release/2.0] make sure console master tty is closed on task exit
2025-01-10 12:36:24 -08:00
Henry Wang
184ffad01f Add integ test to check tty leak
Signed-off-by: Henry Wang <henwang@amazon.com>
2025-01-10 16:38:20 +00:00
Henry Wang
17181ed33e fix master tty leak due to leaking init container object
Signed-off-by: Henry Wang <henwang@amazon.com>
2025-01-10 16:38:20 +00:00
Derek McGowan
1698a59589
Merge pull request #11242 from djdongjin/bump-otelttrpc-release-20
[release/2.0] Bump up otelttrpc to 0.1.0
2025-01-09 22:53:00 -07:00
Jin Dong
8666e74225 Bump up otelttrpc to 0.1.0
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2025-01-09 22:41:30 +00:00
Phil Estes
6f98bd9ed7
Merge pull request #11236 from k8s-infra-cherrypick-robot/cherry-pick-11229-to-release/2.0
[release/2.0] ctr: `ctr images import --all-platforms`: fix unpack
2025-01-09 11:51:40 -05:00
Samuel Karp
584ec48405
Merge pull request #11239 from k8s-infra-cherrypick-robot/cherry-pick-11230-to-release/2.0
[release/2.0] update runc binary to v1.2.4
2025-01-08 22:47:53 -08:00
Akhil Mohan
7373ddd70b update runc binary to v1.2.4
This is the fourth patch release of the 1.2.z release branch of runc. It
includes a fix for a regression introduced in 1.2.0 related to the
default device list.

- Re-add tun/tap devices to built-in allowed devices lists.

  In runc 1.2.0 we removed these devices from the default allow-list
(which were added seemingly by accident early in Docker's history) as
a precaution in order to try to reduce the attack surface of device
inodes available to most containers. At the time we thought
that the vast majority of users using tun/tap would already be
specifying what devices they need (such as by using --device with
Docker/Podman) as opposed to doing the mknod manually, and thus
there would've been no user-visible change.

  Unfortunately, it seems that this regressed a noticeable number of
users (and not all higher-level tools provide easy ways to specify
devices to allow) and so this change needed to be reverted. Users
that do not need these devices are recommended to explicitly disable
them by adding deny rules in their container configuration.

diff: https://github.com/opencontainers/runc/compare/v1.2.3...v1.2.4

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2025-01-09 02:44:11 +00:00
Akihiro Suda
c4270430db ctr: ctr images import --all-platforms: fix unpack
Fix issue 11228

`ctr images import --all-platforms` w/o `--local` was failing due to
`unable to initialize unpacker: no unpack platforms defined` error.

W/ `--local`, it unpacks the layers for the strict-default platform.

Now `ctr images import --all-platforms` w/o `--local` unpacks the layers
for the non-strict default platform.
This behavior still differs from `--local`.
i.e., on an arm64 host, arm/v{5,6,7} layers are unpacked too.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-01-09 02:26:18 +00:00
Phil Estes
ce560bb249
Merge pull request #11222 from k8s-infra-cherrypick-robot/cherry-pick-11220-to-release/2.0
[release/2.0] downgrade go-difflib and go-spew to tagged releases
2025-01-06 11:27:53 -05:00
Akihiro Suda
0d91d8e5e5
Merge pull request #11213 from pgimalac/pgimalac/containerd-no-plugin-v2.0
[release/2.0] Add a build tag to disable std `plugin` import
2025-01-06 21:44:10 +09:00
Sebastiaan van Stijn
f34147772b downgrade go-difflib and go-spew to tagged releases
These dependencies were updated to "master" in some modules we depend on,
but have no code-changes since their last release. Unfortunately, this also
causes a ripple effect, forcing all users of the containerd module to also
update these dependencies to an unrelease / un-tagged version.

Both these dependencies will unlikely do a new release in the near future,
so exclude these versions so that we can downgrade to the current release.

For additional details, see [this PR][1] and links mentioned in it.

[1]: https://github.com/kubernetes-sigs/kustomize/pull/5830#issuecomment-2569960859

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-06 08:35:14 +00:00
Pierre Gimalac
dca769485c
chore: add a build tag to disable containerd plugin import
Signed-off-by: Pierre Gimalac <pierre.gimalac@datadoghq.com>
2024-12-31 13:39:34 +01:00
Samuel Karp
fb61c901db
Merge pull request #11187 from k8s-infra-cherrypick-robot/cherry-pick-11185-to-release/2.0
[release/2.0] Update golangci to 1.60.3
2024-12-20 13:51:17 -08:00
Derek McGowan
5942b3fcba Update golangci to 1.60.3
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-12-20 19:27:06 +00:00
Derek McGowan
88aa2f531d
Merge pull request #11158 from dmcgowan/prepare-v2.0.1
[release/2.0] Prepare release notes for v2.0.1
2024-12-13 15:36:28 -08:00
Derek McGowan
b0ece5dc55
Prepare release notes for v2.0.1
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-12-13 13:54:03 -08:00
Maksym Pavlenko
e206c07edc
Merge pull request #11154 from k8s-infra-cherrypick-robot/cherry-pick-11122-to-release/2.0
[release/2.0] build(deps): bump actions/attest-build-provenance from 1.4.4 to 2.1.0
2024-12-13 11:41:59 -08:00
dependabot[bot]
fe69570849
build(deps): bump actions/attest-build-provenance from 1.4.4 to 2.1.0
Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 1.4.4 to 2.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](ef244123eb...7668571508)

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-12-13 10:09:20 -08:00
Derek McGowan
eb2d0c4762
Merge pull request #11153 from k8s-infra-cherrypick-robot/cherry-pick-11130-to-release/2.0
[release/2.0] update xx to v1.6.1 for compatibility with alpine 3.21 and file 5.46+
2024-12-13 09:58:31 -08:00
Sebastiaan van Stijn
eb2ce68829 update xx to v1.6.1 for compatibility with alpine 3.21 and file 5.46+
This fixes compatibility with alpine 3.21 and file 5.46+

- Fix additional possible `xx-cc`/`xx-cargo` compatibility issue with Alpine 3.21
- Support for Alpine 3.21
- Fix `xx-verify` with `file` 5.46+
- Fix possible error taking lock in `xx-apk` in latest Alpine without `coreutils`

full diff: https://github.com/tonistiigi/xx/compare/v1.2.1...v1.6.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-12 19:12:49 +00:00
Derek McGowan
c11f124500
Merge pull request #11139 from k8s-infra-cherrypick-robot/cherry-pick-11086-to-release/2.0
[release/2.0] ctr pull should unpack for default platform when transfer service is used
2024-12-12 11:05:34 -08:00
Derek McGowan
8c6dd50d91
Merge pull request #11151 from k8s-infra-cherrypick-robot/cherry-pick-11104-to-release/2.0
[release/2.0] internal/cri: should not apply IoOwner options if it's not user namespace
2024-12-12 11:05:10 -08:00
Phil Estes
e9004f0a88
Merge pull request #11146 from k8s-infra-cherrypick-robot/cherry-pick-11135-to-release/2.0
[release/2.0] Update go-cni for CNI STATUS
2024-12-12 10:12:54 -05:00
Phil Estes
c403b64231
Merge pull request #11140 from k8s-infra-cherrypick-robot/cherry-pick-11061-to-release/2.0
[release/2.0] Fix cri grpc plugin config migration
2024-12-12 10:12:27 -05:00
Phil Estes
d5a99f073f
Merge pull request #11142 from thaJeztah/2.0_backport_bump_runc_binary
[release/2.0 backport] update runc binary to v1.2.3
2024-12-12 10:11:53 -05:00
Wei Fu
018d83650f internal/cri: should not apply IoOwner options
When kubelet enables UserNamespaceSupport feature gate, kubelet always
uses non-empty UsernsOptions to setup pods. In this case, the gVisor shim is
unable to parse runc.Option so that it will be unable to start container.

This change is to avoid adding IoOwner options if the UsernsOptions is
for node level. Since gVisor hasn't feature subcommand yet, CRI status
will report that gVisor runtime doesn't support user namespace. So it's
kind of workaround to avoid compatible issue.

REF: #11091

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-12-12 14:49:29 +00:00
Michael Zappa
5eb7995a9a feat: update go-cni version for CNI STATUS
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
2024-12-11 20:50:33 +00:00
Sebastiaan van Stijn
a53eff53d9
update runc binary to v1.2.3
This is the third patch release of the 1.2.z release branch of runc. It
primarily fixes some minor regressions introduced in 1.2.0.

- Fixed a regression in use of securejoin.MkdirAll, where multiple
  runc processes racing to create the same mountpoint in a shared rootfs
  would result in spurious EEXIST errors. In particular, this regression
  caused issues with BuildKit.
- Fixed a regression in eBPF support for pre-5.6 kernels after upgrading
  Cilium's eBPF library version to 0.16 in runc.

full diff: https://github.com/opencontainers/runc/compare/v1.2.2...v1.2.3
release notes: https://github.com/opencontainers/runc/releases/tag/v1.2.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 981414521baf578a313c7b7af034ade6cb92b10d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 21:31:32 +01:00
Derek McGowan
a2302ea89f Add integration test for custom configuration
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-12-11 16:50:42 +00:00
Jin Dong
be5eda069f complete cri grpc config migration
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-12-11 16:50:42 +00:00
Jin Dong
44cdca68b5 ctr pull unpack for default platform using transfer service
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-12-11 16:50:34 +00:00
Samuel Karp
d93ae6232a
Merge pull request #11068 from k8s-infra-cherrypick-robot/cherry-pick-11062-to-release/2.0
[release/2.0] Update differ to handle zstd media types
2024-12-09 15:22:26 -08:00
Derek McGowan
154b692b2b
Merge pull request #11109 from k8s-infra-cherrypick-robot/cherry-pick-11102-to-release/2.0
[release/2.0] update to go1.23.4 / go1.22.10
2024-12-06 06:07:41 -08:00
Akihiro Suda
ed0b75c52b
Merge pull request #11110 from k8s-infra-cherrypick-robot/cherry-pick-10930-to-release/2.0
[release/2.0] CI: update Fedora to 41
2024-12-06 23:05:55 +09:00
Akihiro Suda
62b790bfac CI: update Fedora to 41
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-12-06 03:17:32 +00:00
Akhil Mohan
290e8bc704 update to go1.23.4 / go1.22.10
- go1.23.4 (released 2024-12-03) includes fixes to the compiler, the runtime,
the trace command, and the syscall package. See the Go 1.23.4 milestone on
our issue tracker for details.
https://github.com/golang/go/issues?q=milestone%3AGo1.23.4+label%3ACherryPickApproved

- go1.22.10 (released 2024-12-03) includes fixes to the runtime and the
syscall package. See the Go 1.22.10 milestone on our issue tracker for details.
https://github.com/golang/go/issues?q=milestone%3AGo1.22.10+label%3ACherryPickApproved

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-12-06 02:48:11 +00:00
Derek McGowan
1b7befc8dd
Merge pull request #11098 from k8s-infra-cherrypick-robot/cherry-pick-11069-to-release/2.0
[release/2.0] Fix panic due to nil dereference cgroups v2
2024-12-05 16:24:36 -08:00
Jin Dong
3ba2df924a fix panic due to nil dereference cgroups v2
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-12-05 01:53:43 +00:00
Derek McGowan
961cac9aa0
Merge pull request #11067 from austinvazquez/cherry-pick-3961dc9c8cb0e31925e45a2273bbdc06412be262-to-2.0
[release/2.0] Publish attestation as release artifact
2024-11-27 08:36:11 -08:00
Derek McGowan
73f57acb0d Update differ to handle zstd media types
The differ should be able to generate zstd compressed layers when
provided with the zstd media type.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-27 16:35:58 +00:00
Austin Vazquez
34a45cab2a
Publish attestation as release artifact
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
(cherry picked from commit 3961dc9c8cb0e31925e45a2273bbdc06412be262)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-11-26 19:47:08 -07:00
Derek McGowan
b4cab35e2b
Merge pull request #11053 from djdongjin/rocky-ci-fix-2.0
[release/2.0] Move rockylinux 9.4 to almalinux/9 in CI
2024-11-25 06:11:04 -08:00
Jin Dong
7dec6b4607 move rocky 9.4 to almalinux/9 in CI
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
(cherry picked from commit 288001f68c5fd34cfbdc7284f14375a3762b8ff4)
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-11-25 13:16:08 +00:00
Fu Wei
952ad6b3a6
Merge pull request #11035 from k8s-infra-cherrypick-robot/cherry-pick-10906-to-release/2.0
[release/2.0] *: should align pipe's owner with init process
2024-11-20 15:46:56 -08:00
Wei Fu
cf07f28ee2 *: should align pipe's owner with init process
The containerd-shim creates pipes and passes them to the init container as
stdin, stdout, and stderr for logging purposes. By default, these pipes are
owned by the root user (UID/GID: 0/0). The init container can access them
directly through inheritance.

However, if the init container attempts to open any files pointing to these
pipes (e.g., /proc/1/fd/2, /dev/stderr), it will encounter a permission issue
since it is not the owner. To avoid this, we need to align the ownership of
the pipes with the init process.

Fixes: #10598

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-11-20 18:01:26 +00:00
Derek McGowan
6e51f71621
Merge pull request #11031 from k8s-infra-cherrypick-robot/cherry-pick-10917-to-release/2.0
[release/2.0] fix: set the credentials even if not provided
2024-11-19 15:52:59 -08:00
Andrey Smirnov
9860888666 fix: set the credentials even if not provided
Fixes #10916

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-19 22:36:50 +00:00
Fu Wei
78795fa068
Merge pull request #10978 from austinvazquez/cherry-pick-pr-10972-to-2.0
[release/2.0] fsverity_test.go: fix nil pointer derefence, fix test fail, fix minor/major device numbers resolving
2024-11-19 10:43:47 -08:00
Akihiro Suda
376eb1d154
Merge pull request #11023 from austinvazquez/cherry-pick-runc-1.2.2-to-2.0
[release/2.0] update runc binary to 1.2.2
2024-11-19 14:32:26 +09:00
Austin Vazquez
9081e979f7
update runc binary to 1.2.2
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
(cherry picked from commit 9a7bc5423ef5f477705802e45c0b06869764caca)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-11-18 17:59:03 +00:00
Samuel Karp
30cbb03d49
Merge pull request #11009 from k8s-infra-cherrypick-robot/cherry-pick-11004-to-release/2.0
[release/2.0] Revert "Disable vagrant strict dependency checking"
2024-11-14 20:34:13 -08:00
Akhil Mohan
6399c936fa Revert "Disable vagrant strict dependency checking"
This reverts commit ae73e30130.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-11-15 03:41:44 +00:00
Fu Wei
da51d8ffd3
Merge pull request #11005 from k8s-infra-cherrypick-robot/cherry-pick-10981-to-release/2.0
[release/2.0] fsverity_linux.go: Fix fsverity.IsEnabled() for big endian systems
2024-11-14 15:48:50 -08:00
Alexey Lunev
a7f2b562f3 fsverity_linux.go: Fix fsverity.IsEnabled() for big endian systems
Signed-off-by: Alexey Lunev <cheembox573@gmail.com>
2024-11-14 17:34:00 +00:00
Phil Estes
abd8c4c39f
Merge pull request #10997 from dmcgowan/backport-2.0-typeurl
[release/2.0] bump github.com/containerd/typeurl/v2 from 2.2.2 to 2.2.3
2024-11-12 15:29:20 -07:00
dependabot[bot]
389e781ea1
build(deps): bump github.com/containerd/typeurl/v2 from 2.2.2 to 2.2.3
Bumps [github.com/containerd/typeurl/v2](https://github.com/containerd/typeurl) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/containerd/typeurl/releases)
- [Commits](https://github.com/containerd/typeurl/compare/v2.2.2...v2.2.3)

Signed-off-by: Derek McGowan <derek@mcg.dev>

---
updated-dependencies:
- dependency-name: github.com/containerd/typeurl/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 01c489141c37e27b71370ab26ab28347b17f4284)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-12 13:18:55 -08:00
Alexey Lunev
30b929ece7
fsverity_test.go: fix major/minor device number resolving
Signed-off-by: Alexey Lunev <cheembox573@gmail.com>
(cherry picked from commit f9537ae126fc2be685cc32d5c98b4189a72e02e9)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-11-09 10:27:46 -08:00
Alexey Lunev
10996a334b
fsverity_test.go: fix nil pointer dereference, fix test fail
Signed-off-by: Alexey Lunev <cheembox573@gmail.com>
(cherry picked from commit 8a8e50e6d7baf99ebe02e6ca04d9d842addcd36c)
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-11-09 10:27:26 -08:00
Maksym Pavlenko
e21cb92182
Merge pull request #10973 from k8s-infra-cherrypick-robot/cherry-pick-10970-to-release/2.0
[release/2.0] update to go1.23.3 / go1.22.9
2024-11-08 09:50:45 -08:00
Akhil Mohan
5b879f30c0 update to go1.23.3 / go1.22.9
- go1.23.3 (released 2024-11-06) includes fixes to the linker, the
runtime, and the net/http, os, and syscall packages. See the
Go 1.23.3 milestone on our issue tracker for details.

- go1.22.9 (released 2024-11-06) includes fixes to the linker. See
the Go 1.22.9 milestone on our issue tracker for details

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-11-08 09:04:33 +00:00
Maksym Pavlenko
aedb61c92a
Merge pull request #10963 from austinvazquez/enable-latest-release-on-2.0
[release/2.0] ci: enable marking 2.0 releases as latest
2024-11-07 15:46:34 -08:00
Mike Brown
124b718018
Merge pull request #10968 from dims/Avoid-arch-info-in-the-sed/replace-when-building-cri-cni-containerd.tar.gz-2.0
[release/2.0] Avoid arch info in the sed/replace when building cri-cni-containerd.tar.gz
2024-11-07 13:39:43 -06:00
Davanum Srinivas
e99c2b55c3
Avoid arch info in the sed/replace when building cri-cni-containerd.tar.gz
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-11-07 11:36:03 -05:00
Austin Vazquez
458215f6cf
ci: enable marking 2.0 releases as latest
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-11-07 15:09:45 +00:00
Derek McGowan
207ad711ea
Merge pull request #10939 from dmcgowan/prepare-v2.0.0
Prepare release notes for v2.0.0
2024-11-05 18:34:06 +00:00
Derek McGowan
03ba4ce1f7
Update release notes for v2.0.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-04 23:56:27 -08:00
Derek McGowan
f2da3fd688
Update release docs for v2.0.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-04 23:56:27 -08:00
Samuel Karp
6369206870
Merge pull request #10954 from dmcgowan/update-typeurl-2.2.2
Update typeurl to v2.2.2
2024-11-05 07:10:43 +00:00
Derek McGowan
ff09b428e1
Update typeurl to v2.2.2
Fixes panic when typeurl is not found

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-04 22:29:24 -08:00
Derek McGowan
18caa33fdc
Merge pull request #10944 from containerd/dependabot/github_actions/softprops/action-gh-release-2.0.9
build(deps): bump softprops/action-gh-release from 2.0.8 to 2.0.9
2024-11-04 21:12:32 -08:00
Derek McGowan
545605d5b4
Merge pull request #10945 from containerd/dependabot/github_actions/google-github-actions/auth-2.1.7
build(deps): bump google-github-actions/auth from 2.1.6 to 2.1.7
2024-11-04 21:12:07 -08:00
Derek McGowan
71c274bb81
Merge pull request #10947 from containerd/dependabot/go_modules/github.com/containerd/nri-0.8.0
build(deps): bump github.com/containerd/nri from 0.7.0 to 0.8.0
2024-11-04 20:35:15 -08:00
Derek McGowan
e841240997
Merge pull request #10946 from containerd/dependabot/go_modules/github.com/containerd/typeurl/v2-2.2.1
build(deps): bump github.com/containerd/typeurl/v2 from 2.2.0 to 2.2.1
2024-11-04 20:34:10 -08:00
Derek McGowan
9fe6f7c067
Merge pull request #10943 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.2.1
build(deps): bump google-github-actions/upload-cloud-storage from 2.2.0 to 2.2.1
2024-11-05 03:20:17 +00:00
dependabot[bot]
a43e7c1e2c
build(deps): bump softprops/action-gh-release from 2.0.8 to 2.0.9
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.8 to 2.0.9.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](c062e08bd5...e7a8f85e1c)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 03:20:13 +00:00
Akihiro Suda
3b976a156c
Merge pull request #10951 from AkihiroSuda/k8s-0.31.2
go.mod: k8s.io/* v0.31.2
2024-11-05 03:17:22 +00:00
dependabot[bot]
edf367cabd
build(deps): bump github.com/containerd/nri from 0.7.0 to 0.8.0
Bumps [github.com/containerd/nri](https://github.com/containerd/nri) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/containerd/nri/releases)
- [Changelog](https://github.com/containerd/nri/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/nri/compare/v0.7.0...v0.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 03:07:56 +00:00
dependabot[bot]
21f636751a
build(deps): bump github.com/containerd/typeurl/v2 from 2.2.0 to 2.2.1
Bumps [github.com/containerd/typeurl/v2](https://github.com/containerd/typeurl) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/containerd/typeurl/releases)
- [Commits](https://github.com/containerd/typeurl/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: github.com/containerd/typeurl/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 03:07:51 +00:00
Derek McGowan
37922afa33
Merge pull request #10942 from dmcgowan/update-platforms-v1-rc
Update platforms to v1.0.0-rc.0
2024-11-04 19:06:49 -08:00
dependabot[bot]
1edc2147fa
build(deps): bump google-github-actions/auth from 2.1.6 to 2.1.7
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.6 to 2.1.7.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](8254fb75a3...6fc4af4b14)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 01:26:56 +00:00
Akihiro Suda
2d8fec45a4
go.mod: k8s.io/* v0.31.2
No code change.

k8s.io/cri-api was accidentally updated to a non-stable version
v0.32.0-alpha.0 in PR 10552.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-11-05 10:06:10 +09:00
dependabot[bot]
bef201fe6b
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](e485962f2b...386ab77f37)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 00:55:30 +00:00
Derek McGowan
bd10a60965
Update platforms to v1.0.0-rc.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-04 16:51:16 -08:00
Derek McGowan
c4f797eaba
Merge pull request #10950 from dmcgowan/vagrant-fix-dep-failure
Disable vagrant strict dependency checking
2024-11-04 16:50:17 -08:00
Derek McGowan
ae73e30130
Disable vagrant strict dependency checking
Fixes broken vagrant builds

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-04 16:18:51 -08:00
Phil Estes
255d2a54d7
Merge pull request #10938 from dmcgowan/update-api-v1.8.0
Update containerd API to v1.8.0 release
2024-11-04 16:59:32 +00:00
Derek McGowan
33677d56dd
Update containerd API to v1.8.0 release
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-03 23:14:24 -08:00
Derek McGowan
cf36acf6b6
Merge pull request #10935 from dmcgowan/prepare-api-v1.8.0
Prepare release notes for api/v1.8.0
2024-11-04 05:25:19 +00:00
Akihiro Suda
c017828c02
Merge pull request #10877 from AkihiroSuda/runc-1.2.0
update runc binary to 1.2.1
2024-11-03 22:43:46 +00:00
Fu Wei
716445af3a
Merge pull request #10933 from dmcgowan/test-container-resilience
Make TestContainerPids more resilient
2024-11-03 20:58:24 +00:00
Akihiro Suda
b6d11788da
Merge pull request #10934 from dmcgowan/update-errdefs-1.0
Update errdefs to v1.0.0
2024-11-03 10:53:45 +00:00
Derek McGowan
481692a89d
Merge pull request #10926 from AkihiroSuda/docs-2.0
docs/containerd-2.0.md: add more highlights
2024-11-03 07:16:14 +00:00
Derek McGowan
d38911808a
Prepare release notes for api/v1.8.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-03 00:08:54 -07:00
Derek McGowan
93f9db2ad2
Update errdefs tag to v1.0.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-03 00:01:40 -07:00
Derek McGowan
bddeba8250
Make TestContainerPids more resilient
ListPids may not pick up the sh subprocess yet when it is first run. To
make this test more resilient, retry fetching the processes if only a
single pid is found for a short time.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-11-02 23:46:55 -07:00
Derek McGowan
ada2fa16d6
Merge pull request #10927 from AkihiroSuda/fix-removal-criv1alpha2
RELEASES.md: k8s: fix CRI v1alpha2 removal release, remove old releases
2024-11-02 06:25:38 +00:00
Samuel Karp
cb4ce9a878
Merge pull request #10886 from thaJeztah/fix_retry_logs
resolver/docker: fix confusing "trying next host" log
2024-11-01 23:03:55 +00:00
Akihiro Suda
edb980ac0f
update runc binary to 1.2.1
https://github.com/opencontainers/runc/releases/tag/v1.2.0
https://github.com/opencontainers/runc/releases/tag/v1.2.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-11-02 07:34:02 +09:00
Akihiro Suda
bf47b6ebc9
docs/containerd-2.0.md: add more highlights
- CRI support for user namespaces (PR 8803)
- CRI support for recursive read-only mounts (PR 9787)
- CDI is now enabled by default (PR 9621)

Co-authored-by: Samuel Karp <me@samuelkarp.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-11-02 06:27:18 +09:00
Akihiro Suda
f5ce859ee2
docs/containerd-2.0.md: fix the deprecation release of AUFS
AUFS was deprecated in v1.5, not in v1.7.
See PR 5433

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-11-02 06:19:04 +09:00
Akihiro Suda
bedd85a36c
RELEASES.md: k8s: fix CRI v1alpha2 removal release, remove old releases
* CRI v1alpha2 was removed in v1.26, not in v1.27
  https://github.com/kubernetes/kubernetes/blob/v1.26.0/CHANGELOG/CHANGELOG-1.26.md?plain=1#L482

* Kubernetes releases prior to v1.29 have already reached their EOL:
  https://kubernetes.io/releases/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-11-02 05:51:20 +09:00
Maksym Pavlenko
92b46e1c28
Merge pull request #10919 from thaJeztah/snapshot_logs_structured
services/snapshots: include name of snapshotter in debug logs
2024-11-01 18:30:53 +00:00
Samuel Karp
b6f435835d
Merge pull request #10907 from AkihiroSuda/fix-10905
config: v1Migrate: support DisabledPlugins and RequiredPlugins
2024-10-31 23:20:10 +00:00
Sebastiaan van Stijn
4594f5cac1
services/snapshots: include name of snapshotter in debug logs
- combine consecutive "WithField" calls to "WithFields", as multiple
  calls is known to be expensive.
- include a "snapshotter" field in logs to allow correlating actions
  with specific snapshotters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-31 18:00:38 +01:00
Phil Estes
29ecab63c8
Merge pull request #10918 from kiashok/update-hcsshim-0.12.9
Update hcsshim to v0.12.9
2024-10-30 15:41:36 +00:00
Kirtana Ashok
77d783e2ce Update hcsshim to v0.12.9
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-10-30 07:22:06 -07:00
Maksym Pavlenko
3358f57a77
Merge pull request #10911 from containerd/dependabot/github_actions/github/codeql-action-3.27.0
build(deps): bump github/codeql-action from 3.26.13 to 3.27.0
2024-10-30 00:21:44 +00:00
Maksym Pavlenko
bfcab7be79
Merge pull request #10910 from containerd/dependabot/github_actions/actions/checkout-4.2.2
build(deps): bump actions/checkout from 4.2.1 to 4.2.2
2024-10-30 00:20:43 +00:00
dependabot[bot]
79089232b4
build(deps): bump actions/checkout from 4.2.1 to 4.2.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](eef61447b9...11bd71901b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-29 17:05:49 +00:00
Phil Estes
d257459d50
Merge pull request #10912 from containerd/dependabot/github_actions/actions/cache-4.1.2
build(deps): bump actions/cache from 4.1.1 to 4.1.2
2024-10-29 16:28:34 +00:00
dependabot[bot]
2789ba30ee
build(deps): bump actions/cache from 4.1.1 to 4.1.2
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](3624ceb22c...6849a64899)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 23:51:06 +00:00
dependabot[bot]
6b655d0931
build(deps): bump github/codeql-action from 3.26.13 to 3.27.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.13 to 3.27.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f779452ac5...662472033e)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 23:51:01 +00:00
Akihiro Suda
9ed6e05b23
config: v1Migrate: support DisabledPlugins and RequiredPlugins
Fix issue 10905

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-29 06:51:55 +09:00
Akihiro Suda
4b2bca00b8
config: migrate version before merging
Prior to this commit, `/etc/containerd/config.toml` with no version
was parsed as version 3.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-29 06:51:55 +09:00
Akihiro Suda
1e6fdb531b
Merge pull request #10894 from tonistiigi/fix-readonly-contentstore
local: avoid writing to content root on readonly store
2024-10-28 19:28:20 +00:00
Derek McGowan
b831e3a55c
Merge pull request #10904 from AkihiroSuda/imgcrypt-v2
go.mod: github.com/containerd/imgcrypt v2.0.0-rc-1
2024-10-28 18:18:38 +00:00
Phil Estes
e69a299b5c
Merge pull request #10901 from containerd/dependabot/go_modules/github.com/containerd/continuity-0.4.4
build(deps): bump github.com/containerd/continuity from 0.4.3 to 0.4.4
2024-10-28 16:39:06 +00:00
Phil Estes
0d59b84387
Merge pull request #10900 from containerd/dependabot/go_modules/github.com/checkpoint-restore/checkpointctl-1.3.0
build(deps): bump github.com/checkpoint-restore/checkpointctl from 1.2.1 to 1.3.0
2024-10-28 16:38:30 +00:00
Akihiro Suda
0208cb58ca
go.mod: github.com/containerd/imgcrypt v2.0.0-rc-1
https://github.com/containerd/imgcrypt/compare/v1.2.0-rc1...v2.0.0-rc.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-29 01:21:57 +09:00
Akihiro Suda
588b7a100a
testutil: avoid conflict with continuity/testutil
```
=== FAIL: core/metadata  (0.00s)
/tmp/go-build142702247/b1061/metadata.test flag redefined: test.root
panic: /tmp/go-build142702247/b1061/metadata.test flag redefined: test.root

goroutine 1 [running]:
flag.(*FlagSet).Var(0xc0000d6000, {0x132a040, 0x190f3f3}, {0x11b4291, 0x9}, {0x11c7690, 0x1e})
	/opt/hostedtoolcache/go/1.23.2/x64/src/flag/flag.go:1028 +0x54d
flag.BoolVar(...)
	/opt/hostedtoolcache/go/1.23.2/x64/src/flag/flag.go:755
github.com/containerd/containerd/v2/pkg/testutil.init.0()
	/home/runner/work/containerd/containerd/pkg/testutil/helpers.go:36 +0x6b
FAIL	github.com/containerd/containerd/v2/core/metadata	0.028s
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-28 11:58:28 +09:00
dependabot[bot]
181491032d
build(deps): bump github.com/containerd/continuity from 0.4.3 to 0.4.4
Bumps [github.com/containerd/continuity](https://github.com/containerd/continuity) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/containerd/continuity/releases)
- [Commits](https://github.com/containerd/continuity/compare/v0.4.3...v0.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 11:57:48 +09:00
Akihiro Suda
a96eee7b1b
Merge pull request #10899 from thaJeztah/fix_godoc_typo
pkg/protobuf: fix typo in godoc
2024-10-28 09:51:15 +09:00
dependabot[bot]
497dc7bf39
build(deps): bump github.com/checkpoint-restore/checkpointctl
Bumps [github.com/checkpoint-restore/checkpointctl](https://github.com/checkpoint-restore/checkpointctl) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/checkpoint-restore/checkpointctl/releases)
- [Commits](https://github.com/checkpoint-restore/checkpointctl/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/checkpoint-restore/checkpointctl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 00:48:07 +00:00
Sebastiaan van Stijn
fddeb6f3cb
pkg/protobuf: fix typo in godoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-26 14:18:53 +02:00
Sebastiaan van Stijn
700b90618d
resolver/docker: fix confusing "trying next host" log
The resolver uses some log messages to indicate the next host will be used,
however it would print this message even if no next host was available
to try.

This patch changes the log messages to indicate the action taken, which is
either "fetch failed" or if there's no other hosts to try, "trying next host".

While updating, also slightly updated the logs for consistency.

Before this patch:

    DEBU[2024-10-23T20:49:29.640581097Z] resolving                                     host=registry-1.docker.io spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6
    DEBU[2024-10-23T20:49:29.640632763Z] do request                                    host=registry-1.docker.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent="docker/27.3.1 go/go1.22.7 git-commit/41ca978 kernel/6.10.11-linuxkit os/linux arch/arm64 containerd-client/1.7.22+unknown storage-driver/overlayfs UpstreamClient(Docker-Client/27.3.1 \\(linux\\))" request.method=HEAD spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6 url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T20:49:29.979613013Z] fetch response received                       host=registry-1.docker.io response.header.content-length=162 response.header.content-type=application/json response.header.date="Wed, 23 Oct 2024 20:49:29 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.docker-ratelimit-source=94.210.180.92 response.header.strict-transport-security="max-age=31536000" response.header.www-authenticate="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\"" response.status="401 Unauthorized" spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6 url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T20:49:29.979907138Z] Unauthorized                                  header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\"" host=registry-1.docker.io spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6
    DEBU[2024-10-23T20:49:29.980038430Z] do request                                    host=registry-1.docker.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent="docker/27.3.1 go/go1.22.7 git-commit/41ca978 kernel/6.10.11-linuxkit os/linux arch/arm64 containerd-client/1.7.22+unknown storage-driver/overlayfs UpstreamClient(Docker-Client/27.3.1 \\(linux\\))" request.method=HEAD spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6 url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T20:49:30.466825972Z] fetch response received                       host=registry-1.docker.io response.header.content-length=162 response.header.content-type=application/json response.header.date="Wed, 23 Oct 2024 20:49:30 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.docker-ratelimit-source=94.210.180.92 response.header.strict-transport-security="max-age=31536000" response.header.www-authenticate="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\",error=\"insufficient_scope\"" response.status="401 Unauthorized" spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6 url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T20:49:30.467056055Z] Unauthorized                                  header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\",error=\"insufficient_scope\"" host=registry-1.docker.io spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6
    INFO[2024-10-23T20:49:30.467273305Z] trying next host                              error="pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed" host=registry-1.docker.io spanID=6e2b9c871009cfd9 traceID=6c65b97879548fce4372faa8375d17e6

With this patch:

    DEBU[2024-10-23T21:17:53.487428843Z] resolving                                     host=registry-1.docker.io spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db
    DEBU[2024-10-23T21:17:53.487498968Z] do request                                    host=registry-1.docker.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent="docker/dev go/go1.22.8 git-commit/06c2ba1fa02626e242dc8dfe888f022bcd247c52 kernel/6.10.11-linuxkit os/linux arch/arm64 containerd-client/1.7.22+unknown storage-driver/overlayfs UpstreamClient(Docker-Client/27.3.1 \\(darwin\\))" request.method=HEAD spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T21:17:53.832270052Z] fetch response received                       host=registry-1.docker.io response.header.content-length=162 response.header.content-type=application/json response.header.date="Wed, 23 Oct 2024 21:17:53 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.docker-ratelimit-source=94.210.180.92 response.header.strict-transport-security="max-age=31536000" response.header.www-authenticate="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\"" response.status="401 Unauthorized" spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T21:17:53.832843177Z] Unauthorized                                  header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\"" host=registry-1.docker.io spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db
    DEBU[2024-10-23T21:17:53.833364760Z] do request                                    host=registry-1.docker.io request.header.accept="application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*" request.header.user-agent="docker/dev go/go1.22.8 git-commit/06c2ba1fa02626e242dc8dfe888f022bcd247c52 kernel/6.10.11-linuxkit os/linux arch/arm64 containerd-client/1.7.22+unknown storage-driver/overlayfs UpstreamClient(Docker-Client/27.3.1 \\(darwin\\))" request.method=HEAD spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T21:17:54.345483219Z] fetch response received                       host=registry-1.docker.io response.header.content-length=162 response.header.content-type=application/json response.header.date="Wed, 23 Oct 2024 21:17:54 GMT" response.header.docker-distribution-api-version=registry/2.0 response.header.docker-ratelimit-source=4203339e-74c0-11e4-bea4-0242ac11001b response.header.strict-transport-security="max-age=31536000" response.header.www-authenticate="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\",error=\"insufficient_scope\"" response.status="401 Unauthorized" spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db url="https://registry-1.docker.io/v2/library/nosuchimage/manifests/latest"
    DEBU[2024-10-23T21:17:54.345601386Z] Unauthorized                                  header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\",scope=\"repository:library/nosuchimage:pull\",error=\"insufficient_scope\"" host=registry-1.docker.io spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db
    INFO[2024-10-23T21:17:54.345801761Z] fetch failed                                  error="pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed" host=registry-1.docker.io spanID=4a74f71b08243447 traceID=fc1177ef212d33617c883842b9b9b8db

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-26 14:16:00 +02:00
Akihiro Suda
cf86af6fcd
Merge pull request #10896 from dmcgowan/update-plugin-1.0.0
Update containerd plugin to v1.0.0
2024-10-25 22:44:29 +09:00
Derek McGowan
96a1e498fc
Update containerd plugin to v1.0.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-25 06:08:01 -07:00
Akihiro Suda
80e93b5694
Merge pull request #10895 from dmcgowan/update-ttrpc-v1.2.6
Update ttrpc to v1.2.6 tag
2024-10-25 14:28:27 +09:00
Derek McGowan
3b45a44ccc
Update to ttrpc v1.2.6 tag
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-24 21:58:18 -07:00
Tonis Tiigi
3cc2343de0
local: avoid writing to content root on readonly store
A contentstore can be created on top of readonly path and
should not fail unless there is an attempt to write into it.

Currently this fails because new ingest directory is created
always, meaning for example that you can't create a store to
read blobs from OCI layout without it contaminating the OCI
layout files.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-10-24 18:03:09 -07:00
Mike Brown
5a2da171fb
Merge pull request #10793 from arkinmodi/fix-docs-execute-specific-test
Update sample `go test` commands in BUILDING.md
2024-10-24 17:25:00 +00:00
Derek McGowan
cf49b3dfb0
Merge pull request #10892 from AkihiroSuda/fix-10889
Add back ZFS snapshotter
2024-10-24 17:02:55 +00:00
Akihiro Suda
778defa31f
Add back ZFS snapshotter
Fix issue 10889

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-25 00:10:20 +09:00
Derek McGowan
8c98e18a91
Merge pull request #10867 from namespacelabs/main
Lock store writer per digest and writer.
2024-10-24 13:55:07 +00:00
Phil Estes
3a89e2e1ce
Merge pull request #10883 from AkihiroSuda/crun
CI: move crun from Ubuntu to Fedora
2024-10-24 13:23:23 +00:00
Akihiro Suda
d3ff3e2ff5
CI: move crun from Ubuntu to Fedora
crun is usually used on Fedora, RHEL, and similar distros.
So it makes more sense to run crun tests on Fedora.

Ubuntu jobs are removed, because inflating the number of the jobs will result
in making the flakiness rate much worse.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-24 17:56:08 +09:00
Akihiro Suda
b70cce2085
Merge pull request #10887 from dmcgowan/prepare-v2.0.0-rc.6
Prepare release notes for v2.0.0-rc.6
2024-10-24 00:23:41 +00:00
Derek McGowan
5c65a3d7b0
Update version to v2.0.0-rc.6
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-23 16:47:24 -07:00
Derek McGowan
9aa637b22d
Update api vendor to latest
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-23 16:47:20 -07:00
Samuel Karp
574f0daa3e
Merge pull request #10884 from samuelkarp/nri-0.7.0
deps: bump github.com/containerd/nri
2024-10-23 21:57:45 +00:00
Samuel Karp
4b9d6c0144
deps: bump github.com/containerd/nri
Fixes https://github.com/containerd/nri/issues/117

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-10-23 13:55:29 -07:00
Maksym Pavlenko
651757761f
Merge pull request #10864 from djdongjin/dedup-cri-util
Deduplicate some cri util functions
2024-10-23 20:24:38 +00:00
Niklas Gehlen
2535b187a6
Scope writer locks to each writer.
Signed-off-by: Niklas Gehlen <niklas@namespacelabs.com>
2024-10-23 20:40:08 +02:00
Akihiro Suda
deccefc8cf
Merge pull request #9982 from rayburgemeestre/merge-toml-configurations-for-plugins
Allow sections of Plugins to be merged, and not overwritten as entire sections.
2024-10-23 04:32:49 +00:00
Akihiro Suda
e370f0e31c
Merge pull request #10882 from samuelkarp/containerd-2.0-guide
docs: add command for finding schema 1 images
2024-10-23 13:32:26 +09:00
Samuel Karp
bc819bc97a
docs: add command for finding schema 1 images
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-10-22 20:44:51 -07:00
Derek McGowan
18654db80a
Merge pull request #10881 from samuelkarp/containerd-2.0-guide
docs: update min version for deprecation warnings
2024-10-23 01:37:27 +00:00
Samuel Karp
c86b2772ce
docs: update min version for deprecation warnings
While some warnings were available in earlier versions, the first
"complete" implementation was in 1.7.12 and 1.6.27.

https://github.com/containerd/containerd/issues/9312 tracks that initial
set of warnings.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-10-22 15:57:26 -07:00
Akihiro Suda
1d98bad427
Merge pull request #10872 from containerd/dependabot/github_actions/azure/CLI-2.1.0
build(deps): bump azure/CLI from 1.0.9 to 2.1.0
2024-10-23 01:09:18 +09:00
Akihiro Suda
1992917779
Merge pull request #10870 from containerd/dependabot/github_actions/actions/upload-artifact-4.4.3
build(deps): bump actions/upload-artifact from 4.1.0 to 4.4.3
2024-10-22 14:54:58 +00:00
Derek McGowan
7663dba25f
Merge pull request #10869 from containerd/dependabot/github_actions/github/codeql-action-3.26.13
build(deps): bump github/codeql-action from 3.24.0 to 3.26.13
2024-10-22 13:52:09 +00:00
Mike Brown
ce3acc4692
Merge pull request #10878 from AkihiroSuda/crun-1.17
CI: bump up crun to 1.17
2024-10-22 13:44:16 +00:00
Derek McGowan
8d641dde78
Merge pull request #10871 from containerd/dependabot/github_actions/actions/checkout-4.2.1
build(deps): bump actions/checkout from 4.1.1 to 4.2.1
2024-10-22 13:12:33 +00:00
Derek McGowan
d69e74696e
Merge pull request #10874 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.20.5
build(deps): bump github.com/prometheus/client_golang from 1.20.4 to 1.20.5
2024-10-22 13:10:10 +00:00
Derek McGowan
6e85807366
Merge pull request #10876 from containerd/dependabot/go_modules/github.com/opencontainers/selinux-1.11.1
build(deps): bump github.com/opencontainers/selinux from 1.11.0 to 1.11.1
2024-10-22 13:08:17 +00:00
Akihiro Suda
3d6f2a09cd
Merge pull request #10866 from kiashok/update-hcsshim-0.12.8
Update hcsshim version to v0.12.8
2024-10-22 20:00:40 +09:00
Akihiro Suda
a1ce18816d
CI: bump up crun to 1.17
https://github.com/containers/crun/releases/tag/1.17

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-22 19:56:25 +09:00
Kirtana Ashok
0218959859 Update hcsshim version to v0.12.8
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-10-22 02:43:29 -07:00
dependabot[bot]
373311a849
build(deps): bump github.com/opencontainers/selinux
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.11.0...v1.11.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 23:16:01 +00:00
dependabot[bot]
cf9cf8b5ad
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.4 to 1.20.5.
- [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.20.4...v1.20.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 23:15:41 +00:00
dependabot[bot]
03860c208e
build(deps): bump azure/CLI from 1.0.9 to 2.1.0
Bumps [azure/CLI](https://github.com/azure/cli) from 1.0.9 to 2.1.0.
- [Release notes](https://github.com/azure/cli/releases)
- [Changelog](https://github.com/Azure/cli/blob/master/ReleaseProcess.md)
- [Commits](4db43908b9...089eac9d8c)

---
updated-dependencies:
- dependency-name: azure/CLI
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 23:08:08 +00:00
dependabot[bot]
cf7218fb07
build(deps): bump actions/checkout from 4.1.1 to 4.2.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.2.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.1...eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 23:08:00 +00:00
dependabot[bot]
78ec6ef026
build(deps): bump actions/upload-artifact from 4.1.0 to 4.4.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.1.0 to 4.4.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4.1.0...b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 23:07:56 +00:00
dependabot[bot]
bfe8fa3309
build(deps): bump github/codeql-action from 3.24.0 to 3.26.13
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.26.13.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3.24.0...f779452ac5af1c261dce0346a8f964149f49322b)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 23:07:51 +00:00
Jin Dong
38ba7f2f7e dedup BuildLabels
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-10-21 13:23:25 -04:00
Jin Dong
a5cd0d0a5c dedup GetPassthroughAnnotations
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-10-21 11:35:00 -04:00
Akihiro Suda
bc3ce87c84
Merge pull request #10856 from dmcgowan/update-errdefs-0.3.0
Update errdefs to 0.3.0
2024-10-21 15:31:11 +00:00
Jin Dong
269997ac5a dedup GetRepoDigestAndTag
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-10-21 11:24:31 -04:00
Jin Dong
f61dbc2d02 dedup ParseImageReferences
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-10-21 11:17:09 -04:00
Ray Burgemeestre
530db2e8d1 Introduce two additional unit tests for two runtimes and pod annotations.
Signed-off-by: Ray Burgemeestre <rayb@nvidia.com>
2024-10-21 16:25:41 +02:00
Ray Burgemeestre
a21e379b69 Allow sections of Plugins to be merged, and not overwritten as entire sections.
See for rationale the Pull Request description. Added unit test to
demonstrate the difference of this change.

Signed-off-by: Ray Burgemeestre <rayb@nvidia.com>
2024-10-21 16:25:41 +02:00
Derek McGowan
2f24aa00a5
Update errdefs to 0.3.0
Uses the new github.com/containerd/errdefs/pkg module which is intended
to hold less stable utility functions separately from the stable
github.com/containerd/errdefs error types.

Includes temporary update to hcsshim until a release is cut there

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-10-18 16:04:54 -07:00
Derek McGowan
b291eb802b
Merge pull request #10854 from austinvazquez/update-tracing-docs-for-containerd-2.0
Update tracing docs for containerd 2.0
2024-10-18 15:38:20 +00:00
Austin Vazquez
92d327af17
Update tracing docs for containerd 2.0
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-18 14:50:05 +00:00
Akihiro Suda
d4cabf7179
Merge pull request #10852 from austinvazquez/update-nri-doc-for-2.0
Update NRI documentation for containerd 2.0
2024-10-18 12:12:40 +09:00
Akihiro Suda
ffdbac04c1
Merge pull request #10850 from samuelkarp/containerd-2.0-guide
containerd 2.0 guide: add image verifier plugins
2024-10-18 02:27:42 +00:00
Austin Vazquez
943b196ad6
Update NRI documentation for containerd 2.0
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-17 23:33:04 +00:00
Samuel Karp
963c216048
Merge pull request #10741 from mbaynton/userns-allow-setgroups
Allow `setgroups` in user namespaces
2024-10-17 21:35:59 +00:00
Samuel Karp
a6ceb4be0d
containerd 2.0 guide: add image verifier plugins
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-10-17 14:10:29 -07:00
Mike Baynton
347423a114 Request 'allow' setgroups when spawning new userns
Signed-off-by: Mike Baynton <mike@mbaynton.com>
2024-10-17 15:37:36 -05:00
Derek McGowan
ce265ff955
Merge pull request #10798 from benjaminp/patch-1
Add After=dbus.service to containerd.service
2024-10-17 18:23:17 +00:00
Derek McGowan
ec30475b2f
Merge pull request #10849 from austinvazquez/align-containerd-2.0-doc-links
Format link text in containerd 2.0 doc for readability
2024-10-17 11:54:49 -07:00
Austin Vazquez
249dd74744
Format link text in containerd 2.0 doc for readability
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-17 17:11:13 +00:00
Benjamin Peterson
18e4ea9a6c Add After=dbus.service to containerd.service
containerd launches runc, which communicates via dbus with systemd to start transient units. Thus, containerd should have an `After` dependency on `dbus.service` to prevent dbus from being shut down concurrently with containerd.

Signed-off-by: Benjamin Peterson <benjamin@engflow.com>
2024-10-17 07:47:55 -07:00
Phil Estes
baf4a98631
Merge pull request #10845 from AkihiroSuda/docs-2.0-2
Update `docs/containerd-2.0.md`
2024-10-17 13:53:13 +00:00
Akihiro Suda
7c7c3cfce0
Merge pull request #10833 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.11
build(deps): bump github.com/klauspost/compress from 1.17.10 to 1.17.11
2024-10-17 12:09:07 +00:00
Akihiro Suda
72e4db74d6
Merge pull request #9882 from abel-von/sandbox-controller-v2
sandbox: make podsandbox controller plugin type of PodSandboxPlugin
2024-10-17 10:34:38 +00:00
Akihiro Suda
3eea3536f1
docs/containerd-2.0.md: mention the removal of cri-containerd-*.tar.gz
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-17 19:17:34 +09:00
Akihiro Suda
f8d50f6e81
README.md: put a link to docs/containerd-2.0.md
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-17 19:13:20 +09:00
Akihiro Suda
6c386c343d
Merge pull request #10656 from djdongjin/remove-cri-SandboxInfo-RuntimeHandler
Remove deprecated cri SandboxInfo RuntimeHandler
2024-10-17 05:23:12 +00:00
Akihiro Suda
3a6e5fcb11
Merge pull request #10832 from containerd/dependabot/go_modules/github.com/urfave/cli/v2-2.27.5
build(deps): bump github.com/urfave/cli/v2 from 2.27.4 to 2.27.5
2024-10-17 01:30:17 +00:00
Derek McGowan
fff2236f49
Merge pull request #10769 from klihub/devel/update-nri
Update NRI to latest.
2024-10-16 23:38:34 +00:00
Samuel Karp
3bc51c43c0
Merge pull request #10696 from austinvazquez/add-containerd-2.0-doc
Add containerd 2.0 doc
2024-10-16 22:33:15 +00:00
Austin Vazquez
b724b9f231
Add containerd 2.0 doc
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-16 17:53:38 +00:00
Phil Estes
0abada6251
Merge pull request #10839 from matteopulcini6/sandbox-deferring-teardown-main
Handle teardown failure to avoid blocking cleanup
2024-10-16 15:54:56 +00:00
Phil Estes
d1245c6faf
Merge pull request #10815 from Iceber/unmarshal-metrics-to-type
metrics: Use UnmarshalTo instead of UnmarshalAny
2024-10-16 13:50:24 +00:00
Phil Estes
dac94198b1
Merge pull request #10829 from containerd/dependabot/github_actions/lycheeverse/lychee-action-2.0.2
build(deps): bump lycheeverse/lychee-action from 1.10.0 to 2.0.2
2024-10-16 13:48:06 +00:00
Abel Feng
fc5086a74d cri: remove sandbox controller from client
cri will call sandbox controller from the sandboxService, remove the
dependency of client.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-10-16 17:37:07 +08:00
Abel Feng
e4df672ab8 sandbox: add sandbox controller v2
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-10-16 17:37:05 +08:00
dependabot[bot]
4f2bc1580b
build(deps): bump lycheeverse/lychee-action from 1.10.0 to 2.0.2
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.10.0 to 2.0.2.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.10.0...v2.0.2)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-16 07:55:51 +00:00
Krisztian Litkey
4bd3a71dd6
go.{mod,sum}: update NRI deps and re-vendor.
Update NRI dependencies to point to the latest main/HEAD.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-10-16 10:27:57 +03:00
Samuel Karp
37943cf6e4
Merge pull request #10840 from step-security-bot/stepsecurity_remediation_1729057981
[StepSecurity] ci: Harden GitHub Actions
2024-10-16 07:15:54 +00:00
StepSecurity Bot
bff82e1968
[StepSecurity] ci: Harden GitHub Actions
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-10-16 05:53:03 +00:00
dependabot[bot]
5eb0be9941
build(deps): bump github.com/urfave/cli/v2 from 2.27.4 to 2.27.5
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.4 to 2.27.5.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.4...v2.27.5)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-16 01:28:56 +00:00
Akihiro Suda
8b41368e7b
Merge pull request #10830 from containerd/dependabot/go_modules/otel-11b303cab5
build(deps): bump the otel group with 8 updates
2024-10-16 00:50:56 +00:00
Matteo Pulcini
0742238cd6 Handle teardown failure to avoid blocking cleanup
Signed-off-by: Matteo Pulcini <Matteo.Pulcini@ibm.com>
2024-10-15 15:35:20 -07:00
dependabot[bot]
c3d84a87fb
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.55.0` | `0.56.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.55.0` | `0.56.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.30.0` | `1.31.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.30.0` | `1.31.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.30.0` | `1.31.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.30.0` | `1.31.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.30.0` | `1.31.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.30.0` | `1.31.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.55.0 to 0.56.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.55.0...zpages/v0.56.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.55.0 to 0.56.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.55.0...zpages/v0.56.0)

Updates `go.opentelemetry.io/otel` from 1.30.0 to 1.31.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...v1.31.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.30.0 to 1.31.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...v1.31.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.30.0 to 1.31.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...v1.31.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.30.0 to 1.31.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...v1.31.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.30.0 to 1.31.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...v1.31.0)

Updates `go.opentelemetry.io/otel/trace` from 1.30.0 to 1.31.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-15 22:17:42 +00:00
dependabot[bot]
bfe59daae8
build(deps): bump github.com/klauspost/compress from 1.17.10 to 1.17.11
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.10 to 1.17.11.
- [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.10...v1.17.11)

---
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-10-15 22:16:11 +00:00
Fu Wei
5d49f2e3ae
Merge pull request #10838 from samuelkarp/revert-runc-1.1.15
Revert "update runc binary to 1.1.15"
2024-10-15 20:45:12 +00:00
Fu Wei
36ae5f94b9
Merge pull request #10721 from rata/issue-10704
Fix data loss in rootfs overlayfs when unmount of tmp dirs fail with idmap mounts
2024-10-15 20:44:46 +00:00
Samuel Karp
b7c333ce24
Revert "update runc binary to 1.1.15"
This reverts commit f0f1bfca07.

runc 1.1.15 appears to have incresed chances for causing OOMs for
containers with small memory limits.  Revert the change in containerd
to unblock CI while the upstream runc issue is resolved.

Dependency-issue: https://github.com/opencontainers/runc/issues/4427
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-10-15 09:28:04 -07:00
Iceber Gu
c6d089090c metrics: Use UnmarshalTo instead of UnmarshalAny
Co-authored-by: Sam Lockart <sam.lockart@zendesk.com>
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2024-10-12 15:55:27 +08:00
Akihiro Suda
61f91b963e
Merge pull request #10817 from AkihiroSuda/fix-10816
CI: fix vagrant
2024-10-12 13:57:42 +09:00
Akihiro Suda
1db0064c6a
CI: install OVMF for Vagrant
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-12 05:19:09 +09:00
Akihiro Suda
4d02217b5e
CI: fix "Unable to find a source package for vagrant" error
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-12 05:19:08 +09:00
Akihiro Suda
38beeb359a
Revert "use vagrant from jammy in noble"
This reverts commit 1bfdccee09.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-12 05:19:08 +09:00
Akihiro Suda
e2daa20ed5
Revert "use older version of OVMF package"
This reverts commit c25183ff19.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-10-12 05:19:08 +09:00
Akihiro Suda
08037e7624
Merge pull request #10821 from estesp/switch-arm-runners
Switch from actuated.dev to GH Action runners for arm64
2024-10-12 05:18:59 +09:00
Phil Estes
ee921689f7
Switch from actuated.dev to GH Action runners for arm64
Signed-off-by: Phil Estes <estesp@amazon.com>
2024-10-11 13:30:43 -04:00
Akihiro Suda
ce7c473ccc
Merge pull request #10788 from containerd/dependabot/go_modules/golang-x-fce5e8e0ff
build(deps): bump golang.org/x/sys from 0.25.0 to 0.26.0 in the golang-x group
2024-10-09 04:58:35 +00:00
dependabot[bot]
f89ed3c628
build(deps): bump golang.org/x/sys in the golang-x group
Bumps the golang-x group with 1 update: [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/sys` from 0.25.0 to 0.26.0
- [Commits](https://github.com/golang/sys/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-09 03:54:23 +00:00
Akihiro Suda
2483108676
Merge pull request #10791 from containerd/dependabot/go_modules/google.golang.org/grpc-1.67.1
build(deps): bump google.golang.org/grpc from 1.67.0 to 1.67.1
2024-10-09 03:19:53 +00:00
dependabot[bot]
428df99db2
build(deps): bump google.golang.org/grpc from 1.67.0 to 1.67.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.0 to 1.67.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.67.0...v1.67.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 09:24:24 +00:00
Akihiro Suda
6c4102f944
Merge pull request #10790 from containerd/dependabot/go_modules/google.golang.org/protobuf-1.35.1
build(deps): bump google.golang.org/protobuf from 1.34.2 to 1.35.1
2024-10-08 08:42:38 +00:00
Akihiro Suda
179b8d9b3c
Merge pull request #10772 from austinvazquez/update-golang-1.23.2
update to go1.23.2,go1.22.8
2024-10-08 06:41:34 +00:00
Samuel Karp
ce648b5c89
Merge pull request #10787 from samuelkarp/runc-1.1.15
update runc binary to 1.1.15
2024-10-08 03:45:13 +00:00
Arkin Modi
72126a984c update sample go test commands
Signed-off-by: Arkin Modi <Arkin.Modi@ibm.com>
2024-10-07 20:41:24 -04:00
dependabot[bot]
9c42dd959a
build(deps): bump google.golang.org/protobuf from 1.34.2 to 1.35.1
Bumps google.golang.org/protobuf from 1.34.2 to 1.35.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 23:32:15 +00:00
Samuel Karp
f0f1bfca07
update runc binary to 1.1.15
diff: https://github.com/opencontainers/runc/compare/v1.1.14...v1.1.15

Release notes:

- The -ENOSYS seccomp stub is now always generated for the native
  architecture that runc is running on. This is needed to work around some
  arguably specification-incompliant behaviour from Docker on architectures
  such as ppc64le, where the allowed architecture list is set to null. This
  ensures that we always generate at least one -ENOSYS stub for the native
  architecture even with these weird configs. (#4391)
- On a system with older kernel, reading /proc/self/mountinfo may skip some
  entries, as a consequence runc may not properly set mount propagation,
  causing container mounts leak onto the host mount namespace. (#2404, #4425)
- In order to fix performance issues in the "lightweight" bindfd protection
  against [CVE-2019-5736], the temporary ro bind-mount of /proc/self/exe
  has been removed. runc now creates a binary copy in all cases. (#4392, #2532)

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-10-07 15:41:26 -07:00
Austin Vazquez
46f5a0d939
update to go1.23.2,go1.22.8
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-07 15:09:53 +00:00
Phil Estes
8701137695
Merge pull request #10777 from coolljt0725/fix_typo
core/runtime: Fix a typo in error message
2024-10-07 13:02:57 +00:00
Phil Estes
d2565d4bb3
Merge pull request #10781 from austinvazquez/upgrade-macos-runner-image
Update runner images to macOS13
2024-10-07 12:52:07 +00:00
Austin Vazquez
7b18098513
Update runner images to macOS13
This change upgrades the runner images in CI to macOS 13. macOS 12
runners are being deprecated.

See https://github.com/actions/runner-images/issues/10721 for more
information.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-10-07 01:31:05 +00:00
Lei Jitang
e479431e0d core/runtime: Fix a typo in error message
`boostrap.json` should be `bootstrap.json`

Signed-off-by: Lei Jitang <leijitang@outlook.com>
2024-10-05 18:33:12 +08:00
Phil Estes
59ffbf4ce3
Merge pull request #10761 from cpuguy83/shim_remove_nethttp
More shim imports cleanup
2024-10-03 14:56:25 +00:00
Derek McGowan
f1c70e83ae
Merge pull request #9470 from lengrongfu/feat/add-e2e-for-systemdcgroup
add use systemd cgroup e2e
2024-10-03 13:13:44 +00:00
Brian Goff
b85909cd4c shim: Move pprof server to plugin
Makes the pprof server a plugin and also gates by the `shim_tracing`
build tag (like otel is).
With this change, `net/http` is no longer a dependency in the shim.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-03 00:12:50 +00:00
Brian Goff
b2681dfbdb shim: Move ttrpc interceptors to plugins
This makes it so we don't need to import otelttrpc unless the shim is
compiled with the `shim_tracing` build tag.
This way otel is no longer compiled into the binary at all unless
`shim_tracing` is set.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-03 00:12:47 +00:00
Samuel Karp
e1006c0869
Merge pull request #10723 from saketjajoo/3787-race-condition-fix
Fix the race condition during GC of snapshots when client retries
2024-10-02 23:32:24 +00:00
Maksym Pavlenko
9c23fd71ed
Merge pull request #10760 from GabyCT/topic/runctrap
script/setup/install-runc: Add trap statement to clean up tmp files
2024-10-02 23:26:10 +00:00
Saket Jajoo
d7f83034c2
Fix the race condition during GC of snapshots when client retries
When an upstream client (e.g. kubelet) stops or restarts, the CRI
connection to the containerd gets interrupted which is treated as a
cancellation of context which subsequently cancels an ongoing operation,
including an image pull. This generally gets followed by containerd's
GC routine that tries to delete the prepared snapshots for the image
layer(s) corresponding to the image in the pull operation that got
cancelled. However, if the upstream client immediately retries (or
starts a new) image pull operation, containerd initiates a new image
pull and starts unpacking the image layers into snapshots. This may
create a race condition: the GC routine (corresponding to the failed
image pull operation) trying to clean up the same snapshot that the new
image pull operation is preparing, thus leading to the "parent snapshot
does not exist: not found" error.

Race Condition Scenario:
Assume an image consisting of 2 layers (L1 and L2, L1 being the bottom
layer) that are supposed to get unpacked into snapshots S1 and S2
respectively.

During an image pull operation, containerd unpacks(L1) which involves
Stat()'ing the chainID. This Stat() fails as the chainID does not
exist and Prepare(L1) gets called. Once S1 gets prepared, containerd
processes L2 - unpack(L2) which again involves Stat()'ing the chainID
which fails as the chainID for S2 does not exist which results in the
call to Prepare(L2). However, if the image pull operation gets
cancelled before Prepare(L2) is called, then the GC routine tries to
clean up S1.

When the image pull operation is retried by the upstream client,
containerd follows the same series of operations. unpack(L1) gets
called which then calls Stat(chainID) for L1. However, this time,
Stat(L1) succedes as S1 already exists (from the previous image pull
operation) and thus containerd goes to the next iteration to
unpack(L2). Now, GC cleans up S1 and when Prepare(L2) gets called, it
returns back the "parent snapshot does not exist: not found" error.

Fix:
Removing the "Stat() + early return" fixes the race condition. Now
during the image pull operation corresponding to the client retry,
although the chainID (for L1) already exists, containerd does not
return early and goes on to Prepare(L1). Since L1 is already prepared,
it adds a new lease to S1 and then returns `ErrAlreadyExists`. This
new lease prevents GC from cleaning up S1 when containerd processes
L2 (unpack(L2) -> Prepare(L2)).

Fixes: https://github.com/containerd/containerd/issues/3787

Signed-off-by: Saket Jajoo <saketjajoo@google.com>
2024-10-02 22:10:15 +00:00
Gabriela Cervantes
24fe444eb6 script/setup/install-runc: Add trap statement to clean up tmp files
This PR adds the trap statement in the install runc script to clean
up the temporary files and ensure we are not leaving them.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2024-10-02 19:52:02 +00:00
Brian Goff
6ffdabf725 Makefile: fix shim tags overwritten
Go taks multiple `--tags` as overwriting the previously set ones,
which is not what we want.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-02 19:17:56 +00:00
Maksym Pavlenko
01ca26f209
Merge pull request #10757 from cpuguy83/shim_deps
Clean up some dependency trees for runc shim
2024-10-02 16:39:23 +00:00
lengrongfu
095131abf9 add use systemd cgroup e2e
Signed-off-by: lengrongfu <lenronfu@gmail.com>
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
2024-10-03 00:37:29 +08:00
Derek McGowan
06dfa0c2f1
Merge pull request #10754 from containerd/dependabot/go_modules/github.com/intel/goresctrl-0.8.0
build(deps): bump github.com/intel/goresctrl from 0.7.0 to 0.8.0
2024-10-02 13:53:44 +00:00
Derek McGowan
4d65025d92
Merge pull request #10725 from kiashok/update-hcsshim-0.12.7
Update hcsshim to v0.12.7
2024-10-02 13:52:16 +00:00
Brian Goff
2123855eeb Add build tag to omit grpc
This is needed so we can build the runc shim without grpc as a
transative dependency.
With this change the runc shim binary went from 14MB to 11MB.
The RSS from an idle shim went from about 17MB to 14MB (back around
where it was in in 1.7).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-02 01:50:48 +00:00
Brian Goff
64d29ebe5b snapshots: core: Remove dependency on api types
Core should not have a dependency on API types.
This was causing a transative dependency on grpc when importing the core
snapshots package.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-02 01:46:19 +00:00
Brian Goff
11ffba3dc4 shim: Do not depend on pkg/oci
pkg/oci is a general utility package with dependency chains that are
uneccessary for the shim.
The shim only actually used it for a convenience function for reading
an oci spec file.
Instead of pulling in those deps just re-implement that internally in
the shim command.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-10-01 21:04:58 +00:00
Derek McGowan
05ee43a5fd
Merge pull request #10752 from dmcgowan/prepare-v2.0.0-rc.5
Prepare release notes for v2.0.0-rc.5
2024-10-01 15:20:19 +00:00
Kirtana Ashok
0d4e606bbc Update hcsshim to v0.12.7
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-09-30 17:38:28 -07:00
dependabot[bot]
78e39f7c5b
build(deps): bump github.com/intel/goresctrl from 0.7.0 to 0.8.0
Bumps [github.com/intel/goresctrl](https://github.com/intel/goresctrl) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/intel/goresctrl/releases)
- [Commits](https://github.com/intel/goresctrl/compare/v0.7.0...v0.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 23:56:42 +00:00
Maksym Pavlenko
03e0e4c02f
Merge pull request #10186 from cpuguy83/propagate_traces_to_shim
Propagate trace contexts to shims
2024-09-30 23:21:57 +00:00
Brian Goff
17d4a1357e Propagate trace contexts to shims
This adds trace context propagation over the grpc/ttrpc calls to a shim.

It also adds the otlp plugin to the runc shim so that it will send
traces to the configured tracer (which is inherited from containerd's
config).
It doesn't look like this is adding any real overhead to the runc shim's
memory usage, however it does add 2MB to the binary size.
As such this is gated by a build tag `shim_tracing`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-09-30 21:44:16 +00:00
Maksym Pavlenko
03db11c3f2
Merge pull request #10744 from sameersaeed/sandbox-cni-plugins
Add check for CNI plugins before tearing down pod network
2024-09-30 15:23:58 +00:00
Derek McGowan
bc4646067d
Prepare release notes for v2.0.0-rc.5
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-09-30 07:13:14 -07:00
Fu Wei
363e50bee0
Merge pull request #10747 from lujinda/anno-image-user-specified
[cri] use 'UserSpecifiedImage' to set the image-name annotation
2024-09-30 04:47:30 +00:00
jinda.ljd
ccb2a8d747 [cri] use 'UserSpecifiedImage' to set the image-name annotation
However, when an image has multiple tags, the image originally obtained may not be the one actually specified by the user.
Starting from cri-api v0.28.0, a UserSpecifiedImage field is added to ImageSpec.
It is more appropriate to use UserSpecifiedImage.

Signed-off-by: jinda.ljd <jinda.ljd@alibaba-inc.com>
2024-09-30 08:38:17 +08:00
Maksym Pavlenko
86e0f52e17
Merge pull request #10740 from zouyee/event
Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG
2024-09-28 00:11:16 +00:00
Sameer
b7b6b324b8 Add check for CNI plugins before tearing down pod network
Signed-off-by: Sameer <sameer.saeed@live.ca>
2024-09-27 16:12:03 -04:00
Maksym Pavlenko
db97449598
Merge pull request #10730 from mxpv/features
Move features section to a separate file
2024-09-27 14:42:50 +00:00
zouyee
b5290726d2 Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG
Signed-off-by: zouyee <zouyee1989@gmail.com>
2024-09-27 16:50:00 +08:00
Maksym Pavlenko
3df2cc1a6b
Merge pull request #10717 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.10
build(deps): bump github.com/klauspost/compress from 1.17.9 to 1.17.10
2024-09-26 22:33:43 +00:00
Maksym Pavlenko
146a977f92
Move features section to a separate file
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-09-26 15:32:16 -07:00
Maksym Pavlenko
0dc66dab71
Merge pull request #10718 from containerd/dependabot/go_modules/google.golang.org/grpc-1.67.0
build(deps): bump google.golang.org/grpc from 1.66.2 to 1.67.0
2024-09-26 20:06:54 +00:00
Maksym Pavlenko
83fe5264e7
Merge pull request #10719 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.20.4
build(deps): bump github.com/prometheus/client_golang from 1.20.3 to 1.20.4
2024-09-26 20:06:39 +00:00
Rodrigo Campos
30f2893351 core/mount: Only remove dirs if unmount succeeded
The detached mount is less likely to fail in our case, but if we see any
failure to unmount, we should just skip the removal of directories.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-09-24 17:45:34 +02:00
Rodrigo Campos
f8d84ecf92 core/mount: Prevent accidental removal of rootfs files
Using os.RemoveAll() is quite risky, as if the unmount failed and we
can delete files from the container rootfs. In fact, we were doing just
that.

Let's use os.Remove() to make sure we only deleted empty dirs.

Big kudos to @mbaynton for reporting this issue with lot of details,
nailing it down to containerd lines of code and showing all the log
lines to understand the big picture.

Fixes: #10704

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-09-24 17:45:34 +02:00
Rodrigo Campos
004f3951d5 core/mount: Use MNT_DETACH for umount of tmp layers
Overlayfs needs to do an idmap mount of each layer and the cleanup
function just unmounts and deletes the directories. However, when the
resource is busy, the umount fails.

Let's make the unmount detached so the unmount will eventually be done
when it's not busy anymore. Also, making it detached solves the issues with
the unmount failing because it is busy.

Big kudos to @mbaynton for reporting this issue with lot of details,
nailing it down to containerd lines of code and showing all the log
lines to understand the big picture.

Fixes: #10704

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-09-24 17:34:52 +02:00
dependabot[bot]
f7ca91fa39
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4.
- [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.20.3...v1.20.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-23 23:18:45 +00:00
dependabot[bot]
c75178d931
build(deps): bump google.golang.org/grpc from 1.66.2 to 1.67.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.66.2 to 1.67.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.66.2...v1.67.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-09-23 23:18:36 +00:00
dependabot[bot]
519cbda1d8
build(deps): bump github.com/klauspost/compress from 1.17.9 to 1.17.10
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.9 to 1.17.10.
- [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.9...v1.17.10)

---
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-09-23 23:18:27 +00:00
Samuel Karp
2ca3ff8725
Merge pull request #10713 from wzshiming/enable-selinux-on-cri-test
Enable the selinux on cri test
2024-09-23 17:44:05 +00:00
Fu Wei
906c23218c
Merge pull request #10307 from henry118/uidmap
Support multiple uid/gid mappings [1/2]
2024-09-23 12:25:05 +00:00
Shiming Zhang
d72051036a Enable the selinux on cri test
Signed-off-by: Shiming Zhang <wzshiming@hotmail.com>
2024-09-21 16:22:25 +08:00
Akihiro Suda
a448047386
Merge pull request #10699 from containerd/dependabot/go_modules/k8s-82433053af
build(deps): bump the k8s group with 4 updates
2024-09-19 22:57:49 +00:00
dependabot[bot]
b03a3c5a21
build(deps): bump the k8s group with 4 updates
Bumps the k8s group with 4 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go), [k8s.io/component-base](https://github.com/kubernetes/component-base) and [k8s.io/kubelet](https://github.com/kubernetes/kubelet).


Updates `k8s.io/apimachinery` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.31.0...v0.31.1)

Updates `k8s.io/client-go` from 0.31.0 to 0.31.1
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.31.0...v0.31.1)

Updates `k8s.io/component-base` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/component-base/compare/v0.31.0...v0.31.1)

Updates `k8s.io/kubelet` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/kubelet/compare/v0.31.0...v0.31.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/kubelet
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-19 17:25:38 +00:00
Maksym Pavlenko
ff67a67d72
Merge pull request #10700 from containerd/dependabot/go_modules/otel-910e354cca
build(deps): bump the otel group with 8 updates
2024-09-19 16:45:26 +00:00
Akihiro Suda
8c64a2f6a1
Merge pull request #10607 from fuweid/pin-userns
internal/cri: simplify netns setup with pinned userns
2024-09-19 01:05:41 +00:00
dependabot[bot]
017efe05a2
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.54.0` | `0.55.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.54.0` | `0.55.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.29.0` | `1.30.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.29.0` | `1.30.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.29.0` | `1.30.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.29.0` | `1.30.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.29.0` | `1.30.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.29.0` | `1.30.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.54.0 to 0.55.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.54.0...zpages/v0.55.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.54.0 to 0.55.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.54.0...zpages/v0.55.0)

Updates `go.opentelemetry.io/otel` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...v1.30.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...v1.30.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...v1.30.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...v1.30.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...v1.30.0)

Updates `go.opentelemetry.io/otel/trace` from 1.29.0 to 1.30.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.29.0...v1.30.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-18 08:30:25 +00:00
Akihiro Suda
67b06872e7
Merge pull request #10695 from containerd/dependabot/go_modules/golang-x-cf6e4563c3
build(deps): bump golang.org/x/mod from 0.20.0 to 0.21.0 in the golang-x group across 1 directory
2024-09-18 07:48:38 +00:00
Maksym Pavlenko
4bdaebb9c8
Merge pull request #10701 from containerd/dependabot/go_modules/google.golang.org/grpc-1.66.2
build(deps): bump google.golang.org/grpc from 1.65.0 to 1.66.2
2024-09-17 22:38:13 +00:00
dependabot[bot]
7c89148a1c
build(deps): bump google.golang.org/grpc from 1.65.0 to 1.66.2
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.65.0 to 1.66.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.65.0...v1.66.2)

---
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-09-16 23:16:37 +00:00
dependabot[bot]
6e2c4d00dc
build(deps): bump golang.org/x/mod
Bumps the golang-x group with 1 update in the / directory: [golang.org/x/mod](https://github.com/golang/mod).


Updates `golang.org/x/mod` from 0.20.0 to 0.21.0
- [Commits](https://github.com/golang/mod/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:12:29 +00:00
Maksym Pavlenko
15dd956915
Merge pull request #10687 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.20.3
build(deps): bump github.com/prometheus/client_golang from 1.20.2 to 1.20.3
2024-09-12 19:34:57 +00:00
Phil Estes
ee9d950bdc
Merge pull request #10688 from containerd/dependabot/go_modules/github.com/checkpoint-restore/go-criu/v7-7.2.0
build(deps): bump github.com/checkpoint-restore/go-criu/v7 from 7.1.0 to 7.2.0
2024-09-12 19:05:37 +00:00
Wei Fu
ee0ed75d64 internal/cri: simplify netns setup with pinned userns
Motivation:

For pod-level user namespaces, it's impossible to force the container runtime
to join an existing network namespace after creating a new user namespace.

According to the capabilities section in [user_namespaces(7)][1], a network
namespace created by containerd is owned by the root user namespace. When the
container runtime (like runc or crun) creates a new user namespace, it becomes
a child of the root user namespace. Processes within this child user namespace
are not permitted to access resources owned by the parent user namespace.

If the network namespace is not owned by the new user namespace, the container
runtime will fail to mount /sys due to the [sysfs: Restrict mounting sysfs][2]
patch.

Referencing the [cap_capable][3] function in Linux, a process can access a
resource if:

* The resource is owned by the process's user namespace, and the process has
the required capability.

* The resource is owned by a child of the process's user namespace, and the
owner's user namespace was created by the process's UID.

In the context of pod-level user namespaces, the CRI plugin delegates the
creation of the network namespace to the container runtime when running the
pause container. After the pause container is initialized, the CRI plugin pins
the pause container's network namespace into `/run/netns` and then executes
the `CNI_ADD` command over it.

However, if the pause container is terminated during the pinning process, the
CRI plugin might encounter a PID cycle, leading to the `CNI_ADD` command
operating on an incorrect network namespace.

Moreover, rolling back the `RunPodSandbox` API is complex due to the delegation
of network namespace creation. As highlighted in issue #10363, the CRI plugin
can lose IP information after a containerd restart, making it challenging to
maintain robustness in the RunPodSandbox API.

Solution:

Allow containerd to create a new user namespace and then create the network
namespace within that user namespace. This way, the CRI plugin can force the
container runtime to join both the user namespace and the network namespace.
Since the network namespace is owned by the newly created user namespace,
the container runtime will have the necessary permissions to mount `/sys` on
the container's root filesystem. As a result, delegation of network namespace
creation is no longer needed.

NOTE:

* The CRI plugin does not need to pin the newly created user namespace as it
does with the network namespace, because the kernel allows retrieving a user
namespace reference via [ioctl_ns(2)][4]. As a result, the podsandbox
implementation can obtain the user namespace using the `netnsPath` parameter.

[1]: <https://man7.org/linux/man-pages/man7/user_namespaces.7.html>
[2]: <7dc5dbc879>
[3]: <2c85ebc57b/security/commoncap.c (L65)>
[4]: <https://man7.org/linux/man-pages/man2/ioctl_ns.2.html>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-09-11 07:21:43 +08:00
Wei Fu
fd3f3d5a13 pkg/sys: add GetUsernsForNamespace interface
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-09-11 07:21:43 +08:00
Wei Fu
490e45a08a pkg/sys: Add UnshareAfterEnterUserns function
It allows to disassociate parts of its execution context within a user
namespace.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-09-11 07:21:39 +08:00
Henry Wang
83aaa89b61 update ctr run to support multiple uid/gid mappings
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-09-10 17:06:27 +00:00
dependabot[bot]
1dedcb7841
build(deps): bump github.com/checkpoint-restore/go-criu/v7
Bumps [github.com/checkpoint-restore/go-criu/v7](https://github.com/checkpoint-restore/go-criu) from 7.1.0 to 7.2.0.
- [Release notes](https://github.com/checkpoint-restore/go-criu/releases)
- [Commits](https://github.com/checkpoint-restore/go-criu/compare/v7.1.0...v7.2.0)

---
updated-dependencies:
- dependency-name: github.com/checkpoint-restore/go-criu/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 23:33:48 +00:00
dependabot[bot]
7599d4df27
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.2 to 1.20.3.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.3/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.2...v1.20.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 23:33:36 +00:00
Maksym Pavlenko
19430264c1
Merge pull request #10678 from thaJeztah/update_go_1.23.1
update to go1.23.1, go1.22.7
2024-09-08 01:27:56 +00:00
Sebastiaan van Stijn
9037069da8
update to go1.23.1, go1.22.7
- https://github.com/golang/go/issues?q=milestone%3AGo1.23.1+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.0...go1.23.1

These minor releases include 3 security fixes following the security policy:

- go/parser: stack exhaustion in all Parse* functions

    Calling any of the Parse functions on Go source code which contains
    deeply nested literals can cause a panic due to stack exhaustion.

    This is CVE-2024-34155 and Go issue https://go.dev/issue/69138.

- encoding/gob: stack exhaustion in Decoder.Decode

    Calling Decoder.Decode on a message which contains deeply nested
    structures can cause a panic due to stack exhaustion.

    This is a follow-up to CVE-2022-30635.

    Thanks to Md Sakib Anwar of The Ohio State University for reporting
    this issue.

    This is CVE-2024-34156 and Go issue https://go.dev/issue/69139.

- go/build/constraint: stack exhaustion in Parse

    Calling Parse on a "// +build" build tag line with deeply nested
    expressions can cause a panic due to stack exhaustion.

    This is CVE-2024-34158 and Go issue https://go.dev/issue/69141.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.23.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-06 16:12:28 +02:00
Davanum Srinivas
e013322eed
Merge pull request #10649 from samuelkarp/shim-exec-fp-test
integration: regression test for issue 10589
2024-09-06 11:29:27 +00:00
Samuel Karp
18725f010b
integration: regression test for issue 10589
This issue was caused by a race between init exits and new exec process
tracking inside the shim. The test operates by controlling the time
between when the shim invokes "runc exec" and when the actual "runc
exec" is triggered. This allows validating that races for shim state
tracking between pre- and post-start of the exec process do not exist.

Relates to https://github.com/containerd/containerd/issues/10589

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-09-05 16:17:09 -07:00
Samuel Karp
5f37a2c205
fifosync: cross-process synchronization
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-09-05 12:48:28 -07:00
Samuel Karp
c8b095f3c2
Merge pull request #10651 from laurazard/shim-refactor-without-pending
runc-shim: fix races/prevent init exits from being dropped
2024-09-05 19:10:42 +00:00
Phil Estes
192679b059
Merge pull request #10659 from djdongjin/remove-duplicated-sandbox-conversion
Remove duplicated sandbox <-> proto conversion functions
2024-09-05 14:57:17 +00:00
Laura Brehm
421a4b568c
runc-shim: handle pending execs as running
This commit rewrites and simplifies a lot of this logic to reduce it's
complexity, and also handle the case where the container doesn't have
it's own pid-namespace, which means that we're not guaranteed to receive
the init exit last.

This is achieved by replacing `s.pendingExecs` with `s.runningExecs`,
for which both (previously) pending and de facto running execs are
considered.

The new exit handling logic can be summed up by:
- when we receive an init exit, stash it it in `s.containerInitExit`,
  and if a container's init process has exited, refuse new execs.
- (if the container does not have it's own pidns) kill all running
  processes (if the container has a private pid-namespace, then all
  processes will be dead already).
- wait for the container's running exec count (which includes execs
  which have been started but might still early exit) to get to 0.
- publish the stashed away init exit.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-09-04 11:47:12 +01:00
Maksym Pavlenko
26b48a6b7a
Merge pull request #10594 from AkihiroSuda/cri-remove-disableCgroup
CRI: remove `disable_cgroup`
2024-09-03 18:25:42 +00:00
Maksym Pavlenko
4b28e29266
Merge pull request #10657 from djdongjin/reduce-ptypes-Empty-creation
Avoid repeated ptypes.Empty creation by predefining it as a var
2024-09-03 18:22:43 +00:00
Akihiro Suda
0a29a8c945
Merge pull request #10637 from containerd/dependabot/go_modules/otel-68f2b63f9a
build(deps): bump the otel group with 8 updates
2024-09-03 18:04:10 +00:00
Akihiro Suda
ef1316efc1
Merge pull request #10642 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.2.0
build(deps): bump google-github-actions/upload-cloud-storage from 2.1.3 to 2.2.0
2024-09-03 16:24:15 +00:00
Phil Estes
e90b022415
Merge pull request #10665 from akhilerm/update-runc-1.1.14
update runc binary to 1.1.14
2024-09-03 13:15:48 +00:00
Akhil Mohan
299a9717fe
update runc binary to 1.1.14
diff: https://github.com/opencontainers/runc/compare/v1.1.13...v1.1.14

Release Notes:

- Fix CVE-2024-45310, a low-severity attack that allowed
  maliciously configured containers to create empty files and directories on
  the host.
- Add support for Go 1.23.
- Revert "allow overriding VERSION value in Makefile" and add EXTRA_VERSION.
- rootfs: consolidate mountpoint creation logic.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-09-03 10:15:17 +05:30
Akihiro Suda
cae19b14f3
Merge pull request #10658 from darwin-containers/reorganize-mount-unmount
Reorganize mount/unmount code so it is easier to add Darwin-specific implementation
2024-09-03 01:51:24 +00:00
Derek McGowan
58aa92d1c1
Merge pull request #10663 from ErikJiang/bump_crun_1.16
Bump crun to 1.16.1
2024-09-02 23:37:33 +00:00
dependabot[bot]
f4529ace1b
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.53.0` | `0.54.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.53.0` | `0.54.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.28.0` | `1.29.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.28.0` | `1.29.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.28.0` | `1.29.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.28.0` | `1.29.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.28.0` | `1.29.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.28.0` | `1.29.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.53.0 to 0.54.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.53.0...zpages/v0.54.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.53.0 to 0.54.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.53.0...zpages/v0.54.0)

Updates `go.opentelemetry.io/otel` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...v1.29.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...v1.29.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...v1.29.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...v1.29.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...v1.29.0)

Updates `go.opentelemetry.io/otel/trace` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...v1.29.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-02 23:16:11 +00:00
Cory Snider
e7357916bb
runc-shim: refuse to start execs after init exits
The runc task state machine prevents execs from being created after the
init process has exited, but there are no guards against starting a
created exec after the init process has exited. That leaves a small
window for starting an exec to race our handling of the init process
exiting. Normally this is not an issue in practice: the kernel will
atomically kill all processes in a PID namespace when its "init" process
terminates, and will not allow new processes to fork(2) into the PID
namespace afterwards. Therefore the racing exec is guaranteed by the
kernel to not be running after the init process terminates. On the other
hand, when the container does not have a private PID namespace (i.e. the
container's init process is not the "init" process of the container's
PID namespace), the kernel does not automatically kill other container
processes on init exit and will happily allow runc to start an exec
process at any time. It is the runc shim's responsibility to clean up
the container when the init process exits in this situation by killing
all the container's remaining processes. Block execs from being started
after the container's init process has exited to prevent the processes
from leaking, and to avoid violating the task service's assumption that
an exec can be running iff the init process is also running.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2024-09-02 10:43:53 +01:00
bo.jiang
def477b07f Bump crun to 1.16
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-09-02 16:46:20 +08:00
Jin Dong
3d7955bf78 remove duplicated descriptor from/to proto
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-31 12:01:33 -07:00
Jin Dong
93d6f0f921 remove duplicated sandbox to proto func
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-31 11:20:32 -07:00
Akihiro Suda
26d6fd0c3f
Merge pull request #10611 from fuweid/getridof-hall-of-shame
core/mount: use ptrace instead of go:linkname
2024-08-30 17:07:33 +00:00
Marat Radchenko
bfc1465a2c Reorganize mount/unmount code so it is easier to add Darwin-specific implementation
After these changes, in order to add Darwin bind-mount implementation, one only needs:
* Adjust HasBindMounts definition in mount.go
* Provide implementation in mount_darwin.go

There was no consensus on adding dependency on bindfs, that seems to be the only working solution for bind-mounts on Darwin as of today, in https://github.com/containerd/containerd/pull/8789, that's why the actual implementation is not added in current PR.

As a bonus, Linux FUSE-related code was moved to a separate file and possibly could be reused on FreeBSD, though this needs testing.

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2024-08-30 15:25:06 +03:00
Jin Dong
9c34005724 reduce ptypes.Empty creation by defining it in as a var
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-29 17:27:47 -07:00
Jin Dong
6f43197c25 Remove cri SandboxInfo RuntimeHandler
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-29 15:50:14 -07:00
Derek McGowan
dacde84372
Merge pull request #10652 from jsturtevant/fix-nano-calculation
Cumulative stats can't decrease
2024-08-29 18:09:25 +00:00
Phil Estes
17a7538f5d
Merge pull request #10597 from kolyshkin/pidfd
TestNewBinaryIOCleanup: fix a comment, minor rewrite
2024-08-29 17:30:03 +00:00
Laura Brehm
7f3bf993d6
runc-shim: remove misleading comment
It's not true that `s.mu` needs to be held when calling
`handleProcessExit`, and indeed hasn't been the case for a
while – see 892dc54bd2.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-08-29 13:04:22 +01:00
James Sturtevant
f6677a4ec5
Cumulative stats can't decrease
During removal of the container a stat value might be reported as zero; in this case the caluclation could end up with an extremely large number.  If the cumulative stat decreases report zero.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-08-28 23:23:30 +00:00
Kir Kolyshkin
94c163209d TestNewBinaryIOCleanup: fix a comment, minor rewrite
The main reason is to improve the comment about pidfd in Go 1.23+.

While at it:
 - avoid slice manipulation as we only need count;
 - avoid repeating "/proc/self/fd".

Updates: #10345.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-08-27 23:15:05 -07:00
Akihiro Suda
283149df7d
Merge pull request #10640 from containerd/dependabot/go_modules/github.com/vishvananda/netlink-1.3.0
build(deps): bump github.com/vishvananda/netlink from 1.2.1-beta.2 to 1.3.0
2024-08-27 19:52:07 +00:00
Maksym Pavlenko
0027f817e3
Merge pull request #10644 from djdongjin/improve-gc-tricolor
Improve gc tricolor by avoiding revisiting nodes
2024-08-27 19:48:50 +00:00
Maksym Pavlenko
1d576d1512
Merge pull request #10641 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.20.2
build(deps): bump github.com/prometheus/client_golang from 1.20.1 to 1.20.2
2024-08-27 19:48:16 +00:00
Derek McGowan
fa5bf66fdf
Merge pull request #10643 from dmcgowan/prepare-v2.0.0-rc.4
Prepare release notes for  v2.0.0-rc.4
2024-08-27 16:33:52 +00:00
Jin Dong
d83184ced1 avoid repeated calls in Tricolor gc
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-26 23:35:24 -07:00
Jin Dong
6b97a08eee add benchmark
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-26 23:35:04 -07:00
dependabot[bot]
1b03ca57c4
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.1 to 1.20.2.
- [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.20.1...v1.20.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 01:41:00 +00:00
dependabot[bot]
9906fac59a
build(deps): bump github.com/vishvananda/netlink
Bumps [github.com/vishvananda/netlink](https://github.com/vishvananda/netlink) from 1.2.1-beta.2 to 1.3.0.
- [Release notes](https://github.com/vishvananda/netlink/releases)
- [Commits](https://github.com/vishvananda/netlink/compare/v1.2.1-beta.2...v1.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 01:40:56 +00:00
Phil Estes
9aa8de8e2c
Merge pull request #10638 from containerd/dependabot/go_modules/go.etcd.io/bbolt-1.3.11
build(deps): bump go.etcd.io/bbolt from 1.3.10 to 1.3.11
2024-08-27 01:05:53 +00:00
Phil Estes
38a2095a2c
Merge pull request #10639 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.2.3
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.3
2024-08-27 01:04:29 +00:00
Derek McGowan
cdbfcc2572
Prepare release notes for v2.0.0-rc.4
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-08-26 17:36:06 -07:00
Derek McGowan
4ba502a036
Update api vendor to latest tag
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-08-26 17:36:06 -07:00
Derek McGowan
a36d38fb4a
Add mailmap entry for Michael Zappa
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-08-26 17:36:06 -07:00
dependabot[bot]
bf5fc240b1
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.1.3...v2.2.0)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-27 00:02:05 +00:00
dependabot[bot]
faaafd6de3
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.3
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.2...v2.2.3)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 23:54:54 +00:00
dependabot[bot]
47350982bf
build(deps): bump go.etcd.io/bbolt from 1.3.10 to 1.3.11
Bumps [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt) from 1.3.10 to 1.3.11.
- [Release notes](https://github.com/etcd-io/bbolt/releases)
- [Commits](https://github.com/etcd-io/bbolt/compare/v1.3.10...v1.3.11)

---
updated-dependencies:
- dependency-name: go.etcd.io/bbolt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 23:54:49 +00:00
Derek McGowan
a26a33c3d9
Merge pull request #10543 from vishalRGurrala/feature/generate-attestation-for-artifacts
Generate attestation for artifacts during release CI job
2024-08-26 23:36:04 +00:00
Phil Estes
6f1cbd1da8
Merge pull request #10615 from containerd/dependabot/go_modules/dario.cat/mergo-1.0.1
build(deps): bump dario.cat/mergo from 1.0.0 to 1.0.1
2024-08-26 19:12:10 +00:00
Phil Estes
569a8d6b60
Merge pull request #10626 from dmcgowan/content-local-plugin
Register local content plugin from separate package
2024-08-26 19:11:57 +00:00
Maksym Pavlenko
dc8f875b03
Merge pull request #10631 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.20.1
build(deps): bump github.com/prometheus/client_golang from 1.19.1 to 1.20.1
2024-08-26 16:37:12 +00:00
Phil Estes
2b6b961dfa
Merge pull request #10635 from djdongjin/remove-sha256-simd
Remove sha256-simd dependency
2024-08-26 15:18:46 +00:00
Phil Estes
f97b02fb31
Merge pull request #10614 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.1.3
build(deps): bump google-github-actions/upload-cloud-storage from 2.1.2 to 2.1.3
2024-08-26 15:17:10 +00:00
Wei Fu
3cd8f9734d core/mount: use ptrace instead of go:linkname
The Go runtime has started to [lock down future uses of linkname][1] since
go1.23. In the go source code, containerd project has been marked in the
comment, [hall of shame][2]. Well, the go:linkname is used to fork no-op
subprocess efficiently. However, since that comment, I would like to use
ptrace and remove go:linkname in the whole repository.

With go1.22 `go:linkname`:

```bash
$ go test -bench=.  -benchmem ./ -exec sudo
goos: linux
goarch: amd64
pkg: github.com/containerd/containerd/v2/core/mount
cpu: AMD Ryzen 7 5800H with Radeon Graphics
BenchmarkBatchRunGetUsernsFD_Concurrent1-16                 2440            533320 ns/op            1145 B/op         43 allocs/op
BenchmarkBatchRunGetUsernsFD_Concurrent10-16                 342           3661616 ns/op           11562 B/op        421 allocs/op
PASS
ok      github.com/containerd/containerd/v2/core/mount  2.983s
```

With go1.22 `ptrace`:

```bash
$ go test -bench=.  -benchmem ./ -exec sudo
goos: linux
goarch: amd64
pkg: github.com/containerd/containerd/v2/core/mount
cpu: AMD Ryzen 7 5800H with Radeon Graphics
BenchmarkBatchRunGetUsernsFD_Concurrent1-16                 1785            739557 ns/op            3948 B/op         68 allocs/op
BenchmarkBatchRunGetUsernsFD_Concurrent10-16                 328           4024300 ns/op           39601 B/op        671 allocs/op
PASS
ok      github.com/containerd/containerd/v2/core/mount  3.104s
```

With go1.23 `ptrace`:

```bash
$ go test -bench=.  -benchmem ./ -exec sudo
goos: linux
goarch: amd64
pkg: github.com/containerd/containerd/v2/core/mount
cpu: AMD Ryzen 7 5800H with Radeon Graphics
BenchmarkBatchRunGetUsernsFD_Concurrent1-16                 1815            723252 ns/op            4220 B/op         69 allocs/op
BenchmarkBatchRunGetUsernsFD_Concurrent10-16                 319           3957157 ns/op           42351 B/op        682 allocs/op
PASS
ok      github.com/containerd/containerd/v2/core/mount  3.051s
```

Diff:

The `ptrace` is slower than `go:linkname` mode. However, it's accepctable.

```
goos: linux
goarch: amd64
pkg: github.com/containerd/containerd/v2/core/mount
cpu: AMD Ryzen 7 5800H with Radeon Graphics
                                    │ go122-golinkname │             go122-ptrace              │             go123-ptrace              │
                                    │      sec/op      │    sec/op     vs base                 │    sec/op     vs base                 │
BatchRunGetUsernsFD_Concurrent1-16        533.3µ ± ∞ ¹   739.6µ ± ∞ ¹        ~ (p=1.000 n=1) ²   723.3µ ± ∞ ¹        ~ (p=1.000 n=1) ²
BatchRunGetUsernsFD_Concurrent10-16       3.662m ± ∞ ¹   4.024m ± ∞ ¹        ~ (p=1.000 n=1) ²   3.957m ± ∞ ¹        ~ (p=1.000 n=1) ²
geomean                                   1.397m         1.725m        +23.45%                   1.692m        +21.06%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                    │ go122-golinkname │              go122-ptrace               │              go123-ptrace               │
                                    │       B/op       │     B/op       vs base                  │     B/op       vs base                  │
BatchRunGetUsernsFD_Concurrent1-16       1.118Ki ± ∞ ¹   3.855Ki ± ∞ ¹         ~ (p=1.000 n=1) ²   4.121Ki ± ∞ ¹         ~ (p=1.000 n=1) ²
BatchRunGetUsernsFD_Concurrent10-16      11.29Ki ± ∞ ¹   38.67Ki ± ∞ ¹         ~ (p=1.000 n=1) ²   41.36Ki ± ∞ ¹         ~ (p=1.000 n=1) ²
geomean                                  3.553Ki         12.21Ki        +243.65%                   13.06Ki        +267.43%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05

                                    │ go122-golinkname │             go122-ptrace             │             go123-ptrace             │
                                    │    allocs/op     │  allocs/op   vs base                 │  allocs/op   vs base                 │
BatchRunGetUsernsFD_Concurrent1-16         43.00 ± ∞ ¹   68.00 ± ∞ ¹        ~ (p=1.000 n=1) ²   69.00 ± ∞ ¹        ~ (p=1.000 n=1) ²
BatchRunGetUsernsFD_Concurrent10-16        421.0 ± ∞ ¹   671.0 ± ∞ ¹        ~ (p=1.000 n=1) ²   682.0 ± ∞ ¹        ~ (p=1.000 n=1) ²
geomean                                    134.5         213.6        +58.76%                   216.9        +61.23%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
```

[1]: <https://github.com/golang/go/issues/67401>
[2]: <https://github.com/golang/go/blob/release-branch.go1.23/src/runtime/proc.go#L4820>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-26 21:19:50 +08:00
Jin Dong
35b0292572 remove sha256-simd
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2024-08-25 04:46:04 +00:00
dependabot[bot]
1195b68eb2
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.20.1)

---
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-08-23 17:56:16 +00:00
Akihiro Suda
7b948faa08
Merge pull request #10618 from containerd/dependabot/go_modules/k8s-f6dd80a502
build(deps): bump the k8s group with 5 updates
2024-08-23 17:19:48 +00:00
Derek McGowan
50b06182f8
Register local content plugin from separate package
Update the local content plugin to register itself in a consistent way
as other plugins. This also allows the separate package to define its
own configuration more cleanly.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-08-22 11:18:30 -07:00
dependabot[bot]
021063c4ab
build(deps): bump the k8s group with 5 updates
Bumps the k8s group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.30.3` | `0.31.0` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.30.3` | `0.31.0` |
| [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.30.3` | `0.31.0` |
| [k8s.io/kubelet](https://github.com/kubernetes/kubelet) | `0.30.3` | `0.31.0` |
| [k8s.io/utils](https://github.com/kubernetes/utils) | `0.0.0-20230726121419-3b25d923346b` | `0.0.0-20240711033017-18e509b52bc8` |


Updates `k8s.io/apimachinery` from 0.30.3 to 0.31.0
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.30.3...v0.31.0)

Updates `k8s.io/client-go` from 0.30.3 to 0.31.0
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.30.3...v0.31.0)

Updates `k8s.io/component-base` from 0.30.3 to 0.31.0
- [Commits](https://github.com/kubernetes/component-base/compare/v0.30.3...v0.31.0)

Updates `k8s.io/kubelet` from 0.30.3 to 0.31.0
- [Commits](https://github.com/kubernetes/kubelet/compare/v0.30.3...v0.31.0)

Updates `k8s.io/utils` from 0.0.0-20230726121419-3b25d923346b to 0.0.0-20240711033017-18e509b52bc8
- [Commits](https://github.com/kubernetes/utils/commits)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/kubelet
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 00:46:42 +00:00
Fu Wei
e8104a4858
Merge pull request #10613 from kiashok/update-hcsshim-12.6
Update hcsshim to v0.12.6
2024-08-20 00:07:27 +00:00
dependabot[bot]
1bff3bfeda
build(deps): bump dario.cat/mergo from 1.0.0 to 1.0.1
Bumps [dario.cat/mergo](https://github.com/imdario/mergo) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: dario.cat/mergo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 23:51:42 +00:00
dependabot[bot]
429085c84d
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 23:20:08 +00:00
Kirtana Ashok
93abc2fdda Update hcsshim to v0.12.6
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-08-19 15:30:51 -07:00
Wei Fu
bcdf507363 core/mount: add benchmark test for GetUsernsFD
```bash
$ go test -bench=.  -benchmem ./ -exec sudo
goos: linux
goarch: amd64
pkg: github.com/containerd/containerd/v2/core/mount
cpu: AMD Ryzen 7 5800H with Radeon Graphics
BenchmarkBatchRunGetUsernsFD_Concurrent1-16                 2398            532424 ns/op            1145 B/op         43 allocs/op
BenchmarkBatchRunGetUsernsFD_Concurrent10-16                 343           3701695 ns/op           11552 B/op        421 allocs/op
PASS
ok      github.com/containerd/containerd/v2/core/mount  2.978s
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-08-19 19:11:25 +08:00
Phil Estes
0ecaec4dde
Merge pull request #10338 from harshitasao/scorecard-badge
Added the OpenSSF Scorecard Badge
2024-08-16 18:32:06 +00:00
Phil Estes
704c94b638
Merge pull request #10600 from akhilerm/update-support-matrix
docs: add k8s 1.31 to support matrix
2024-08-16 14:06:13 +00:00
Phil Estes
219df0e7a2
Merge pull request #10604 from thaJeztah/openssf_happiness
script/setup/install-dev-tools: update protoc-gen-go-ttrpc to v1.2.5, specify patch versions
2024-08-16 13:44:20 +00:00
Sebastiaan van Stijn
66817fccc3
script/setup/install-dev-tools: include patch version in versions
The OpenSSF scorecard is complaining about these two dependencies being
installed without a patch version specified;

    Warn: goCommand not pinned by hash: script/setup/install-dev-tools:27
    Warn: goCommand not pinned by hash: script/setup/install-dev-tools:28

While the error indicates it expects a hash, it looks like it's fine
with other modules in the same file, the difference being that those
specify a full version, including path version, e.g.;
919beb1cf7/script/setup/install-dev-tools (L26)

This patch updates `protoc-gen-go` and `protoc-gen-go-grpc` to the latest
patch release for the specified versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-16 10:54:17 +02:00
Sebastiaan van Stijn
cd4e24ef71
script/setup/install-dev-tools: update protoc-gen-go-ttrpc to v1.2.5
The current version was updated in 65031eadec,
and looks to be

- 1 commit ahead of v1.2.3; https://github.com/containerd/ttrpc/compare/v1.2.3...faba5896a9c4d7b65495cb9b2c02531feb1434d6
- slightly behind of v1.2.4; faba5896a9...v1.2.4

This patch upstreas it to the current (v1.2.5) version, aligning it with
the version used in `go.mod`;
faba5896a9...v1.2.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-16 10:53:37 +02:00
Akhil Mohan
9e2357f338
docs: add k8s 1.31 to support matrix to RELEASES
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-16 11:50:03 +05:30
Akihiro Suda
919beb1cf7
Merge pull request #10593 from jjmaestro/patch-1
docs: Update BUILDING.md
2024-08-15 22:31:42 +00:00
Mike Brown
a9227860ee
Merge pull request #10526 from AkihiroSuda/fix-10132
docs: update for containerd v2
2024-08-15 21:53:56 +00:00
Akihiro Suda
a3d84a1727
docs: update for containerd v2
Fix issue 10132

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-08-16 03:09:50 +09:00
Javier Maestro
43568373f4
docs: Update BUILDING.md
Signed-off-by: Javier Maestro <jjmaestro@ieee.org>
2024-08-15 18:12:06 +01:00
Akihiro Suda
6f3833f258
CRI: remove disable_cgroup
`disable_cgroup` was implemenetd in containerd/cri PR 970 (Nov 2018)
for supporting very early version of Usernetes on cgroup v1 hosts,
when most distros were still not ready to support cgroup v2.

This configuration is no longer needed, as cgroup v2 delegation is
now supported on almost all distros.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-08-15 06:08:30 +09:00
Akihiro Suda
f5d5407c2f
Merge pull request #10578 from akhilerm/test-gotip
Add go 1.23.0
2024-08-14 19:50:59 +00:00
Akhil Mohan
ebc47359ea
use format string when using printf like commands
As per https://github.com/golang/go/issues/60529, printf like commands with
non-constant format strings and no args give an error in govet

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 17:04:53 +05:30
Akhil Mohan
1027b314a6
ignore the static check when using anonymous struct in testing
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 14:50:39 +05:30
Akhil Mohan
f8e0753366
remove windows check in linux_test file
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 14:22:03 +05:30
Akhil Mohan
20ee6de0b5
update golangci-lint to v1.60.1
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 12:40:37 +05:30
Akhil Mohan
fb8cd045b8
add go1.23.0
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 12:30:37 +05:30
Akihiro Suda
a406da9628
Merge pull request #10584 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.1.2
build(deps): bump google-github-actions/upload-cloud-storage from 2.1.1 to 2.1.2
2024-08-13 09:53:06 +00:00
Akihiro Suda
bd9aed6492
Merge pull request #10586 from containerd/dependabot/go_modules/github.com/urfave/cli/v2-2.27.4
build(deps): bump github.com/urfave/cli/v2 from 2.27.3 to 2.27.4
2024-08-13 07:24:37 +00:00
Akihiro Suda
c878093c5e
Merge pull request #10552 from containerd/dependabot/go_modules/k8s-cec78cdc0e
build(deps): bump k8s.io/cri-api from 0.31.0-beta.0.0.20240716205706-865479a3e1b3 to 0.32.0-alpha.0 in the k8s group
2024-08-13 05:55:34 +00:00
Akihiro Suda
eebc80df58
Merge pull request #10585 from containerd/dependabot/go_modules/golang-x-ef3ba730bc
build(deps): bump golang.org/x/sys from 0.23.0 to 0.24.0 in the golang-x group
2024-08-13 05:51:42 +00:00
Fu Wei
dd2a24cf0e
Merge pull request #10557 from tariq1890/cli-ctx-add
use ctx object from cliContext instead of a creating a new one
2024-08-13 01:13:48 +00:00
Fu Wei
7403f91f1a
Merge pull request #10560 from samuelkarp/ctr-shim-state
ctr: shim state for secondary tasks & shim state query for old shims
2024-08-13 01:13:30 +00:00
dependabot[bot]
3f53e7a6eb
build(deps): bump github.com/urfave/cli/v2 from 2.27.3 to 2.27.4
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.3 to 2.27.4.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.3...v2.27.4)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 23:39:07 +00:00
dependabot[bot]
1127908ae5
build(deps): bump k8s.io/cri-api in the k8s group
Bumps the k8s group with 1 update: [k8s.io/cri-api](https://github.com/kubernetes/cri-api).


Updates `k8s.io/cri-api` from 0.31.0-beta.0.0.20240716205706-865479a3e1b3 to 0.32.0-alpha.0
- [Commits](https://github.com/kubernetes/cri-api/commits/v0.32.0-alpha.0)

---
updated-dependencies:
- dependency-name: k8s.io/cri-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 23:38:55 +00:00
dependabot[bot]
6ed54e9663
build(deps): bump golang.org/x/sys in the golang-x group
Bumps the golang-x group with 1 update: [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/sys` from 0.23.0 to 0.24.0
- [Commits](https://github.com/golang/sys/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 23:38:55 +00:00
dependabot[bot]
1de84c29f1
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 23:07:43 +00:00
Kazuyoshi Kato
6b04c9dfac
Merge pull request #10550 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.1.1
build(deps): bump google-github-actions/upload-cloud-storage from 2.1.0 to 2.1.1
2024-08-09 23:08:42 +00:00
Maksym Pavlenko
3c344bc589
Merge pull request #10569 from thaJeztah/bump_go
update to go1.22.6
2024-08-09 18:25:19 +00:00
Maksym Pavlenko
0b02e0c225
Merge pull request #7616 from swagatbora90/trace-cri-runtime
Add tracing spans to CRI runtime service apis
2024-08-09 18:24:47 +00:00
Sebastiaan van Stijn
a100b055cb
update to go1.22.6
- https://github.com/golang/go/issues?q=milestone%3AGo1.22.6+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.22.5...go1.22.6

go1.22.6 (released 2024-08-06) includes fixes to the go command, the compiler,
the linker, the trace command, the covdata command, and the bytes, go/types,
and os/exec packages. See the Go 1.22.6 milestone on our issue tracker for
details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-09 17:02:18 +02:00
Derek McGowan
268ae7fa02
Merge pull request #10562 from zhsj/pidfd
Fix TestNewBinaryIOCleanup on Go 1.23 and Linux 5.4
2024-08-09 13:13:58 +00:00
Derek McGowan
ee86aba275
Merge pull request #10563 from thaJeztah/migrate_userns
migrate to github.com/moby/sys/userns
2024-08-09 13:13:02 +00:00
Sebastiaan van Stijn
9776047243
migrate to github.com/moby/sys/userns
Commit 8437c567d8 migrated the use of the
userns package to the github.com/moby/sys/user module.

After further discussion with maintainers, it was decided to move the
userns package to a separate module, as it has no direct relation with
"user" operations (other than having "user" in its name).

This patch migrates our code to use the new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-08 12:48:54 +02:00
Shengjing Zhu
8ef73c5dd5 Fix TestNewBinaryIOCleanup on Go 1.23 and Linux 5.4
When running the test on Ubuntu focal (kernel version 5.4), the
symlink for pidfd is anon_inode:[pidfd].

Updates: #10345

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2024-08-08 17:20:19 +08:00
Samuel Karp
7d4da0cb28
ctr: shim state query for old shims
Old shims do not implement containerd.task.v3.Task, but it can be
useful to use a new ctr with an older shim especially during upgrade
scenarios.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-08-07 16:48:14 -07:00
Samuel Karp
d59e8a8404
ctr: shim state for secondary tasks
The v2 shim interface supports grouping, so a single shim can manage
multiple tasks.  Prior to this change, the `shim state` command could
only query the state of the primary task (task that shares the same ID
as the shim).

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-08-07 16:48:08 -07:00
Samuel Karp
58cf6e2830
Merge pull request #10551 from containerd/dependabot/go_modules/golang-x-39bd39f2da
build(deps): bump the golang-x group with 3 updates
2024-08-07 06:01:35 +00:00
Tariq Ibrahim
32c2d14932
use ctx object from cliContext instead of a creating a new one
Signed-off-by: Tariq Ibrahim <tibrahim@nvidia.com>
2024-08-06 13:42:22 -07:00
Maksym Pavlenko
10d4ee9dc1
Merge pull request #10556 from thaJeztah/fix_runc_version
script/setup/install-runc: fix runc using incorrect version
2024-08-06 20:35:45 +00:00
Sebastiaan van Stijn
349d2b5c15
script/setup/install-runc: fix runc using incorrect version
runc v1.1.13 introduced an option to customize the version (as printed by the
`--version` flag) through a `VERSION` Make variable / environment variable
(see [1]).

This variable collided with the `VERSION` environment variable used by
containerd for the same purpose, which lead to `runc` binaries built
using the version of containerd;

    runc --version
    runc version 1.7.20
    commit: v1.1.13-0-g58aa9203
    ...

This patch unsets the `VERSION` variable to bring prevent it from being
inherited and to bring back the previous behavior.

Before this patch:

    docker build -t containerd-test -f contrib/Dockerfile.test .
    docker run -it --rm --env VERSION=1.7.20 containerd-test sh -c 'script/setup/install-runc && /usr/local/sbin/runc --version'
    # ....
    HEAD is now at 58aa9203 VERSION: release 1.1.13
    go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.1.13-0-g58aa9203 -X main.version=1.7.20 " -o runc .
    install -D -m0755 runc /usr/local/sbin/runc
    /go/src/github.com/containerd/containerd
    runc version 1.7.20
    commit: v1.1.13-0-g58aa9203
    spec: 1.0.2-dev
    go: go1.22.5
    libseccomp: 2.5.4

With this patch:

    docker build -t containerd-test -f contrib/Dockerfile.test .
    docker run -it --rm --env VERSION=1.7.20 containerd-test sh -c 'script/setup/install-runc && /usr/local/sbin/runc --version'
    # ....
    HEAD is now at 58aa9203 VERSION: release 1.1.13
    go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.1.13-0-g58aa9203 -X main.version=v1.1.13 " -o runc .
    install -D -m0755 runc /usr/local/sbin/runc
    /go/src/github.com/containerd/containerd
    runc version v1.1.13
    commit: v1.1.13-0-g58aa9203
    spec: 1.0.2-dev
    go: go1.22.5
    libseccomp: 2.5.4

[1]: 6f4d975c40

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-06 16:52:15 +02:00
Vishal Reddy Gurrala
fc1637d16e
Attest artifacts in release workflow
Signed-off-by: Vishal Reddy Gurrala <vishalgurrala21@gmail.com>
2024-08-05 20:54:34 -05:00
Vishal Reddy Gurrala
337d8c52c5
Update release job to generate artifacts attestation
Signed-off-by: Vishal Reddy Gurrala <vishalgurrala21@gmail.com>
2024-08-05 20:50:26 -05:00
dependabot[bot]
267fac568d
build(deps): bump the golang-x group with 3 updates
Bumps the golang-x group with 3 updates: [golang.org/x/mod](https://github.com/golang/mod), [golang.org/x/sync](https://github.com/golang/sync) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/mod` from 0.19.0 to 0.20.0
- [Commits](https://github.com/golang/mod/compare/v0.19.0...v0.20.0)

Updates `golang.org/x/sync` from 0.7.0 to 0.8.0
- [Commits](https://github.com/golang/sync/compare/v0.7.0...v0.8.0)

Updates `golang.org/x/sys` from 0.22.0 to 0.23.0
- [Commits](https://github.com/golang/sys/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 23:38:35 +00:00
dependabot[bot]
6814cc3549
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 23:17:47 +00:00
Maksym Pavlenko
7f707b5e79
Merge pull request #10547 from katexochen/code-flow-delim
docs/content-flow: fix code fence delimiter
2024-08-05 17:34:37 +00:00
Paul Meyer
d036988eec docs/content-flow: fix code fence delimiter
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-08-05 12:55:48 +02:00
Swagat Bora
83c26962c2 Remove extra span created in the instrumented service layer
Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:27 +00:00
Swagat Bora
c0cdcb34f1 Add spans to CRI runtime service and related client methods
This adds otel spans to CRI service mainly targeting mutating apis which includes:
* Sandbox apis - RunPodSandbox, StopPodSandbox, RemovePodSandbox
* Container apis - CreateContainer, StartContainer, StopContainer, RemoveContainer
* Attach, Exec and Exec Sync
* Containerd client methods: container.go, client.go, process.go and task.go

Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-08-05 02:34:20 +00:00
Fu Wei
45d8917089
Merge pull request #10284 from ningmingxiao/sync
support to syncfs after pull by using diff plugin
2024-08-05 00:58:13 +00:00
ningmingxiao
0e4f2108b5 support to syncfs after pull by using diff plugin
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2024-08-02 11:47:42 +08:00
Phil Estes
7a804489fd
Merge pull request #10516 from etungsten/ensure-state-dir-perms
Ensure /run/containerd gets created with correct perms
2024-07-31 14:22:04 +00:00
Akihiro Suda
babfebf0a4
Merge pull request #10472 from fuweid/migrate-sandboxes-bucket
core/metadata: migrate sandboxes bucket into v1
2024-07-31 01:01:05 +00:00
Erikson Tung
551ac0600a Ensure /run/containerd is created with correct perms
There are a couple directories that get created under the default
state directory ("/run/containerd") even when containerd is configured
to use a different location for its state directory. Create the default
state directory even if containerd is configured to use a different
state directory location. This ensure pkg/shim and pkg/fifo won't create
the default state directory with incorrect permissions when calling
os.MkdirAll for their respective subdirectories.

Signed-off-by: Erikson Tung <etung@netflix.com>
2024-07-30 17:55:01 -07:00
Maksym Pavlenko
fd2a7676a3
Merge pull request #10442 from Iceber/fix_ctr_delete_force
client: fix tasks with PID 0 cannot be forced to delete
2024-07-30 20:14:08 +00:00
Maksym Pavlenko
fae1118afd
Merge pull request #10519 from containerd/dependabot/go_modules/github.com/urfave/cli/v2-2.27.3
build(deps): bump github.com/urfave/cli/v2 from 2.27.2 to 2.27.3
2024-07-30 20:13:14 +00:00
Maksym Pavlenko
fec24e209d
Merge pull request #10520 from saschagrunert/cri
Make `StopPodSandbox` RPC idempotent
2024-07-30 20:12:50 +00:00
Maksym Pavlenko
7bcc78526d
Merge pull request #10521 from saschagrunert/idempotence-ctr
Make `StopContainer` RPC idempotent
2024-07-30 20:12:26 +00:00
Wei Fu
4cfeb7b19e core/metadata: migrate sandboxes bucket into v1
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-07-30 21:37:35 +08:00
Sascha Grunert
a97b11898a
Make StopContainer RPC idempotent
Similar to container removal, the stop of a container should be a noop if
the container has not been found.

Found during: https://github.com/kubernetes-sigs/cri-tools/pull/1536

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-30 11:47:25 +02:00
Sascha Grunert
c6cea95d95
Make StopPodSandbox RPC idempotent
Similar to sandbox removal, the stop of a sandbox should be a noop if
the sandbox has not been found.

Found during: https://github.com/kubernetes-sigs/cri-tools/pull/1535

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-07-30 10:40:16 +02:00
Kazuyoshi Kato
ea3e1d9613
Merge pull request #10518 from containerd/dependabot/github_actions/ossf/scorecard-action-2.4.0
build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
2024-07-30 03:59:37 +00:00
dependabot[bot]
ad24ca9605
build(deps): bump github.com/urfave/cli/v2 from 2.27.2 to 2.27.3
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.2 to 2.27.3.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.2...v2.27.3)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 23:37:04 +00:00
dependabot[bot]
71b5b34de0
build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 23:04:31 +00:00
Kazuyoshi Kato
2ddd3db952
Merge pull request #9858 from w13915984028/fixdebug
Add file name to device type check failure message
2024-07-26 21:20:38 +00:00
Akihiro Suda
7a1f6b2891
Merge pull request #10509 from samuelkarp/pr-9966-follow-up
deprecation: update warnings for CRI config fields
2024-07-26 17:40:59 +00:00
Akihiro Suda
762df8b7d1
Merge pull request #10473 from thaJeztah/migrate_userns
pkg/userns: deprecate and migrate to github.com/moby/sys/user/userns
2024-07-26 17:38:55 +00:00
Sebastiaan van Stijn
eddd90d7c1
remove deprecated pkg/userns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 09:48:40 +02:00
Sebastiaan van Stijn
8437c567d8
pkg/userns: deprecate and migrate to github.com/moby/sys/user/userns
The userns package in libcontainer was integrated into the moby/sys/user
module at commit [3778ae603c706494fd1e2c2faf83b406e38d687d][1].

This patch deprecates the containerd fork of that package, and adds it as
an alias for the moby/sys/user/userns package.

[1]: 3778ae603c

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 09:47:50 +02:00
Sebastiaan van Stijn
40a315b95c
vendor: github.com/moby/sys/user v0.2.0
full diff: https://github.com/moby/sys/compare/user/v0.1.0...user/v0.2.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-26 09:47:12 +02:00
Samuel Karp
f9146c0516
deprecation: update warnings for CRI config fields
Some CRI config properties had removal postponed until v2.1 in
https://github.com/containerd/containerd/pull/9966. Update the
associated deprecation warnings to match the new removal version.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-07-25 14:25:39 -07:00
Kazuyoshi Kato
f9903084ae
Merge pull request #10503 from samuelkarp/issue-10491
introspection: regenerate UUID if state is empty
2024-07-25 21:14:50 +00:00
Samuel Karp
0dcc51aedf
introspection: regenerate UUID if state is empty
The /var/lib/containerd/io.containerd.grpc.v1.introspection/uuid file
stores a UUID to identify the particular containerd daemon responding to
requests.  The file should either exist with a UUID, or not exist.
However, it has been observed that the file can be truncated with 0
bytes, which will then fail to be parsed as a valid UUID.

As a defensive practice, detect a 0-length file and overwrite with a new
UUID rather than failing.

Fixes: https://github.com/containerd/containerd/issues/10491
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-07-25 11:02:54 -07:00
Kazuyoshi Kato
c3bed76eeb
Merge pull request #10343 from ambarve/fix_ordering_comment
Fix incorrect comment about ordering of parent layers
2024-07-23 18:19:35 +00:00
Kazuyoshi Kato
442daddb7f
Merge pull request #10495 from containerd/dependabot/go_modules/k8s-91e0c64a7e
build(deps): bump the k8s group across 1 directory with 4 updates
2024-07-23 18:18:35 +00:00
Kazuyoshi Kato
87833dccdc
Merge pull request #10445 from containerd/dependabot/go_modules/otel-c1db8401eb
build(deps): bump the otel group across 1 directory with 8 updates
2024-07-23 18:18:00 +00:00
Akihiro Suda
323ba43e91
Merge pull request #10494 from containerd/dependabot/go_modules/github.com/containernetworking/cni-1.2.3
build(deps): bump github.com/containernetworking/cni from 1.2.2 to 1.2.3
2024-07-23 04:16:41 +00:00
dependabot[bot]
abdb4fd774
build(deps): bump the k8s group across 1 directory with 4 updates
Bumps the k8s group with 4 updates in the / directory: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go), [k8s.io/component-base](https://github.com/kubernetes/component-base) and [k8s.io/kubelet](https://github.com/kubernetes/kubelet).


Updates `k8s.io/apimachinery` from 0.30.2 to 0.30.3
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.30.2...v0.30.3)

Updates `k8s.io/client-go` from 0.30.2 to 0.30.3
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.30.2...v0.30.3)

Updates `k8s.io/component-base` from 0.30.2 to 0.30.3
- [Commits](https://github.com/kubernetes/component-base/compare/v0.30.2...v0.30.3)

Updates `k8s.io/kubelet` from 0.30.2 to 0.30.3
- [Commits](https://github.com/kubernetes/kubelet/compare/v0.30.2...v0.30.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/kubelet
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 03:12:58 +00:00
dependabot[bot]
bc51d4b205
build(deps): bump the otel group across 1 directory with 8 updates
Bumps the otel group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.51.0` | `0.53.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.51.0` | `0.53.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.26.0` | `1.28.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.26.0` | `1.28.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.26.0` | `1.28.0` |



Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.51.0 to 0.53.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.51.0...zpages/v0.53.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.51.0 to 0.53.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.51.0...zpages/v0.53.0)

Updates `go.opentelemetry.io/otel` from 1.26.0 to 1.28.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.28.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.26.0 to 1.28.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.28.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.26.0 to 1.28.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.28.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.26.0 to 1.28.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.28.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.26.0 to 1.28.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.28.0)

Updates `go.opentelemetry.io/otel/trace` from 1.26.0 to 1.28.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.26.0...v1.28.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 03:12:49 +00:00
Phil Estes
0fe79b6eac
Merge pull request #10346 from mauri870/hotfix/gotip-test
Fix TestNewBinaryIOCleanup failing with gotip
2024-07-23 02:31:47 +00:00
Akihiro Suda
6c6eac5324
Merge pull request #10410 from everpeace/kep-3619-runtimestatus-features-supplemental_groups_policy
KEP-3619: Implement  RuntimeStatus.features.supplemental_groups_policy in CRI
2024-07-23 01:14:32 +00:00
dependabot[bot]
025d1161e8
build(deps): bump github.com/containernetworking/cni from 1.2.2 to 1.2.3
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.2.2...v1.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 23:40:32 +00:00
Shingo Omura
81ef465841
KEP-3619: update cri-api version
Signed-off-by: Shingo Omura <everpeace@gmail.com>
2024-07-23 01:04:31 +09:00
Shingo Omura
ee2c0d9e74
KEP-3619: implement features.supplemental_groups_policy in RuntimeStatus
Signed-off-by: Shingo Omura <everpeace@gmail.com>
2024-07-23 01:01:36 +09:00
Phil Estes
bfb2a355b0
Merge pull request #10408 from containerd/dependabot/go_modules/github.com/containerd/imgcrypt-1.2.0-rc1
build(deps): bump github.com/containerd/imgcrypt from 1.1.12-0.20240528203804-3ca09a2db5cd to 1.2.0-rc1
2024-07-22 14:37:34 +00:00
dependabot[bot]
2d97134e5d
build(deps): bump github.com/containerd/imgcrypt
Bumps [github.com/containerd/imgcrypt](https://github.com/containerd/imgcrypt) from 1.1.12-0.20240528203804-3ca09a2db5cd to 1.2.0-rc1.
- [Release notes](https://github.com/containerd/imgcrypt/releases)
- [Changelog](https://github.com/containerd/imgcrypt/blob/main/CHANGES)
- [Commits](https://github.com/containerd/imgcrypt/commits/v1.2.0-rc1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 06:24:29 +00:00
Samuel Karp
1e3c35bd0d
Merge pull request #10488 from dcantah/avoid-realloc
Avoid potential reallocs by pre-sizing some slices
2024-07-22 05:39:19 +00:00
Maksym Pavlenko
01a2b6fd86
Merge pull request #10250 from mxpv/grpc
Bump GRPC to 1.64
2024-07-22 05:15:36 +00:00
Derek McGowan
eb56f15b1a
Merge pull request #10487 from thaJeztah/bump_moby_sys
vendor: update moby/sys dependencies
2024-07-22 04:18:27 +00:00
Mauri de Souza Meneguzzo
f0aecaa2e2
Fix TestNewBinaryIOCleanup failing with gotip
This PR ignores a new pidfd file descriptor that is introduced in
gotip (future 1.23) and should not be considered when detecting fd leaks.

Fixes #10345

Signed-off-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2024-07-19 18:49:40 -03:00
Danny Canter
b41bb6df73 Avoid potential reallocs by pre-sizing some slices
There's a couple spots where we know exactly how large
the destination buffer should be, so pre-size these to
avoid any reallocs to a higher capacity.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-07-19 13:05:49 -07:00
Sebastiaan van Stijn
a779449c48
vendor: github.com/moby/sys/sequential v0.6.0
full diff: https://github.com/moby/sys/compare/sequential/v0.5.0...sequential/v0.6.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-19 21:35:28 +02:00
Sebastiaan van Stijn
1bfa7c8fed
vendor: github.com/moby/sys/symlink v0.3.0
full diff: https://github.com/moby/sys/compare/symlink/v0.2.0...symlink/v0.3.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-19 21:34:55 +02:00
Sebastiaan van Stijn
95b429c015
vendor: github.com/moby/sys/signal v0.7.1
full diff: https://github.com/moby/sys/compare/signal/v0.7.0...signal/v0.7.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-19 21:34:08 +02:00
Sebastiaan van Stijn
08d6c9323f
vendor: github.com/moby/sys/mountinfo v0.7.2
full diff: https://github.com/moby/sys/compare/mountinfo/v0.7.1...mountinfo/v0.7.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-19 21:32:58 +02:00
Maksym Pavlenko
fb674f8b48 Add resolver workaround for error: name resolver error: produced zero addresses
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-07-18 15:26:02 -07:00
Maksym Pavlenko
63b4688175 Use grpc.NewClient instead of deprecated ones
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-07-18 15:26:02 -07:00
Maksym Pavlenko
a5be629936 Vendor GRPC 1.64
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-07-18 15:25:57 -07:00
Samuel Karp
da3655678d
Merge pull request #10203 from deitch/content-flow-with-snapshot-updates
update documentation for content-flow
2024-07-17 19:09:54 +00:00
Avi Deitcher
1a5c711c3c update documentation for content-flow
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-07-17 15:29:54 +03:00
Samuel Karp
78d3e205a5
Merge pull request #10376 from linxiulei/concurrent_podstats
cri: optimize ListPodSandboxStats with parallelism
2024-07-16 22:09:52 +00:00
Kazuyoshi Kato
b31d3fdcef
Merge pull request #10357 from ktock/script-setup-imgcrypt-version-1.1.11
script: bump up imgcrypt version to v1.2.0-rc1
2024-07-16 18:50:36 +00:00
Kazuyoshi Kato
3e5e5b4da9
Merge pull request #10471 from colinodell/include-path-in-error
Include file path in tar copy errors
2024-07-16 17:02:13 +00:00
Colin O'Dell
c8254dfae9
Include filename in error
Signed-off-by: Colin O'Dell <colinodell@gmail.com>
2024-07-16 12:14:36 -04:00
Akihiro Suda
ca6a8a56a5
Merge pull request #10464 from containerd/dependabot/go_modules/tags.cncf.io/container-device-interface-0.8.0
build(deps): bump tags.cncf.io/container-device-interface from 0.7.2 to 0.8.0
2024-07-16 07:14:59 +00:00
Akihiro Suda
ac818cb363
Merge pull request #10465 from containerd/dependabot/go_modules/github.com/Microsoft/hcsshim-0.12.5
build(deps): bump github.com/Microsoft/hcsshim from 0.12.4 to 0.12.5
2024-07-16 05:30:06 +00:00
Kazuyoshi Kato
67a0efc589
Merge pull request #10460 from dmcgowan/update-link-gha-workflow
Add read permission limit on link workflow
2024-07-16 00:29:57 +00:00
dependabot[bot]
9eda0b73ae
build(deps): bump github.com/Microsoft/hcsshim from 0.12.4 to 0.12.5
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.12.4 to 0.12.5.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](https://github.com/Microsoft/hcsshim/compare/v0.12.4...v0.12.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 23:13:56 +00:00
dependabot[bot]
9315d59bfb
build(deps): bump tags.cncf.io/container-device-interface
Bumps [tags.cncf.io/container-device-interface](https://github.com/cncf-tags/container-device-interface) from 0.7.2 to 0.8.0.
- [Release notes](https://github.com/cncf-tags/container-device-interface/releases)
- [Commits](https://github.com/cncf-tags/container-device-interface/compare/v0.7.2...v0.8.0)

---
updated-dependencies:
- dependency-name: tags.cncf.io/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-15 23:13:49 +00:00
Samuel Karp
0262714edb
Merge pull request #10412 from TinaMor/tinamor/dev
[Windows] Set stderr to empty string when using terminal on Windows
2024-07-15 16:29:08 +00:00
Derek McGowan
42daab9c11
Merge pull request #10449 from rata/rata/userns-ci-fixes
CI fixes for upcoming runc 1.2.0
2024-07-15 15:05:16 +00:00
Derek McGowan
7480de28a4
Remove static link to images outside of the repository
If an image is needed, it should be in the repository. In this case the
logo images are not necessary.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-07-15 07:36:06 -07:00
Derek McGowan
edd84f4a65
Add read permission limit on link workflow
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-07-15 07:05:34 -07:00
harshitasao
274de35fef updated the domain in the link
Signed-off-by: harshitasao <harshitasao@gmail.com>
2024-07-13 00:34:44 +05:30
Eric Lin
807f32573f cri: optimize ListPodSandboxStats with parallelism
Signed-off-by: Eric Lin <linxiulei@gmail.com>
2024-07-12 09:02:33 +00:00
Maksym Pavlenko
ac0f34f0ec
Merge pull request #10378 from akhilerm/use-marshall-from-type-url
use typeurl funcs for marshalling anypb.Any
2024-07-11 16:15:20 +00:00
Derek McGowan
231301c8f8
Merge pull request #10451 from dims/cri-ttrpc-closed-during-ListPodSandboxStats-main
Fix for [cri] ttrpc: closed during ListPodSandboxStats
2024-07-11 13:08:11 +00:00
Rodrigo Campos
7c4de28210 Update cri-tools to v1.30.1
This patch release includes just a fix to skip userns tests on host that
don't support the feature. See:

	https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.30.1

This is needed for CI to work fine when we update to runc 1.2 (not yet
released). It is also a blocker for the final runc release to make sure
it works in all known downstreams. This makes it work fine here :)

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-11 14:58:44 +02:00
Davanum Srinivas
0772d0a37b
Fix for [cri] ttrpc: closed during ListPodSandboxStats
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-07-10 20:42:06 -04:00
Akhil Mohan
300fd770a0
use typeurl funcs for marshalling anypb.Any
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-07-10 22:26:27 +05:30
Rodrigo Campos
e1adfaeb92 script/setup/config-containerd: Use slow_chown
slow_chown is safe to add on all kernels, and when running in old
kernels (as some CI distros on purpose are), we want the expensive
fallback.

Vagrant setup and others use this script to config containerd. This
fixes userns tests with runc 1.2.0-rc.2 when running with old kernels.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-10 17:26:31 +02:00
Rodrigo Campos
89a2cac377 scripts/critest.sh: Prepare for userns tests in runc
When runc 1.2.0 is released, it will expose support for userns and
therefore the critest suite will run those tests. The thing is, runc
needs to be able to traverse the path to mount the rootfs on itself.

Let's just mark the paths from the BDIR upwards with +x permissions, so
the tests run fine. Containerd already makes sure that the paths below
(the ones it creates) have the right permissions and for the right
group, etc.

I've tested with runc 1.2.0-rc.2 and CI fails without this path, with
this patch it works just fine.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-10 17:26:31 +02:00
Maksym Pavlenko
1b24e53d09
Merge pull request #10443 from containerd/dependabot/go_modules/golang-x-8115ffb80d
build(deps): bump the golang-x group with 2 updates
2024-07-09 16:48:29 +00:00
dependabot[bot]
63b55e6dfb
build(deps): bump the golang-x group with 2 updates
Bumps the golang-x group with 2 updates: [golang.org/x/mod](https://github.com/golang/mod) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/mod` from 0.18.0 to 0.19.0
- [Commits](https://github.com/golang/mod/compare/v0.18.0...v0.19.0)

Updates `golang.org/x/sys` from 0.21.0 to 0.22.0
- [Commits](https://github.com/golang/sys/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 23:55:10 +00:00
Kohei Tokunaga
203cb303e0
script: bump up imgcrypt version to v1.2.0-rc1
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-07-08 19:25:39 +09:00
Iceber Gu
efd4415062 client: fix tasks with PID 0 cannot be forced to delete
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2024-07-08 17:24:58 +08:00
TinaMor
eaa1afe634 Set stderr to empty string when using terminal on Windows.
Windows HCSShim requires that stderr is an empty string when using terminal.
	Reference: 200feabd85/cmd/containerd-shim-runhcs-v1/service_internal.go (L127)

Signed-off-by: Christine Murimi <mor.tina@outlook.com>
2024-07-08 09:21:20 +03:00
Akihiro Suda
cbb2fc78e9
Merge pull request #10436 from AkihiroSuda/fedora-40
CI: update Fedora to 40
2024-07-07 11:15:11 +00:00
Akihiro Suda
51f34ff491
CI: update Fedora to 40
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-07-04 23:50:35 +09:00
Akihiro Suda
1117f663e7
Merge pull request #10416 from akhilerm/update-go1.22.5
update go version to 1.22.5
2024-07-03 23:57:07 +00:00
Akhil Mohan
56495b404d
update go version to 1.22.5
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-07-03 11:55:48 +05:30
Fu Wei
1fb1882c7d
Merge pull request #10375 from linxiulei/podstats
cri: get pid count from container metrics
2024-07-01 21:32:17 +00:00
Fu Wei
3b2a14bb4c
Merge pull request #10407 from dmcgowan/fsverity-internal
Move fsverity package to internal
2024-07-01 21:31:55 +00:00
Samuel Karp
ebcbbe5643
Merge pull request #10401 from samuelkarp/nri-panic
cri: ensure NRI API never has nil CRI
2024-07-01 16:37:46 +00:00
Derek McGowan
23170e20df
Move fsverity package to internal
This functionality is not directly related to containerd and could move
to external package at some point.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-07-01 09:21:24 -07:00
Eric Lin
f6e731c809 cri: get pid count from container metrics
This reduces latency of calling ListPodSandboxStats() by avoiding calling
shim API Task().

Signed-off-by: Eric Lin <linxiulei@gmail.com>
2024-07-01 15:34:47 +00:00
Fu Wei
37e0f54534
Merge pull request #10402 from thaJeztah/update_runhcs_v0.12.4
update runhcs binary to v0.12.4
2024-07-01 15:29:26 +00:00
Fu Wei
f5f11658c5
Merge pull request #9903 from abel-von/add-update-resource-only
sandbox: Add Update API for sandbox controller
2024-07-01 15:16:21 +00:00
Akihiro Suda
7103e381f1
Merge pull request #10007 from Jenkins-J/fsverity-content-verification
Fsverity content verification
2024-06-29 06:32:17 +00:00
Akihiro Suda
db1123b19c
Merge pull request #10394 from thaJeztah/deprecate_reference_SplitObject
pkg/reference: deprecate SplitObject, and remove for v2.0
2024-06-29 06:14:56 +00:00
Sebastiaan van Stijn
96352ad226
update runhcs binary to v0.12.4
commit 149ca6880a updated the hcsshim
module to v0.12.4, but did not add a commit to also update the runhcs
binary version.

full diff: https://github.com/microsoft/hcsshim/compare/v0.12.3...v0.12.4

These versions are decoupled since 15b13fb3ea
to allow updating the binary version without updating the module, in cases
where the module doesn't require updates.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-29 00:46:30 +02:00
Samuel Karp
10aec359a0
cri: ensure NRI API never has nil CRI
A nil CRIImplementation field can cause a nil pointer dereference and
panic during startup recovery.

Prior to this change, the nri.API struct would have a nil cri
(CRIImplementation) field after nri.NewAPI until nri.Register was
called.  Register is called mid-way through initialization of the CRI
plugin, but recovery for containers occurs prior to that.  Container
recovery includes establishing new exit monitors for existing containers
that were discovered.  When a container exits, NRI plugins are given the
opportunity to be notified about the lifecycle event, and this is done
by accessing that CRIImplementation field inside the nri.API.  If a
container exits prior to nri.Register being called, access to the
CRIImplementation field can cause a panic.

Here's the call-path:

* The CRI plugin starts running
  [here](ae71819c4f/pkg/cri/server/service.go (L222))
* It then [calls into](ae71819c4f/pkg/cri/server/service.go (L227))
  `recover()` to recover state from previous runs of containerd
* `recover()` then attempts to recover all containers through
  [`loadContainer()`](ae7d74b9e2/internal/cri/server/restart.go (L175))
* When `loadContainer()` finds a container that is still running, it waits
  for the task (internal containerd object) to exit and sets up
  [exit monitoring](ae7d74b9e2/internal/cri/server/restart.go (L391))
* Any exit that then happens must be
  [handled](ae7d74b9e2/internal/cri/server/events.go (L145))
* Handling an exit includes
  [deleting the Task](ae7d74b9e2/internal/cri/server/events.go (L188))
  and specifying [`nri.WithContainerExit`](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L348))
  to [notify](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L356))
  any subscribed NRI plugins
* NRI plugins need to know information about the pod (not just the sandbox),
  so before a plugin is notified the NRI API package
  [queries the Sandbox Store](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L232))
  through the CRI implementation
* The `cri` implementation member field in the `nri.API` struct is set as part of the
  [`Register()`](ae7d74b9e2/internal/cri/nri/nri_api_linux.go (L66)) method
* The `nri.Register()` method is only called
  [much further down in the CRI `Run()` method](ae71819c4f/pkg/cri/server/service.go (L279))

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-06-28 15:32:11 -07:00
Sebastiaan van Stijn
a723c0c6ea
pkg/reference: remove deprecated SplitObject
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-28 19:06:30 +02:00
James Jenkins
ef98c71985 Implement fsverity functionality
Implement calls to the fsverity kernel module, allowing containerd to
enable fsverity on blob data in the content store. This causes fsverity
to veirfy the integrity of blob data when the blob is read.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2024-06-28 09:50:44 -04:00
Sebastiaan van Stijn
fec33aa735
pkg/reference: deprecate SplitObject
The behavior of this function is quite counter-intuitive, as it preserves
the delimiter in the result, and its use for external consumers would be
very limited.

Spec.Digest no longer uses this function, and it appears that BuildKit is
currently the only (publicly visible) external consumer of it.

This patch deprecates the function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 22:11:42 +02:00
Maksym Pavlenko
ae7d74b9e2
Merge pull request #10393 from thaJeztah/improve_reference
pkg/reference: reduce allocations and improve GoDoc
2024-06-27 18:36:24 +00:00
Sebastiaan van Stijn
a5fce38f31
pkg/reference: Spec.Digest(): inline SplitObject code
Inline the relevant code from SplitObject, as we're only interested
in the digest portion.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:05:23 +02:00
Sebastiaan van Stijn
42145950bb
pkg/reference: SplitObject: add proper GoDoc
The behavior of this function is quite counter-intuitive, as it preserves
the delimiter in the result. This function should probably have been an
internal function, as its use for external consumers would be very limited,
but let's at least document the (surprising) behavior for those that are
considering to use it.

It appears that BuildKit is currently the only (publicly visible) external
consumer of this function; I am planning to inline its functionality in
Spec.Digest() and to deprecate this function so that it can be removed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:05:23 +02:00
Sebastiaan van Stijn
74a6156ac2
pkg/reference: SplitObject: zero allocations
Before / After:

    BenchmarkSplitObject-10        2785656    428.1 ns/op     416 B/op    13 allocs/op
    BenchmarkSplitObjectNew-10    13510520     88.2 ns/op       0 B/op     0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:05:10 +02:00
Sebastiaan van Stijn
799bca97f2
pkg/reference: Spec.String(): use string-concatenation instead of sprintf
These were straight concatenations of strings; reduce some allocations by
removing fmt.Sprintf for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-27 12:04:22 +02:00
Maksym Pavlenko
7a0687f6c8
Merge pull request #10354 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.9
build(deps): bump github.com/klauspost/compress from 1.17.8 to 1.17.9
2024-06-26 23:16:45 +00:00
Maksym Pavlenko
017e10de54
Merge pull request #10353 from containerd/dependabot/go_modules/github.com/checkpoint-restore/checkpointctl-1.2.1
build(deps): bump github.com/checkpoint-restore/checkpointctl from 1.2.0 to 1.2.1
2024-06-26 23:16:24 +00:00
Maksym Pavlenko
faf06a3ae2
Merge pull request #10381 from containerd/dependabot/go_modules/k8s-f351cbf957
build(deps): bump k8s.io/klog/v2 from 2.130.0 to 2.130.1 in the k8s group
2024-06-26 20:07:22 +00:00
Maksym Pavlenko
cf2f42edc1
Merge pull request #10382 from containerd/dependabot/go_modules/github.com/containerd/go-cni-1.1.10
build(deps): bump github.com/containerd/go-cni from 1.1.9 to 1.1.10
2024-06-26 19:22:19 +00:00
Maksym Pavlenko
8c39a5d127
Merge pull request #10383 from containerd/dependabot/go_modules/github.com/containernetworking/cni-1.2.2
build(deps): bump github.com/containernetworking/cni from 1.2.1 to 1.2.2
2024-06-26 19:22:02 +00:00
Maksym Pavlenko
686c36ba3c
Merge pull request #10385 from dmcgowan/metadata-transactor
Use the transactor interface in metadata
2024-06-26 19:21:41 +00:00
Phil Estes
5ec7e10d9f
Merge pull request #10242 from henry118/shim-pprof
Add pprof to runc-shim
2024-06-26 18:16:39 +00:00
Phil Estes
c673fcc9af
Merge pull request #10355 from containerd/dependabot/go_modules/google.golang.org/protobuf-1.34.2
build(deps): bump google.golang.org/protobuf from 1.34.1 to 1.34.2
2024-06-25 22:18:35 +00:00
dependabot[bot]
c097022a5a
build(deps): bump github.com/containernetworking/cni from 1.2.1 to 1.2.2
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.2.1...v1.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 21:42:38 +00:00
dependabot[bot]
14b053fb48
build(deps): bump github.com/containerd/go-cni from 1.1.9 to 1.1.10
Bumps [github.com/containerd/go-cni](https://github.com/containerd/go-cni) from 1.1.9 to 1.1.10.
- [Release notes](https://github.com/containerd/go-cni/releases)
- [Commits](https://github.com/containerd/go-cni/compare/v1.1.9...v1.1.10)

---
updated-dependencies:
- dependency-name: github.com/containerd/go-cni
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 21:41:45 +00:00
Derek McGowan
8f9607eed5
Use the transactor interface in metadata
The boltdb instance in metadata is only used for getting transactions
and can also be overriden via the context to have a wider control of the
transaction boundary. Using the transactor interface allows callers of
metadata to have more control of the transaction lifecycle.

Since boltdb must be fsync'ed on commit, operations which perform many
database operations can be costly and slow. While providing transactor
via context can be used to group together operations, it does not
provide a way to manage the commit fsyncs more globally.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-25 14:24:49 -07:00
Phil Estes
7ec5b967b3
Merge pull request #10356 from containerd/dependabot/go_modules/github.com/containernetworking/plugins-1.5.1
build(deps): bump github.com/containernetworking/plugins from 1.4.1 to 1.5.1
2024-06-25 20:57:13 +00:00
dependabot[bot]
2cf8237a13
build(deps): bump k8s.io/klog/v2 in the k8s group
Bumps the k8s group with 1 update: [k8s.io/klog/v2](https://github.com/kubernetes/klog).


Updates `k8s.io/klog/v2` from 2.130.0 to 2.130.1
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.130.0...v2.130.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 23:34:45 +00:00
dependabot[bot]
a2f9101aad
build(deps): bump github.com/containernetworking/plugins
Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 1.4.1 to 1.5.1.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](https://github.com/containernetworking/plugins/compare/v1.4.1...v1.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 19:03:57 +00:00
Maksym Pavlenko
c7f7fa5390
Merge pull request #10352 from containerd/dependabot/go_modules/github.com/containernetworking/cni-1.2.1
build(deps): bump github.com/containernetworking/cni from 1.2.0 to 1.2.1
2024-06-24 18:15:53 +00:00
dependabot[bot]
2304cd9d5c
build(deps): bump google.golang.org/protobuf from 1.34.1 to 1.34.2
Bumps google.golang.org/protobuf from 1.34.1 to 1.34.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 17:55:57 +00:00
Maksym Pavlenko
73422722f2
Merge pull request #10351 from containerd/dependabot/go_modules/k8s-1b02c00507
build(deps): bump k8s.io/klog/v2 from 2.120.1 to 2.130.0 in the k8s group
2024-06-24 17:13:18 +00:00
Derek McGowan
7310674902
Merge pull request #10217 from akhilerm/ubuntu-24
ci: enable ubuntu-24 runners
2024-06-24 15:41:13 +00:00
Phil Estes
14981b4bc0
Merge pull request #10366 from thaJeztah/api_update_deps
api: update github.com/containerd/ttrpc v1.2.5 to be aligned with containerd
2024-06-21 13:34:55 +00:00
dependabot[bot]
469f950260
build(deps): bump github.com/containernetworking/cni from 1.2.0 to 1.2.1
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.2.0...v1.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-21 02:03:58 +00:00
Akihiro Suda
9a94e9e78a
Merge pull request #10372 from thaJeztah/bump_ttrpc_1.2.5
vendor: github.com/containerd/ttrpc v1.2.5
2024-06-21 01:23:47 +00:00
Henry Wang
243b803a19 Add pprof to runc-shim
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-06-20 23:12:31 +00:00
Derek McGowan
8b5c218e5a
Merge pull request #10369 from thaJeztah/cmd_no_alias
cmd: don't alias context package, and use cliContext for cli.Context
2024-06-20 20:42:29 +00:00
Maksym Pavlenko
d7836cf9d8
Merge pull request #10370 from dmcgowan/metadata-godoc
Cleanup metadata godoc
2024-06-20 20:24:05 +00:00
Sebastiaan van Stijn
b323e9eec6
vendor: github.com/containerd/ttrpc v1.2.5
full diff: https://github.com/containerd/ttrpc/compare/v1.2.4...v1.2.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-20 16:57:02 +02:00
Sebastiaan van Stijn
cb38b1e2be
api: update github.com/containerd/ttrpc v1.2.5
Update the dependency and the indirect golang.org/x/net version to align
with containerd itself, and to prevent a vulnerability being detected.

We should keep the versions <= versions used by containerd 1.7 to prevent
forcing users of containerd 1.7 in combination with the latest version
of the API module from having to update all their dependencies, but
this update should likely be fine (and aligns with 1.7).

Before this:

    Scanning your code and 254 packages across 15 dependent modules for known vulnerabilities...

    === Symbol Results ===

    Vulnerability #1: GO-2024-2687
        HTTP/2 CONTINUATION flood in net/http
      More info: https://pkg.go.dev/vuln/GO-2024-2687
      Module: golang.org/x/net
        Found in: golang.org/x/net@v0.21.0
        Fixed in: golang.org/x/net@v0.23.0
        Example traces found:
          #1: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.ConnectionError.Error
          #2: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.ErrCode.String
          #3: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.FrameHeader.String
          #4: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.FrameType.String
          #5: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.Setting.String
          #6: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.SettingID.String
          #7: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.StreamError.Error
          #8: services/content/v1/content_ttrpc.pb.go:272:35: content.ttrpccontentClient.Write calls ttrpc.Client.NewStream, which eventually calls http2.chunkWriter.Write
          #9: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.connError.Error
          #10: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.duplicatePseudoHeaderError.Error
          #11: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.headerFieldNameError.Error
          #12: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.headerFieldValueError.Error
          #13: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.pseudoHeaderError.Error
          #14: events/task_fieldpath.pb.go:85:20: events.TaskIO.Field calls fmt.Sprint, which eventually calls http2.writeData.String

    Your code is affected by 1 vulnerability from 1 module.
    This scan also found 0 vulnerabilities in packages you import and 3
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.
    Use '-show verbose' for more details.

After this:

    govulncheck ./...
    Scanning your code and 251 packages across 13 dependent modules for known vulnerabilities...

    === Symbol Results ===

    No vulnerabilities found.

    Your code is affected by 0 vulnerabilities.
    This scan also found 0 vulnerabilities in packages you import and 3
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.
    Use '-show verbose' for more details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-20 16:53:50 +02:00
Derek McGowan
2f1bf791b9
Cleanup metadata godoc
The godoc should properly show the formatting of the database
structure and sections explaining it.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-19 20:16:57 -07:00
Akhil Mohan
9077968119
update release runners to ubuntu 24.04
update all runners except the binary building job to ubuntu-24.04

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-20 07:07:18 +05:30
Sebastiaan van Stijn
dd0542f7c1
cmd: don't alias context package, and use cliContext for cli.Context
Unfortunately, this is a rather large diff, but perhaps worth a one-time
"rip off the bandaid" for v2. This patch removes the use of "gocontext"
as alias for stdLib's "context", and uses "cliContext" for uses of
cli.context.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-20 02:15:13 +02:00
Akhil Mohan
c25183ff19
use older version of OVMF package
use ovmf 2022.02-3ubuntu0.22.04.2 so that the OVMF_CODE.fd which vagrant
looks for is still available

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-19 22:28:03 +05:30
Akhil Mohan
1bfdccee09
use vagrant from jammy in noble
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-19 02:26:02 +05:30
Akhil Mohan
769e0c8c16
add debian sources for ubuntu-24
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-19 00:07:28 +05:30
Akhil Mohan
624aa49d4b
increase xfs base image size to 300Mb
from xfsprogs 5.19.0, minimum size of xfs volume has to be 300MB

Ref: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/commit/?id=6e0ed3d19c54603f0f7d628ea04b550151d8a262
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-19 00:07:27 +05:30
Akhil Mohan
027414ee50
enable ubuntu 24 runners
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-19 00:07:27 +05:30
Fu Wei
741c4bde51
Merge pull request #10350 from dmcgowan/gha-stale-permissions
Reduce scope of permissions in stale workflow
2024-06-18 05:50:28 +00:00
dependabot[bot]
9edde81067
build(deps): bump github.com/klauspost/compress from 1.17.8 to 1.17.9
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.8 to 1.17.9.
- [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.8...v1.17.9)

---
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-06-18 00:02:13 +00:00
dependabot[bot]
becb2b2d3a
build(deps): bump github.com/checkpoint-restore/checkpointctl
Bumps [github.com/checkpoint-restore/checkpointctl](https://github.com/checkpoint-restore/checkpointctl) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/checkpoint-restore/checkpointctl/releases)
- [Commits](https://github.com/checkpoint-restore/checkpointctl/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/checkpoint-restore/checkpointctl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 00:01:54 +00:00
dependabot[bot]
f6f655ccfe
build(deps): bump k8s.io/klog/v2 in the k8s group
Bumps the k8s group with 1 update: [k8s.io/klog/v2](https://github.com/kubernetes/klog).


Updates `k8s.io/klog/v2` from 2.120.1 to 2.130.0
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.120.1...v2.130.0)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 00:01:25 +00:00
Derek McGowan
531da99606
Reduce scope of permissions in stale workflow
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-17 12:04:15 -07:00
Maksym Pavlenko
e030f952ac
Merge pull request #10340 from containerd/dependabot/go_modules/k8s-e19d883663
build(deps): bump the k8s group across 1 directory with 4 updates
2024-06-17 17:49:28 +00:00
Derek McGowan
4770618c7b
Merge pull request #10349 from thaJeztah/less_logrus
Remove some logrus imports
2024-06-17 17:42:29 +00:00
Fu Wei
0975ec0908
Merge pull request #10342 from dmcgowan/add-mutex-fallback-host
Adds a mutex to protect fallback host
2024-06-17 13:13:57 +00:00
Sebastiaan van Stijn
ed64e6503a
core/mount: remove logrus import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-17 12:40:18 +02:00
Sebastiaan van Stijn
ea8265fb1e
core/transfer/local: remove logrus import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-17 12:37:14 +02:00
Sebastiaan van Stijn
75fd7a5a7f
pkg/shim: remove logrus imports
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-17 12:35:36 +02:00
Maksym Pavlenko
ab61734e3d
Merge pull request #10231 from jedevc/add-get-token-span
auth: add span to FetchToken helpers
2024-06-14 19:33:52 +00:00
Maksym Pavlenko
8f4a282ab3
Merge pull request #10337 from Kern--/proxy-capabilities
Allow proxy plugins to have capabilities
2024-06-14 19:24:32 +00:00
Amit Barve
fe5f85c7de Fix incorrect comment about ordering of parent layers
The ParentIDs array in the Snapshot type is populated in the reverse order i.e the
immediate parent is at the 0th index and the oldest parent is at the last index. It can be
seen here:
https://github.com/containerd/containerd/blob/main/core/snapshots/storage/bolt.go#L492
When applying these layers, the parent layer at the last index should be applied first and
the parent layer at the 0th index should be applied last. However, the comment above the
Snapshot type says the exact opposite thing.  This commit fixes that comment.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2024-06-14 11:48:06 -07:00
Derek McGowan
4d48204a3d
Merge pull request #10341 from thaJeztah/cleanup_traces
pkg/tracing: remove direct use of logrus, and fix some linting issues
2024-06-14 17:48:11 +00:00
Derek McGowan
38e2f00382
Adds a mutex to protect fallback host
Race detector complains about concurrent access such as with Dispatch on
push.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-14 10:43:39 -07:00
Derek McGowan
27de5fea73
Merge pull request #10331 from dmcgowan/prepare-v2.0.0-rc.3
Prepare v2.0.0-rc.3 release
2024-06-14 06:21:27 -07:00
Sebastiaan van Stijn
587ee80f61
pkg/tracing: LogrusHook.Fire: micro-optimisation
Check span.IsRecording first, as it's a more lightweight check than
span.SpanContext().IsValid()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 12:12:22 +02:00
Sebastiaan van Stijn
ccf7938126
pkg/tracing: remove direct use of github.com/sirupsen/logrus
While the hook is intended to be used with logrus, we don't need to have
the direct import; use the aliases provided by the containerd/log module
instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 12:08:51 +02:00
Sebastiaan van Stijn
4203e2de8d
pkg/tracing/plugin: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 11:57:27 +02:00
Sebastiaan van Stijn
e2e09b384a
pkg/tracing: rename func that shadowed builtin, rm makeSpanName
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-14 11:56:06 +02:00
Abel Feng
15887d7efc sandbox: add update api for controller
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-06-14 02:31:51 +00:00
dependabot[bot]
e69ad94421
build(deps): bump the k8s group across 1 directory with 4 updates
Bumps the k8s group with 4 updates in the / directory: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go), [k8s.io/component-base](https://github.com/kubernetes/component-base) and [k8s.io/kubelet](https://github.com/kubernetes/kubelet).


Updates `k8s.io/apimachinery` from 0.30.0 to 0.30.2
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.30.0...v0.30.2)

Updates `k8s.io/client-go` from 0.30.0 to 0.30.2
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.30.0...v0.30.2)

Updates `k8s.io/component-base` from 0.30.0 to 0.30.2
- [Commits](https://github.com/kubernetes/component-base/compare/v0.30.0...v0.30.2)

Updates `k8s.io/kubelet` from 0.30.0 to 0.30.2
- [Commits](https://github.com/kubernetes/kubelet/compare/v0.30.0...v0.30.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/kubelet
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-13 18:32:12 +00:00
Akihiro Suda
e49d3fd1bc
Merge pull request #10334 from thaJeztah/bump_runc_1.1.13
update runc binary to v1.1.13
2024-06-13 17:47:12 +00:00
harshitasao
0f76e35fd5 added the openssf scorecard badge
Signed-off-by: harshitasao <harshitasao@gmail.com>
2024-06-13 22:59:43 +05:30
Kern Walster
5b8dfbd111 Allow proxy plugins to have capabilities
Signed-off-by: Kern Walster <walster@amazon.com>
2024-06-13 17:13:57 +00:00
Mike Brown
98ebb3ecff
Merge pull request #9737 from everpeace/kep-3169-SupplementalGroupsPolicy
KEP-3619: Fine-grained SupplementalGroups control
2024-06-13 16:59:20 +00:00
Sebastiaan van Stijn
cc2cedae06
Revert "install-runc: pin Go to 1.21"
Now that we're on runc v1.1.13, we no longer need to pin the
go version fo runc to go1.21

This reverts commit fef78c1024.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-13 18:38:31 +02:00
Sebastiaan van Stijn
3c097352af
update runc binary to v1.1.13
full diff: https://github.com/opencontainers/runc/compare/v1.1.12...v1.1.13

Release notes:

* If building with Go 1.22.x, make sure to use 1.22.4 or a later version.

* Support go 1.22.4+.
* runc list: fix race with runc delete.
* Fix set nofile rlimit error.
* libct/cg/fs: fix setting rt_period vs rt_runtime.
* Fix a debug msg for user ns in nsexec.
* script/*: fix gpg usage wrt keyboxd.
* CI fixes and misc backports.
* Fix codespell warnings.

* Silence security false positives from golang/net.
* libcontainer: allow containers to make apps think fips is enabled/disabled for testing.
* allow overriding VERSION value in Makefile.
* Vagrantfile.fedora: bump Fedora to 39.
* ci/cirrus: rm centos stream 8.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-13 18:38:25 +02:00
Derek McGowan
8c13ed1b8e
Prepare v2.0.0-rc.3 release
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-12 21:52:37 -07:00
Fu Wei
c75f6d404d
Merge pull request #10323 from siretart/debian/bug.1044768
Allow running test in usernamespace
2024-06-13 03:43:09 +00:00
Fu Wei
a60edaf24c
Merge pull request #10330 from AkihiroSuda/remove-pkg-seed
Remove pkg/seed
2024-06-13 01:25:59 +00:00
Akihiro Suda
86b8a88241
Remove pkg/seed
Since Go 1.20, math/rand does not need explicit seeding:
https://go.dev/doc/go1.20#minor_library_changes

Go <= 1.19 is no longer supported due to EOL.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-06-13 08:50:28 +09:00
Maksym Pavlenko
e4c61fd33f
Merge pull request #10319 from containerd/dependabot/go_modules/golang-x-ba92570477
build(deps): bump the golang-x group with 2 updates
2024-06-12 17:45:20 +00:00
Fu Wei
0de7043c3a
Merge pull request #10322 from thaJeztah/bump_platforms
vendor: github.com/containerd/platforms v0.2.1
2024-06-12 14:47:28 +00:00
Reinhard Tartler
09d3e20d3a Allow running test in usernamespace
Debian has started building packages with usernamespaces
to disable network access and similar isolation features. The
containerd package executes a unit test that fails in that
scenario, see https://bugs.debian.org/1070411

The code contains a conditional on whether it is running in
usernamepsace. This commit expands the unit test to cover
this behavior; it was previously untested.

The easiest way to reproduce this issue is to prefix the test
invocaiton with 'unshare -nr go test [...]'

Signed-off-by: Reinhard Tartler <siretart@gmail.com>
2024-06-12 00:36:54 +00:00
Shingo Omura
8bcffa9446
KEP-3619: Fine grained SupplementalGroups control
Signed-off-by: Shingo Omura <everpeace@gmail.com>
2024-06-12 09:10:40 +09:00
Sebastiaan van Stijn
87dd4309db
vendor: github.com/containerd/platforms v0.2.1
- Remove hcsshim import from repo
    - un-exports GetOsVersion
- Update windows matcher to not compare empty os version

full diff: https://github.com/containerd/platforms/compare/v0.2.0...v0.2.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-12 00:54:03 +02:00
Maksym Pavlenko
e840d1d9cc
Merge pull request #10286 from dmcgowan/update-tls-fallback-default-ports
Allow fallback across default ports
2024-06-11 17:11:42 +00:00
Maksym Pavlenko
9c4ca8676b
Merge pull request #10320 from containerd/dependabot/go_modules/github.com/checkpoint-restore/checkpointctl-1.2.0
build(deps): bump github.com/checkpoint-restore/checkpointctl from 1.1.0 to 1.2.0
2024-06-11 17:10:49 +00:00
Maksym Pavlenko
8247b5755a
Merge pull request #10321 from ktock/ctr-local-flag-deps
ctr: return explicit errors for flags unsupported by transfer service
2024-06-11 17:10:28 +00:00
Derek McGowan
3debabbccd
Merge pull request #10324 from ktock/golangci-lint-1.59.1
CI:  bump up golangci-lint to v1.59.1
2024-06-11 13:13:19 +00:00
Kohei Tokunaga
939135ae36
CI: golangci-lint v1.59.1
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-06-11 20:17:35 +09:00
Kohei Tokunaga
df7f6ba5b9
ctr: return explicit errors for flags unsupported by transfer service
ctr currently silently ignores several flags by default (without --local) and
the user can't know which flags are supported until they see the code.
This commit fixes ctr to return an explicit error when it finds an unsupported
flag.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-06-11 12:08:47 +09:00
dependabot[bot]
686a610ee7
build(deps): bump github.com/checkpoint-restore/checkpointctl
Bumps [github.com/checkpoint-restore/checkpointctl](https://github.com/checkpoint-restore/checkpointctl) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/checkpoint-restore/checkpointctl/releases)
- [Commits](https://github.com/checkpoint-restore/checkpointctl/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/checkpoint-restore/checkpointctl
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 23:34:36 +00:00
dependabot[bot]
156458e544
build(deps): bump the golang-x group with 2 updates
Bumps the golang-x group with 2 updates: [golang.org/x/mod](https://github.com/golang/mod) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/mod` from 0.17.0 to 0.18.0
- [Commits](https://github.com/golang/mod/compare/v0.17.0...v0.18.0)

Updates `golang.org/x/sys` from 0.20.0 to 0.21.0
- [Commits](https://github.com/golang/sys/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 23:34:26 +00:00
Samuel Karp
4a18adcfca
Merge pull request #10304 from AkihiroSuda/ci-add-back-rocky8
CI: add back EL 8
2024-06-10 16:50:15 +00:00
Akihiro Suda
08c1e12e9b
CI: add back EL 8
Add back EL 8 to test legacy compatibility

Follow-up to PR 10297

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-06-08 19:50:39 +09:00
Maksym Pavlenko
378a502fb2
Merge pull request #10310 from kiashok/update-hcsshim-0.12.4
Update hcsshim tag to 0.12.4
2024-06-07 18:40:32 +00:00
Kirtana Ashok
149ca6880a Update hcsshim tag to 0.12.4
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-06-07 07:47:01 -07:00
Maksym Pavlenko
45bc430dd1
Merge pull request #10294 from dmcgowan/fail-integration-test-on-plugin-fail
Fail integration test early when a plugin load fails
2024-06-06 00:44:04 +00:00
Derek McGowan
b1a23c495a
Fail integration test early when a plugin load fails
Avoid running tests when a plugin fails to load and return the init
error from the plugin. This prevents the test failing later with an
unhelpful error and attempting to find the actual error in the daemon
logs.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-05 16:58:03 -07:00
Derek McGowan
d23c4b8b53
Use unix and windows specific connection error checks
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-05 14:39:57 -07:00
Derek McGowan
02b6c6939f
Allow fallback across default ports
When no port is specified, allow falling back from 443 to 80 when
http is specified along with a TLS configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-05 14:39:57 -07:00
Maksym Pavlenko
34d3c17ae2
Merge pull request #10291 from ktock/push-platform-conf
Transfer: Push: Enable to specify platforms
2024-06-05 21:28:09 +00:00
Maksym Pavlenko
4c2737939e
Merge pull request #10293 from containerd/dependabot/go_modules/github.com/containerd/containerd/api-1.8.0-rc.2
build(deps): bump github.com/containerd/containerd/api from 1.8.0-rc.0 to 1.8.0-rc.2
2024-06-05 21:26:49 +00:00
dependabot[bot]
80ce8bd612
build(deps): bump github.com/containerd/containerd/api
Bumps [github.com/containerd/containerd/api](https://github.com/containerd/containerd) from 1.8.0-rc.0 to 1.8.0-rc.2.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/api/v1.8.0-rc.0...api/v1.8.0-rc.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-05 08:09:12 +00:00
Fu Wei
d4148d94cc
Merge pull request #10302 from ktock/ctr-pull-label
ctr: pull: Do not ignore labels when transfer service is used
2024-06-05 06:06:11 +00:00
Kohei Tokunaga
cde2527fce
ctr: pull: Do not ignore labels when transfer service is used
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-06-05 12:26:00 +09:00
Samuel Karp
222db53917
Merge pull request #10296 from dmcgowan/update-go-1.22.4
Update Go version to 1.22.4
2024-06-04 23:48:30 +00:00
Derek McGowan
1c123efb41
Update Go version to 1.22.4
Includes fix for a symlink race on remove.
Updates 1.21 to 1.21.11 for runc install which also includes the
symlink fix.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-04 15:46:09 -07:00
Derek McGowan
6005d839be
Merge pull request #10297 from dmcgowan/update-rockylinux-vagrant
Update rockylinux vagrant build
2024-06-04 15:45:23 -07:00
Derek McGowan
e1e793e4ab
Update rockylinux vagrant build
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-04 14:38:12 -07:00
Kohei Tokunaga
5611fdd4af
Transfer: Push: Enable to specify platforms
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-06-04 10:02:13 +09:00
Maksym Pavlenko
1369112514
Merge pull request #10287 from ktock/transfer-push-dup
Transfer: Push: fix failure on pushing duplicated blobs
2024-06-04 00:11:56 +00:00
Derek McGowan
5d6a94a54c
Merge pull request #10243 from dmcgowan/update-shim-manager-config
Cleanup shim manager configuration
2024-06-03 17:22:36 +00:00
Kohei Tokunaga
0e8cc91463
Transfer: Push: fix failure on pushing duplicated blobs
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-05-31 18:08:45 +09:00
Fu Wei
21c244d436
Merge pull request #10274 from fuweid/fix-10228
*: export RemoveVolatileOption for CRI image volumes
2024-05-30 21:52:49 +00:00
Wei Fu
4123170a39 *: export RemoveVolatileOption for CRI image volumes
Remove volatile option when CRI prepares image volumes.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-05-30 09:56:37 +08:00
Derek McGowan
eb8b3de9d3
Merge pull request #10264 from austinvazquez/disable-make-latest
Explicitly set release latest to false
2024-05-29 21:56:20 +00:00
Maksym Pavlenko
080d35b9ea
Merge pull request #10279 from dmcgowan/api-type-alias-envelope
Add type alias for event Envelope
2024-05-29 20:47:53 +00:00
Derek McGowan
3e71ccafc4
Add type alias for event Envelope
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-29 11:10:57 -07:00
Maksym Pavlenko
a5ba3b70b3
Merge pull request #10276 from dmcgowan/api-minimum-go-version
Update api minimum Go version to 1.21
2024-05-29 17:31:14 +00:00
Akihiro Suda
1529259077
Merge pull request #10275 from dmcgowan/imgcrypt-revendor
Re-enable imgcrypt
2024-05-29 16:54:47 +00:00
Fu Wei
5d2c988a5a
Merge pull request #10201 from abel-von/retry-remote-sandbox-wait
sandbox: do retry for wait to remote sandbox controller
2024-05-29 00:00:29 +00:00
Derek McGowan
da1d9672f6
Enable imgcrypt in cri pull
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-28 13:50:06 -07:00
Derek McGowan
9857afda44
Add vendor for github.com/containerd/imgcrypt
Updates to version using containerd v2.0.0-rc

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-28 13:49:34 -07:00
Derek McGowan
359d84351d
Update api minimum go version to 1.21
A higher go build version is not required for the API

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-28 13:05:03 -07:00
Maksym Pavlenko
6383a1ce76
Merge pull request #10258 from bzsuni/bz/update/pause
update pause image to 3.10
2024-05-28 18:01:23 +00:00
Samuel Karp
e32090e044
Merge pull request #10273 from thaJeztah/remove_use_of_platform_alias
remove uses of platforms.Platform alias
2024-05-28 17:29:40 +00:00
Sebastiaan van Stijn
446e63579c
remove uses of platforms.Platform alias
Commit 3c8469a782 removed uses of the api
types.Platform type from public interfaces, instead using the type from
the OCI image spec.

For convenience, it also introduced an alias in the platforms package.
While this alias allows packages that already import containerd's
platforms package (now a separate module), it may also cause confusion
(it's not clear that it's an alias for the OCI type), and for packages
that do not depend on containerd's platforms package / module may now
be resulting in an extra dependency.

Let's remove the use of this alias, and instead use the OCI type directly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-28 14:56:30 +02:00
Austin Vazquez
2d73340c2c
Explicitly set release latest to false
This change explicitly sets mainline releases as not latest.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-05-25 15:27:48 +00:00
bzsuni
22f2af40c0 update pause image to 3.10
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-05-25 08:17:46 +08:00
Derek McGowan
45e30913bc
Merge pull request #10257 from akhilerm/fix-unknown-platform
core/image: fix usage of "unknown" platform
2024-05-23 21:23:18 +00:00
Akhil Mohan
65024e6fd1
core/image: fix usage of "unknown" platform
"unknown" should not be returned as a valid platform
supported by the image

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-05-23 16:35:44 +05:30
Derek McGowan
ca59fb0b41
Cleanup shim manager configuration
Keep platforms configuration on task manager and add environment config
for shims.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-22 11:06:53 -07:00
Akihiro Suda
ccc41e6705
Merge pull request #10251 from mxpv/runtime
Provide runtime options in plugin info
2024-05-21 20:34:34 +00:00
Maksym Pavlenko
8b30607170 Provide runtime options in plugin info
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-05-21 11:15:23 -07:00
Mike Brown
87bab6cdc7
Merge pull request #10238 from MikeZappa87/feature/provideinternalloup
Add support to set loopback to up
2024-05-20 14:19:43 +00:00
Michael Zappa
332caf1a15 Provide ability to set lo up without CNI
Signed-off-by: Michael Zappa <michael.zappa@gmail.com>
2024-05-17 14:34:55 -06:00
Derek McGowan
28b77e33ad
Merge pull request #10240 from dmcgowan/prepare-v2.0.0-rc.2
Prepare release notes for v2.0.0-rc.2
2024-05-17 18:31:30 +00:00
Kazuyoshi Kato
24c2ae8115
Merge pull request #10026 from ningmingxiao/info_exited_event
internal/cri: log ctr's exit event on info level
2024-05-17 01:28:43 +00:00
Kazuyoshi Kato
ff66ec7a73
Merge pull request #10105 from fidencio/topic/fix-typos-in-image_pull_test.go
images: tests: Fix typos in the tests
2024-05-17 01:27:46 +00:00
Derek McGowan
288f0592e5
Prepare release notes for v2.0.0-rc.2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-16 17:41:52 -07:00
Maksym Pavlenko
90a8667310
Merge pull request #10190 from abel-von/fix-streaming-io-path
fix: modify streaming io url and add docs of sandboxer and io_type
2024-05-16 19:57:27 +00:00
Maksym Pavlenko
4fa8ce9d30
Merge pull request #10075 from ZhangShuaiyi/fix/docs
docs: update registry config guide
2024-05-16 19:42:21 +00:00
Justin Chadwell
9831a62d72 auth: add span to FetchToken helpers
Before this, during a call to the docker resolver, we would generate
span wrappers for each HTTPRequest correctly, however, as the docker
resolver reaches out to the docker authorizer, it could create HTTP
requests (for fetching tokens) that would not be wrapped in any span.

This can result in rather confusing traces, e.g. something like:

	remotes.docker.resolver.HTTPRequest
		HTTP HEAD (fetch index, fails with 401)
	HTTP GET (fetch token)
	remotes.docker.resolver.HTTPRequest
		HTTP HEAD (fetch index)
	remotes.docker.resolver.HTTPRequest
		HTTP GET (fetch manifest)

By adding a span into the FetchToken, this trace becomes a little easier
to consume:

	remotes.docker.resolver.HTTPRequest
		HTTP HEAD (fetch index, fails with 401)
	remotes.docker.resolver.FetchToken
		HTTP GET (fetch token)
	remotes.docker.resolver.HTTPRequest
		HTTP HEAD (fetch index)
	remotes.docker.resolver.HTTPRequest
		HTTP GET (fetch manifest)

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-05-15 15:54:37 +01:00
Maksym Pavlenko
a673c3452a
Merge pull request #10222 from containerd/dependabot/github_actions/ossf/scorecard-action-2.3.3
build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3
2024-05-14 16:13:17 +00:00
Maksym Pavlenko
112ba8396d
Merge pull request #10224 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.19.1
build(deps): bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1
2024-05-14 16:12:53 +00:00
Phil Estes
c518783b3d
Merge pull request #10223 from containerd/dependabot/github_actions/golangci/golangci-lint-action-6
build(deps): bump golangci/golangci-lint-action from 5 to 6
2024-05-14 14:55:15 +00:00
Phil Estes
bef778aff3
Merge pull request #10220 from kiashok/update-ttrpc-tag
Update ttrpc tag to 1.2.4
2024-05-14 13:51:54 +00:00
dependabot[bot]
f24a951854
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [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.19.0...v1.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-14 00:03:06 +00:00
dependabot[bot]
8b2a69c19a
build(deps): bump golangci/golangci-lint-action from 5 to 6
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 23:54:52 +00:00
dependabot[bot]
96ff18d37c
build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...dc50aa9510)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-13 23:54:50 +00:00
Kirtana Ashok
1cae3dc9b7 update ttrpc to 1.2.4
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-05-13 16:13:26 -07:00
Maksym Pavlenko
536608ef22
Merge pull request #10218 from kiashok/update-platform-pkg
Update platforms package to v0.2.0
2024-05-13 23:09:49 +00:00
Derek McGowan
1bed3e90f2
Merge pull request #10219 from estesp/update-fuzz-instrument
Update instrumentation fuzzer with new flag
2024-05-13 16:09:07 -07:00
Phil Estes
e2251f9487
Update instrumentation fuzzer with new flag
Signed-off-by: Phil Estes <estesp@gmail.com>
2024-05-13 16:56:24 -04:00
Kirtana Ashok
ef76a90e95 Update platforms package to v0.2.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-05-13 10:27:42 -07:00
Abel Feng
0b113d78d4 doc: add the description of sandboxer and io_type
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-13 17:42:58 +08:00
Abel Feng
7cead88004 cri: restart created container with correct io type
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-13 17:42:58 +08:00
Abel Feng
42f778fc14 modify streaming io url form
sandbox address should be in the form of
<ttrpc|grpc>+<unix|vsock|hvsock>://<uds-path|vsock-cid:vsock-port|uds-path:hvsock-port>
for example: ttrpc+hvsock:///run/test.hvsock:1024
or: grpc+vsock://1111111:1024
and the Stdin/Stdout/Stderr will add a `streaming_id` as a parameter of the url
result form is:
<ttrpc|grpc>+<unix|vsock|hvsock>://<uds-path|vsock-cid:vsock-port|uds-path:hvsock-port>?streaming_id=<stream-id>
for example ttrpc+hvsock:///run/test.hvsock:1024?streaming_id=111111
or grpc+vsock://1111111:1024?streaming_id=222222

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-13 17:42:51 +08:00
Maksym Pavlenko
29a6ab8261
Merge pull request #10202 from dmcgowan/unpack-fetch-all
Unpack fetch all
2024-05-11 20:17:27 +00:00
Akihiro Suda
76895c4a31
Merge pull request #10200 from swagatbora90/preserve-unprivileged-flags
Preserve Unprivileged locked flags during remount of bind mounts
2024-05-10 21:21:31 +00:00
Derek McGowan
2a54da04cd
Merge pull request #10206 from austinvazquez/update-golang-toolchain-to-1.22.3
Update tooling to Go 1.22.3 for net/http bug fixes
2024-05-10 18:54:26 +00:00
Austin Vazquez
25c2f690a8
Update toolchain to Go 1.22.3
Go 1.22.3 release includes bug fixes for the core net/http package.

Full release notes: https://go.dev/doc/devel/release#go1.22.minor

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-05-10 15:49:18 +00:00
Derek McGowan
681a083fab
Update unpacker to always fetch all
When a set of layers are provided to the unpacker, then the unpacker
should still fetch them regardless of whether they will be used for
unpack. The image handler filters are responsible for removing content
which is not intended to be fetched. Currently there is no way to use an
unpacker and also fetch all platforms.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-09 21:59:42 -07:00
Derek McGowan
2788604e49
Update ctr image pull all platforms
Allows supporting fetching of all platforms while unpacking for a subset
of platforms.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-09 20:48:38 -07:00
Abel Feng
58be881890 sandbox: do retry for wait to remote sandbox controller
remote sandbox controller may restart, the Wait call should be retried
if it is an grpc disconnetion error.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-10 10:18:42 +08:00
Swagat Bora
0597317759 Preserve CL_UNPRIVILEGED locked flags during remount of bind mounts
Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-05-10 00:31:21 +00:00
Maksym Pavlenko
b168147ca8
Merge pull request #10193 from henry118/shim-sock
fix: delete sockets on shim exit
2024-05-09 05:06:41 +00:00
Akihiro Suda
cb6fb0b2f9
Merge pull request #10194 from mxpv/queue
Don't require vagrant tests in merge queues
2024-05-09 01:02:05 +00:00
Maksym Pavlenko
9a9a8c46a6 Don't require vagrant tests in merge queues
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-05-08 15:41:41 -07:00
Maksym Pavlenko
a8e921ad06
Merge pull request #10175 from dcantah/swap-to-newclient-grpc
Integration: Change to grpc.NewClient
2024-05-08 22:26:08 +00:00
Maksym Pavlenko
f690928709
Merge pull request #10187 from dmcgowan/metadata-add-lease-on-prepare
Update metadata snapshotter to lease on already exists
2024-05-08 22:25:11 +00:00
Henry Wang
d9dc2811ae fix: delete sockets on shim exit
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-05-08 21:53:39 +00:00
Phil Estes
d2f160701a
Merge pull request #10188 from ktock/golangci-lint-1.58
CI: bump up golangci-lint to v1.58.0
2024-05-08 21:36:49 +00:00
Kohei Tokunaga
41dc94ee17
CI: bump up golangci-lint to v1.58.0
This also fixes the following warnings:

```
WARN [config_reader] The configuration option `run.skip-dirs` is deprecated, please use `issues.exclude-dirs`.
WARN [lintersdb] The name "vet" is deprecated. The linter has been renamed to: govet.
```

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-05-08 12:09:30 +09:00
Danny Canter
9ecfac7f6a Integration: Change to grpc.NewClient
Fun times: In grpc 1.63 grpc.Dial and a few of the options we use (WithBlock) are
deprecated in favor of the no-IO variant NewClient. The uses in the integration tests
should be easy to swap however as they don't use WithBlock anyways, so that's what this
change aims to do. This also removes some context.WithTimeout's as I don't see anywhere
the context is actually used in Dial if you don't also specify WithBlock (and it's
especially not used now with NewClient as it doesn't even take in a context).

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-05-07 17:13:15 -07:00
Derek McGowan
8c6183d749
Add lease test for metadata snapshotter
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-07 16:53:20 -07:00
Akihiro Suda
bfdc224861
Merge pull request #9920 from AkihiroSuda/cri-tools-20240304
critools-version: v1.30.0
2024-05-07 21:27:53 +00:00
Derek McGowan
c7fb8a9255
Update metadata snapshotter to lease on exists
Currently the metadata snapshotter is not consistently adding keys to a
lease when already exists is returned. When a lease is provided, any
already exists errors should add the relevant key to the lease. It is
not expected that clients must explicitly lease a key after calling
Prepare/Commit.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-07 11:27:05 -07:00
Derek McGowan
a993add92e
Merge pull request #10184 from containerd/dependabot/go_modules/google.golang.org/protobuf-1.34.1
build(deps): bump google.golang.org/protobuf from 1.33.0 to 1.34.1
2024-05-07 17:53:47 +00:00
Fu Wei
313fc12b8a
Merge pull request #9965 from abel-von/streaming-io
cri: support io by streaming API
2024-05-07 14:22:12 +00:00
Phil Estes
c5f538c4c4
Merge pull request #10147 from containerd/dependabot/github_actions/lycheeverse/lychee-action-1.10.0
build(deps): bump lycheeverse/lychee-action from 1.9.3 to 1.10.0
2024-05-07 14:21:21 +00:00
Abel Feng
b8dfb4d8f5 cri: support io by streaming api
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-07 20:26:40 +08:00
Wei Fu
3b065cdddb
CI: skip test in arm64 CI
Co-authored-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-05-07 21:24:28 +09:00
Akihiro Suda
6c3c5376fc
critools-version: v1.30.0
Pulls in kubernetes-sigs/cri-tools PR 1344 (`KEP-3857: Recursive Read-only (RRO) mounts`)
to test PR 9787

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-05-07 21:23:51 +09:00
Akihiro Suda
45b49487e5
Merge pull request #10183 from containerd/dependabot/go_modules/go.etcd.io/bbolt-1.3.10
build(deps): bump go.etcd.io/bbolt from 1.3.9 to 1.3.10
2024-05-07 05:07:15 +00:00
dependabot[bot]
b488e76db6
build(deps): bump google.golang.org/protobuf from 1.33.0 to 1.34.1
Bumps google.golang.org/protobuf from 1.33.0 to 1.34.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 04:55:53 +00:00
Maksym Pavlenko
cd7825da08
Merge pull request #9883 from abel-von/modify-sandbox-client
sandbox: modify sandbox client
2024-05-07 04:16:57 +00:00
Maksym Pavlenko
c0e34fb7c8
Merge pull request #10174 from dcantah/simplify-errs
Chore: Simplify some syscall error checks
2024-05-07 03:32:49 +00:00
Akihiro Suda
e151b4d054
Merge pull request #10182 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.2.2
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2
2024-05-07 03:17:41 +00:00
Akihiro Suda
6e9273c466
Merge pull request #10181 from containerd/dependabot/go_modules/golang-x-1f871509c5
build(deps): bump golang.org/x/sys from 0.19.0 to 0.20.0 in the golang-x group
2024-05-07 03:17:18 +00:00
dependabot[bot]
a6e417dc63
build(deps): bump go.etcd.io/bbolt from 1.3.9 to 1.3.10
Bumps [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt) from 1.3.9 to 1.3.10.
- [Release notes](https://github.com/etcd-io/bbolt/releases)
- [Commits](https://github.com/etcd-io/bbolt/compare/v1.3.9...v1.3.10)

---
updated-dependencies:
- dependency-name: go.etcd.io/bbolt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 23:16:38 +00:00
dependabot[bot]
4401c3cb7e
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 23:16:30 +00:00
dependabot[bot]
42e02c6c0b
build(deps): bump golang.org/x/sys in the golang-x group
Bumps the golang-x group with 1 update: [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/sys` from 0.19.0 to 0.20.0
- [Commits](https://github.com/golang/sys/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 23:16:18 +00:00
Maksym Pavlenko
c30ac85477
Merge pull request #10176 from akhilerm/remove-go-1.21
remove go1.21.9 from CI matrix
2024-05-06 22:36:08 +00:00
Maksym Pavlenko
7686062c4e
Merge pull request #10178 from dmcgowan/update-api-1.8-0-rc.0
Update containerd api to v1.8.0-rc.0
2024-05-06 19:45:23 +00:00
Phil Estes
04c7d6ccbf
Merge pull request #9960 from adrianreber/2024-03-12-criu-not-found
Return correct error if CRIU binary is missing
2024-05-06 19:41:38 +00:00
Maksym Pavlenko
6c72ad9565
Merge pull request #10171 from fuweid/follow-up-10158
core/metadata: failfast on content.Commit
2024-05-06 19:23:52 +00:00
Derek McGowan
88b52119ce
Update api version to v1.8.0-rc.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-06 11:11:52 -07:00
Derek McGowan
1c9c64f316
Update release procedure to mention api replace
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-06 11:11:52 -07:00
Derek McGowan
e69efd56d6
Add go mod replace when proto changes happen
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-06 11:03:07 -07:00
Abel Feng
678137199a sandbox: remove PID() in sandbox client
which is not used and for some sandbox implementation, we may not get
the pid of a sandbox.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-05-07 00:51:33 +08:00
Maksym Pavlenko
114ef75833
Merge pull request #10169 from AkihiroSuda/crun-1.15
CI: bump up crun to 1.15
2024-05-06 16:12:47 +00:00
Derek McGowan
cc4d86922b
Merge pull request #10167 from dmcgowan/prepare-api-1.8.0
Prepare release notes for api/v1.8.0-rc.0
2024-05-06 15:58:56 +00:00
Akhil Mohan
13f2fa1de1
remove go1.21.9 from CI matrix
since go.mod got updated to go1.22, 1.22 is the minimum version to build
containerd. even if 1.21.9 is the version present on the host, go
command will build using 1.22.0 go version.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-05-06 16:00:41 +05:30
Danny Canter
f0363a7f6b Chore: Simplify some syscall error checks
This just replaces some type casts to check whether a few dial errors are
a specific syscall with the stdlibs errors.As/errors.Is pals.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-05-06 00:44:13 -07:00
Derek McGowan
a26c686ea2
Merge pull request #10168 from dmcgowan/api-release-action
Add API release action
2024-05-04 22:34:23 +00:00
Wei Fu
99ad11a00a core/metadata: failfast on content.Commit
Close: #10158

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-05-04 17:24:00 +08:00
Akihiro Suda
3fb84403b1
CI: bump up crun to 1.15
Changes:
- https://github.com/containers/crun/releases/tag/1.14.4
- https://github.com/containers/crun/releases/tag/1.15

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-05-04 14:12:23 +09:00
Derek McGowan
55fcebffc7
Prepare release notes for api/v1.8.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-03 16:51:50 -07:00
Derek McGowan
b811a88793
Add API release action
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-03 16:26:11 -07:00
Maksym Pavlenko
b6ffa2794e
Merge pull request #10164 from henry118/shim-fix
Update ctr shim subcommand to task v3
2024-05-03 19:37:36 +00:00
Kazuyoshi Kato
30fad38ce6
Merge pull request #10148 from containerd/dependabot/go_modules/otel-2cd70c4535
build(deps): bump the otel group with 8 updates
2024-05-03 18:17:10 +00:00
Kazuyoshi Kato
d65976b687
Merge pull request #10163 from dmcgowan/transfer-ttrpc-support
Add support for ttrpc in transfer and streaming service
2024-05-03 18:15:52 +00:00
Akihiro Suda
ef12da25e2
Merge pull request #9781 from kinvolk/rata/userns-use-pluginInfo
core/runtime: Check shim PluginInfo to enforce idmap support
2024-05-03 16:07:50 +00:00
Henry Wang
b8060d641d Update ctr shim subcommand to task v3
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-05-03 15:25:48 +00:00
Rodrigo Campos
f1e265b138 core/runtime: Check shim PluginInfo to enforce idmap support
This commit gets rid of the TODO by moving the check to use the
pluginInfo() infrastructure.

The check is only enforced for shims that return info that can be read
as type runtime.Features. For shims that don't provide that, we just
ignore it, as those shims might not be affected by this.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-05-03 15:00:59 +02:00
Fu Wei
857dc6f89e
Merge pull request #10162 from dmcgowan/cleanup-local-transfer
Cleanup local transfer interface
2024-05-03 10:40:46 +00:00
Derek McGowan
05a3171bb4
Update transfer proxy to support ttrpc
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 23:16:51 -07:00
Derek McGowan
ec04e4f638
Add streaming proxy
Signed-off-by: Derek McGowan <derek@mcg.dev>

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 22:38:14 -07:00
Fu Wei
193af78800
Merge pull request #10151 from dmcgowan/move-proto-to-api
Add api Go module and move all protos under api
2024-05-03 03:25:04 +00:00
Derek McGowan
fe01cad201
Cleanup local transfer interface
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 15:45:49 -07:00
Derek McGowan
171fc1434a
Update release doc to mention API versioning
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 11:03:00 -07:00
Derek McGowan
2ac2b9c909
Make api a Go sub-module
Allow the api to stay at the same v1 go package name and keep using a
1.x version number. This indicates the API is still at 1.x and allows
sharing proto types with containerd 1.6 and 1.7 releases.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 11:03:00 -07:00
Derek McGowan
e1b94c0e7d
Move protobuf package under pkg
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:03 -07:00
Derek McGowan
3e9cace720
Move runtimeoptions to api directory
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:02 -07:00
Derek McGowan
4a45507772
Move runc options to api directory
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:00 -07:00
Derek McGowan
25a288662d
Fix v2 migrate for testutil package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:50:07 -07:00
Fu Wei
a91b05d99c
Merge pull request #9736 from abel-von/sandbox-task-0201
sandbox: Store bootstrap parameters in sandbox metadata and shim get them from sandbox metadata rather than other shim's bootstrap.json file.
2024-05-02 15:35:29 +00:00
Derek McGowan
182a5fc653
Merge pull request #9657 from azr/azr/ctt-hlp-read-seeker
content: add a BlobReadSeeker to allow multipart blob uploads
2024-05-02 15:20:17 +00:00
Derek McGowan
0730bb8569
Merge pull request #8567 from thaJeztah/use_the_const_luke
container.Checkpoint(), WithRestoreImage(): use ocispec.AnnotationRefName
2024-05-02 15:18:38 +00:00
Maksym Pavlenko
2ec82c4703
Merge pull request #10128 from xinyangge-db/lockless_sync
Perform file sync outside of lock on Commit
2024-05-01 21:46:43 +00:00
Akihiro Suda
0aa610c2aa
Merge pull request #10156 from containerd/dependabot/go_modules/k8s-a20165af8f
build(deps): bump the k8s group across 1 directory with 4 updates
2024-05-01 19:58:25 +00:00
Derek McGowan
a67adb8106
Merge pull request #10157 from SpiffyEight77/docs/fix-typo
docs: correct the typo in the documentation
2024-05-01 12:57:42 -07:00
Ruihua Wen
fb1f15d304
docs: correct the typo in the documentation
Signed-off-by: Ruihua Wen <spiffyeight77@gmail.com>
2024-05-02 02:04:24 +09:00
Akihiro Suda
d9a58a892b
Merge pull request #10138 from deitch/document-blockfile-snapshotter
document usage and design of blockfile snapshotter
2024-05-01 08:20:09 +00:00
dependabot[bot]
2df04b4033
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.50.0` | `0.51.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.50.0` | `0.51.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.25.0` | `1.26.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.25.0` | `1.26.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.25.0` | `1.26.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.25.0` | `1.26.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.25.0` | `1.26.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.25.0` | `1.26.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.50.0 to 0.51.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.50.0...zpages/v0.51.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.50.0 to 0.51.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.50.0...zpages/v0.51.0)

Updates `go.opentelemetry.io/otel` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0)

Updates `go.opentelemetry.io/otel/trace` from 1.25.0 to 1.26.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.25.0...v1.26.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 22:37:17 +00:00
dependabot[bot]
950db7eb73
build(deps): bump the k8s group across 1 directory with 4 updates
Bumps the k8s group with 4 updates in the / directory: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go), [k8s.io/component-base](https://github.com/kubernetes/component-base) and [k8s.io/kubelet](https://github.com/kubernetes/kubelet).


Updates `k8s.io/apimachinery` from 0.29.2 to 0.30.0
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.29.2...v0.30.0)

Updates `k8s.io/client-go` from 0.29.2 to 0.30.0
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.29.2...v0.30.0)

Updates `k8s.io/component-base` from 0.29.2 to 0.30.0
- [Commits](https://github.com/kubernetes/component-base/compare/v0.29.2...v0.30.0)

Updates `k8s.io/kubelet` from 0.29.2 to 0.30.0
- [Commits](https://github.com/kubernetes/kubelet/compare/v0.29.2...v0.30.0)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/kubelet
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 22:37:04 +00:00
Akihiro Suda
51d5544015
Merge pull request #10149 from containerd/dependabot/go_modules/github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus-1.0.1
build(deps): bump github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus from 1.0.0 to 1.0.1
2024-04-30 21:52:48 +00:00
dependabot[bot]
93690baf4e
build(deps): bump github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus
Bumps [github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus](https://github.com/grpc-ecosystem/go-grpc-middleware) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/grpc-ecosystem/go-grpc-middleware/releases)
- [Commits](https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.0.0...providers/prometheus/v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 19:10:24 +00:00
Maksym Pavlenko
97ea691538
Merge pull request #8250 from dmcgowan/update-release-process
Update release process after 1.7
2024-04-30 19:10:02 +00:00
Maksym Pavlenko
97dd9d508a
Merge pull request #10019 from AkihiroSuda/cri-api-v0.30.0-rc.0
go.mod: k8s.io/cri-api v0.30.0
2024-04-30 18:27:46 +00:00
Maksym Pavlenko
c2c8730596
Merge pull request #10150 from containerd/dependabot/go_modules/github.com/urfave/cli/v2-2.27.2
build(deps): bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.2
2024-04-30 18:23:04 +00:00
Maksym Pavlenko
9e1ad56b41
Merge pull request #10152 from zouyee/log
optimize error logs by providing absolute file paths
2024-04-30 18:22:01 +00:00
Akihiro Suda
4c753d1242
go.mod: k8s.io/cri-api v0.30.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-30 20:40:22 +09:00
Akihiro Suda
53160fb4b6
Merge pull request #10110 from AkihiroSuda/go-mod-1.22
go.mod: go 1.22
2024-04-30 09:19:17 +00:00
Abel Feng
de38490ed6 sandbox: merge address and protocol to one url
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:28:00 +08:00
Abel Feng
c3b306240e add task api endpoint in task create options
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:22:44 +08:00
Abel Feng
72fe47b2a2 add task api endpoint in oci proto
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:20:04 +08:00
Abel Feng
b1fefccc78 sandbox: store endpoint in cri sandboxStore
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:20:03 +08:00
Abel Feng
f6e0cf1894 sandbox: add address info in Start and Status response
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-30 15:20:03 +08:00
Derek McGowan
2c7b992ad4
Merge pull request #10146 from containerd/dependabot/github_actions/golangci/golangci-lint-action-5
build(deps): bump golangci/golangci-lint-action from 4 to 5
2024-04-30 04:53:29 +00:00
Akihiro Suda
15782881ee
go.mod: go 1.22
Depended by k8s.io/cri-api >= v0.30.0 (Kubernetes v1.30, PR 10019)
https://github.com/kubernetes/cri-api/blob/v0.30.0/go.mod#L5

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-30 11:53:20 +09:00
Akihiro Suda
2d5689434d
CI: use Go 1.22 by default
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-30 11:52:36 +09:00
Akihiro Suda
fef78c1024
install-runc: pin Go to 1.21
runc is incompatible with Go 1.22 on glibc-based distros
(opencontainers/runc issue 4233)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-30 11:52:32 +09:00
zouyee
11d8beff80 optimize error logs by providing absolute file paths
Signed-off-by: zouyee <zouyee1989@gmail.com>
2024-04-30 09:08:01 +08:00
dependabot[bot]
81a9df625b
build(deps): bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.2
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.1 to 2.27.2.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.1...v2.27.2)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 23:38:41 +00:00
dependabot[bot]
c001a70562
build(deps): bump lycheeverse/lychee-action from 1.9.3 to 1.10.0
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.9.3 to 1.10.0.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.9.3...v1.10.0)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 23:19:13 +00:00
dependabot[bot]
6df759e243
build(deps): bump golangci/golangci-lint-action from 4 to 5
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 23:19:10 +00:00
Maksym Pavlenko
7feb1f327d
Merge pull request #9853 from abel-von/make-shim-independent
sandbox: make an independent shim plugin
2024-04-29 21:07:21 +00:00
Maksym Pavlenko
b3dd6e3860
Merge pull request #10145 from thaJeztah/cri_startup_logs_step1
pkg/cri/server/base: use structured log for CRI plugin startup and log config as embedded JSON
2024-04-29 19:54:39 +00:00
Sebastiaan van Stijn
b7c9774140
container.Checkpoint(), WithRestoreImage(): use ocispec.AnnotationRefName
instead of a locally defined const

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-29 13:26:21 +02:00
Sebastiaan van Stijn
8a8c3e2215
pkg/cri/server/base: log CRI config as embedded JSON
Use the JSON-encoded representation of the config used, which allows
users to reconstruct a (valid) config file from the logs, which may be
more useful for debugging purposes than the internal (Go) representation.

Before this:

    INFO[2023-12-07T15:33:39.914626385Z] starting cri plugin                           config="{PluginConfig:{ContainerdConfig:{Snapshotter:overlayfs DefaultRuntimeName:runc Runtimes:map[runc:{Type:io.containerd.runc.v2 Path: PodAnnotations:[] ContainerAnnotations:[] Options:map[BinaryName: CriuImagePath: CriuWorkPath: IoGid:0 IoUid:0 NoNewKeyring:false Root: ShimCgroup:] PrivilegedWithoutHostDevices:false PrivilegedWithoutHostDevicesAllDevicesAllowed:false BaseRuntimeSpec: NetworkPluginConfDir: NetworkPluginMaxConfNum:0 Snapshotter: Sandboxer:podsandbox}] DisableSnapshotAnnotations:true DiscardUnpackedLayers:false IgnoreBlockIONotEnabledErrors:false IgnoreRdtNotEnabledErrors:false} CniConfig:{NetworkPluginBinDir:/opt/cni/bin NetworkPluginConfDir:/etc/cni/net.d NetworkPluginMaxConfNum:1 NetworkPluginSetupSerially:false NetworkPluginConfTemplate: IPPreference:} Registry:{ConfigPath: Mirrors:map[] Configs:map[] Auths:map[] Headers:map[]} ImageDecryption:{KeyModel:node} DisableTCPService:true StreamServerAddress:127.0.0.1 StreamServerPort:0 StreamIdleTimeout:4h0m0s EnableSelinux:false SelinuxCategoryRange:1024 SandboxImage:registry.k8s.io/pause:3.9 StatsCollectPeriod:10 EnableTLSStreaming:false X509KeyPairStreaming:{TLSCertFile: TLSKeyFile:} MaxContainerLogLineSize:16384 DisableCgroup:false DisableApparmor:false RestrictOOMScoreAdj:false MaxConcurrentDownloads:3 DisableProcMount:false UnsetSeccompProfile: TolerateMissingHugetlbController:true DisableHugetlbController:true DeviceOwnershipFromSecurityContext:false IgnoreImageDefinedVolumes:false NetNSMountsUnderStateDir:false EnableUnprivilegedPorts:true EnableUnprivilegedICMP:true EnableCDI:false CDISpecDirs:[/etc/cdi /var/run/cdi] ImagePullProgressTimeout:5m0s DrainExecSyncIOTimeout:0s} ContainerdRootDir:/var/lib/docker/containerd/daemon ContainerdEndpoint:/var/run/docker/containerd/containerd.sock RootDir:/var/lib/docker/containerd/daemon/io.containerd.grpc.v1.cri StateDir:/var/run/docker/containerd/daemon/io.containerd.grpc.v1.cri}"

After this:

    INFO[2023-12-07T15:27:15.862946138Z] starting cri plugin                           config="{\"containerd\":{\"snapshotter\":\"overlayfs\",\"defaultRuntimeName\":\"runc\",\"runtimes\":{\"runc\":{\"runtimeType\":\"io.containerd.runc.v2\",\"runtimePath\":\"\",\"PodAnnotations\":null,\"ContainerAnnotations\":null,\"options\":{\"BinaryName\":\"\",\"CriuImagePath\":\"\",\"CriuWorkPath\":\"\",\"IoGid\":0,\"IoUid\":0,\"NoNewKeyring\":false,\"Root\":\"\",\"ShimCgroup\":\"\"},\"privileged_without_host_devices\":false,\"privileged_without_host_devices_all_devices_allowed\":false,\"baseRuntimeSpec\":\"\",\"cniConfDir\":\"\",\"cniMaxConfNum\":0,\"snapshotter\":\"\",\"sandboxer\":\"podsandbox\"}},\"disableSnapshotAnnotations\":true,\"discardUnpackedLayers\":false,\"ignoreBlockIONotEnabledErrors\":false,\"ignoreRdtNotEnabledErrors\":false},\"cni\":{\"binDir\":\"/opt/cni/bin\",\"confDir\":\"/etc/cni/net.d\",\"maxConfNum\":1,\"setupSerially\":false,\"confTemplate\":\"\",\"ipPref\":\"\"},\"registry\":{\"configPath\":\"\",\"mirrors\":null,\"configs\":null,\"auths\":null,\"headers\":null},\"imageDecryption\":{\"keyModel\":\"node\"},\"disableTCPService\":true,\"streamServerAddress\":\"127.0.0.1\",\"streamServerPort\":\"0\",\"streamIdleTimeout\":\"4h0m0s\",\"enableSelinux\":false,\"selinuxCategoryRange\":1024,\"sandboxImage\":\"registry.k8s.io/pause:3.9\",\"statsCollectPeriod\":10,\"enableTLSStreaming\":false,\"x509KeyPairStreaming\":{\"tlsCertFile\":\"\",\"tlsKeyFile\":\"\"},\"maxContainerLogSize\":16384,\"disableCgroup\":false,\"disableApparmor\":false,\"restrictOOMScoreAdj\":false,\"maxConcurrentDownloads\":3,\"disableProcMount\":false,\"unsetSeccompProfile\":\"\",\"tolerateMissingHugetlbController\":true,\"disableHugetlbController\":true,\"device_ownership_from_security_context\":false,\"ignoreImageDefinedVolumes\":false,\"netnsMountsUnderStateDir\":false,\"enableUnprivilegedPorts\":true,\"enableUnprivilegedICMP\":true,\"enableCDI\":false,\"cdiSpecDirs\":[\"/etc/cdi\",\"/var/run/cdi\"],\"imagePullProgressTimeout\":\"5m0s\",\"drainExecSyncIOTimeout\":\"0s\",\"containerdRootDir\":\"/var/lib/docker/containerd/daemon\",\"containerdEndpoint\":\"/var/run/docker/containerd/containerd.sock\",\"rootDir\":\"/var/lib/docker/containerd/daemon/io.containerd.grpc.v1.cri\",\"stateDir\":\"/var/run/docker/containerd/daemon/io.containerd.grpc.v1.cri\"}"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-29 13:10:54 +02:00
Sebastiaan van Stijn
f62edda5a2
pkg/cri/server/base: use structured log for CRI plugin startup
Log the config as a field instead of as part of the log message.

Before this:

    INFO[2023-12-07T14:58:43.515360429Z] loading plugin                                id=io.containerd.tracing.processor.v1.otlp type=io.containerd.tracing.processor.v1
    INFO[2023-12-07T14:58:43.515787512Z] loading plugin                                id=io.containerd.internal.v1.tracing type=io.containerd.internal.v1
    INFO[2023-12-07T14:58:43.515974429Z] loading plugin                                id=io.containerd.internal.v1.cri type=io.containerd.internal.v1
    INFO[2023-12-07T14:58:43.516037887Z] Start cri plugin with config {PluginConfig:{ContainerdConfig:{Snapshotter:overlayfs DefaultRuntimeName:runc Runtimes:map[runc:{Type:io.containerd.runc.v2 Path: PodAnnotations:[] ContainerAnnotations:[] Options:map[BinaryName: CriuImagePath: CriuWorkPath: IoGid:0 IoUid:0 NoNewKeyring:false Root: ShimCgroup:] PrivilegedWithoutHostDevices:false PrivilegedWithoutHostDevicesAllDevicesAllowed:false BaseRuntimeSpec: NetworkPluginConfDir: NetworkPluginMaxConfNum:0 Snapshotter: Sandboxer:podsandbox}] DisableSnapshotAnnotations:true DiscardUnpackedLayers:false IgnoreBlockIONotEnabledErrors:false IgnoreRdtNotEnabledErrors:false} CniConfig:{NetworkPluginBinDir:/opt/cni/bin NetworkPluginConfDir:/etc/cni/net.d NetworkPluginMaxConfNum:1 NetworkPluginSetupSerially:false NetworkPluginConfTemplate: IPPreference:} Registry:{ConfigPath: Mirrors:map[] Configs:map[] Auths:map[] Headers:map[]} ImageDecryption:{KeyModel:node} DisableTCPService:true StreamServerAddress:127.0.0.1 StreamServerPort:0 StreamIdleTimeout:4h0m0s EnableSelinux:false SelinuxCategoryRange:1024 SandboxImage:registry.k8s.io/pause:3.9 StatsCollectPeriod:10 EnableTLSStreaming:false X509KeyPairStreaming:{TLSCertFile: TLSKeyFile:} MaxContainerLogLineSize:16384 DisableCgroup:false DisableApparmor:false RestrictOOMScoreAdj:false MaxConcurrentDownloads:3 DisableProcMount:false UnsetSeccompProfile: TolerateMissingHugetlbController:true DisableHugetlbController:true DeviceOwnershipFromSecurityContext:false IgnoreImageDefinedVolumes:false NetNSMountsUnderStateDir:false EnableUnprivilegedPorts:true EnableUnprivilegedICMP:true EnableCDI:false CDISpecDirs:[/etc/cdi /var/run/cdi] ImagePullProgressTimeout:5m0s DrainExecSyncIOTimeout:0s} ContainerdRootDir:/var/lib/docker/containerd/daemon ContainerdEndpoint:/var/run/docker/containerd/containerd.sock RootDir:/var/lib/docker/containerd/daemon/io.containerd.grpc.v1.cri StateDir:/var/run/docker/containerd/daemon/io.containerd.grpc.v1.cri}

After this:

    INFO[2023-12-07T15:33:39.914112719Z] loading plugin                                id=io.containerd.tracing.processor.v1.otlp type=io.containerd.tracing.processor.v1
    INFO[2023-12-07T15:33:39.914526135Z] loading plugin                                id=io.containerd.internal.v1.tracing type=io.containerd.internal.v1
    INFO[2023-12-07T15:33:39.914580427Z] loading plugin                                id=io.containerd.internal.v1.cri type=io.containerd.internal.v1
    INFO[2023-12-07T15:33:39.914626385Z] starting cri plugin                           config="{PluginConfig:{ContainerdConfig:{Snapshotter:overlayfs DefaultRuntimeName:runc Runtimes:map[runc:{Type:io.containerd.runc.v2 Path: PodAnnotations:[] ContainerAnnotations:[] Options:map[BinaryName: CriuImagePath: CriuWorkPath: IoGid:0 IoUid:0 NoNewKeyring:false Root: ShimCgroup:] PrivilegedWithoutHostDevices:false PrivilegedWithoutHostDevicesAllDevicesAllowed:false BaseRuntimeSpec: NetworkPluginConfDir: NetworkPluginMaxConfNum:0 Snapshotter: Sandboxer:podsandbox}] DisableSnapshotAnnotations:true DiscardUnpackedLayers:false IgnoreBlockIONotEnabledErrors:false IgnoreRdtNotEnabledErrors:false} CniConfig:{NetworkPluginBinDir:/opt/cni/bin NetworkPluginConfDir:/etc/cni/net.d NetworkPluginMaxConfNum:1 NetworkPluginSetupSerially:false NetworkPluginConfTemplate: IPPreference:} Registry:{ConfigPath: Mirrors:map[] Configs:map[] Auths:map[] Headers:map[]} ImageDecryption:{KeyModel:node} DisableTCPService:true StreamServerAddress:127.0.0.1 StreamServerPort:0 StreamIdleTimeout:4h0m0s EnableSelinux:false SelinuxCategoryRange:1024 SandboxImage:registry.k8s.io/pause:3.9 StatsCollectPeriod:10 EnableTLSStreaming:false X509KeyPairStreaming:{TLSCertFile: TLSKeyFile:} MaxContainerLogLineSize:16384 DisableCgroup:false DisableApparmor:false RestrictOOMScoreAdj:false MaxConcurrentDownloads:3 DisableProcMount:false UnsetSeccompProfile: TolerateMissingHugetlbController:true DisableHugetlbController:true DeviceOwnershipFromSecurityContext:false IgnoreImageDefinedVolumes:false NetNSMountsUnderStateDir:false EnableUnprivilegedPorts:true EnableUnprivilegedICMP:true EnableCDI:false CDISpecDirs:[/etc/cdi /var/run/cdi] ImagePullProgressTimeout:5m0s DrainExecSyncIOTimeout:0s} ContainerdRootDir:/var/lib/docker/containerd/daemon ContainerdEndpoint:/var/run/docker/containerd/containerd.sock RootDir:/var/lib/docker/containerd/daemon/io.containerd.grpc.v1.cri StateDir:/var/run/docker/containerd/daemon/io.containerd.grpc.v1.cri}"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-29 13:10:51 +02:00
Avi Deitcher
e07b63d845 document usage and design of blockfile snapshotter
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2024-04-28 11:44:03 +03:00
Samuel Karp
7cd7a5c82f
Merge pull request #10140 from lucasrattz/fix-actuated-in-adopters
ADOPTERS.md: Fix Actuated italics
2024-04-27 04:45:37 +00:00
Samuel Karp
f343b51809
Merge pull request #10139 from syself/add-syself-autopilot-to-adopters
Add Syself Autopilot to adopters
2024-04-27 00:46:36 +00:00
Lucas Rattz
b6bd12f13d Add Syself Autopilot to adopters
Syself Autopilot is a managed kubernetes solution, added at the end since it's a commercial adopter.

Signed-off-by: Lucas Rattz <lucas.rattz@syself.com>
2024-04-26 13:48:57 -03:00
Lucas Rattz
7bc4760017 ADOPTERS.md: Fix Actuated italics
The italicization of Actuated was broken. This commit fixes it by addin a missing underscore.

Signed-off-by: Lucas Rattz <lucasrattz999@gmail.com>
2024-04-26 13:31:23 -03:00
Xinyang Ge
4167416754 Perform file sync outside of lock on Commit
Signed-off-by: Xinyang Ge <xinyang.ge@databricks.com>
2024-04-26 05:42:01 -07:00
Akihiro Suda
0426e3c2eb
Merge pull request #10133 from AkihiroSuda/fix-10062
cri: introspectRuntimeFeatures: fix nil panic
2024-04-25 08:28:09 +00:00
Akihiro Suda
c27bcdc564
cri: introspectRuntimeFeatures: fix nil panic
Fix issue 10062

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-25 08:36:38 +09:00
Samuel Karp
01ed3ff123
Merge pull request #10123 from woky/apparmor-runc
apparmor: Allow confined runc to kill containers
2024-04-24 22:01:12 +00:00
Derek McGowan
dfdfa206f9
Update for latest updates to release tool
Mention use of pull request labels

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-24 11:19:45 -07:00
Derek McGowan
53c9e6f862
Update release process after 1.7
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-24 10:17:11 -07:00
Akihiro Suda
c4c3c6ea56
Merge pull request #10125 from sandy-lcq/main
Makefile: update default PACKAGE to v2
2024-04-24 15:13:17 +00:00
Changqing Li
c5ba71d117 Makefile: update default PACKAGE to v2
Signed-off-by: Changqing Li <changqing.li@windriver.com>
2024-04-24 18:02:37 +08:00
Abel Feng
a12acedfad sandbox: make a independent shim plugin
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-04-24 14:27:20 +08:00
Akihiro Suda
9d108fa83b
Merge pull request #9894 from profnandaa/docs/fix-windows-instructions-2
fix(docs): fix duplicate instructions for windows installation
2024-04-23 23:54:59 +00:00
Tomáš Virtus
094bafe2a3
apparmor: Allow confined runc to kill containers
/usr/sbin/runc is confined with "runc" profile[1] introduced in AppArmor
v4.0.0. This change breaks stopping of containers, because the profile
assigned to containers doesn't accept signals from the "runc" peer.
AppArmor >= v4.0.0 is currently part of Ubuntu Mantic (23.10) and later.

The issue is reproducible both with nerdctl and ctr clients. In the case
of ctr, the --apparmor-default-profile flag has to be specified,
otherwise the container processes would inherit the runc profile, which
behaves as unconfined, and so the subsequent runc process invoked to
stop it would be able to signal it.

  Test commands:

    root@cloudimg:~# nerdctl run -d --name foo nginx:latest
    3d1e74bfe6e7b2912d9223050ae8a81a8f4b73de0846e6d9c956c1e411cdd95a
    root@cloudimg:~# nerdctl stop foo
    FATA[0000] 1 errors:
    unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied
    : unknown

    or

    root@cloudimg:~# ctr pull docker.io/library/nginx:latest
    ...
    root@cloudimg:~# ctr run -d --apparmor-default-profile ctr-default docker.io/library/nginx:latest foo
    root@cloudimg:~# ctr task kill foo
    ctr: unknown error after kill: runc did not terminate successfully: exit status 1: unable to signal init: permission denied
    : unknown

  Relevant syslog messages (with long lines wrapped):

    Apr 23 22:03:12 cloudimg kernel: audit:
      type=1400 audit(1713909792.064:262): apparmor="DENIED"
      operation="signal" class="signal" profile="nerdctl-default"
      pid=13483 comm="runc" requested_mask="receive"
      denied_mask="receive" signal=quit peer="runc"

    or

    Apr 23 22:05:32 cloudimg kernel: audit:
      type=1400 audit(1713909932.106:263): apparmor="DENIED"
      operation="signal" class="signal" profile="ctr-default"
      pid=13574 comm="runc" requested_mask="receive"
      denied_mask="receive" signal=quit peer="runc"

This change extends the default profile with rules that allow receiving
signals from processes that run confined with either runc or crun
profile (crun[2] is an alternative OCI runtime that's also confined in
AppArmor >= v4.0.0, see [1]). It is backward compatible because the peer
value is a regular expression (AARE) so the referenced profile doesn't
have to exist for this profile to successfully compile and load.

[1] https://gitlab.com/apparmor/apparmor/-/commit/2594d936
[2] https://github.com/containers/crun

Signed-off-by: Tomáš Virtus <nechtom@gmail.com>
2024-04-24 00:17:40 +02:00
Derek McGowan
2d19e9b473
Merge pull request #10098 from dmcgowan/prepare-v2.0.0-rc.1
Prepare release notes for v2.0.0-rc.1
2024-04-23 21:32:24 +00:00
Derek McGowan
3781d8757a
Merge pull request #10107 from containerd/dependabot/go_modules/tags.cncf.io/container-device-interface-0.7.2
build(deps): bump tags.cncf.io/container-device-interface from 0.7.1 to 0.7.2
2024-04-23 21:32:13 +00:00
Derek McGowan
df5d9603c7
Merge pull request #10121 from ZhangShuaiyi/bugfix/configMigration
fix migrateConfig for io.containerd.cri.v1.images
2024-04-23 20:34:50 +00:00
Shuaiyi Zhang
e461a59ae6 fix migrateConfig for io.containerd.cri.v1.images
Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
2024-04-23 12:59:50 +00:00
Fu Wei
2dd6fa3b6d
Merge pull request #10111 from AkihiroSuda/nerdctl-issue-2730
apparmor: add `signal (receive) peer=/usr/local/bin/rootlesskit,`
2024-04-23 05:03:12 +00:00
Maksym Pavlenko
444679c883
Merge pull request #10109 from dmcgowan/fix-fallback-explicit-tls
Update HTTP fallback to better account for TLS timeout and previous attempts
2024-04-23 04:10:39 +00:00
Maksym Pavlenko
7020acbf09
Merge pull request #10100 from ChengenH/main
chore: use errors.New to replace fmt.Errorf with no parameters will much better
2024-04-23 04:09:58 +00:00
Maksym Pavlenko
f9b17063b3
Merge pull request #10106 from dmcgowan/update-cni-1.2.0
Update CNI to v1.2.0
2024-04-23 04:07:25 +00:00
Akihiro Suda
eb5a0c04b4
apparmor: add signal (receive) peer=/usr/local/bin/rootlesskit,
Fix containerd/nerdctl issue 2730
> [Rootless] `nerdctl rm` fails when AppArmor is loaded:
> `error="unknown error after kill: runc did not terminate successfully: exit status 1:
> unable to signal init: permission denied\n: unknown"`

Caused by:
> kernel: audit: type=1400 audit(1713840662.766:122): apparmor="DENIED" operation="signal" class="signal"
> profile="nerdctl-default" pid=366783 comm="runc" requested_mask="receive" denied_mask="receive" signal=kill
> peer="/usr/local/bin/rootlesskit"

The issue is known to happen on Ubuntu 23.10 and 24.04 LTS.
Doesn't seem to happen on Ubuntu 22.04 LTS.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-23 12:21:26 +09:00
Derek McGowan
5e470e1cae
Update HTTPFallback to handle tls handshake timeout
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-22 18:53:27 -07:00
dependabot[bot]
a37b451cde
build(deps): bump tags.cncf.io/container-device-interface
Bumps [tags.cncf.io/container-device-interface](https://github.com/cncf-tags/container-device-interface) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/cncf-tags/container-device-interface/releases)
- [Commits](https://github.com/cncf-tags/container-device-interface/compare/v0.7.1...v0.7.2)

---
updated-dependencies:
- dependency-name: tags.cncf.io/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 23:45:02 +00:00
Derek McGowan
1412a255ec
Merge pull request #10068 from kiashok/portForwardingWindows-ipv6
Account for ipv6 localhost in windows port forwarding
2024-04-22 21:14:18 +00:00
Derek McGowan
888fd315fd
Update CNI to v1.2.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-22 14:12:15 -07:00
Phil Estes
6d1ae8b439
Merge pull request #10104 from thaJeztah/go1.21.9
update to go1.21.9, go1.22.2
2024-04-22 20:12:51 +00:00
Fabiano Fidêncio
9ee3bfaba2
images: tests: Fix typos in the tests
This is a non-functional change, that fixes the following typos:
* Snashotter -> Snapshotter
* expectSnapshotter -> expectedSnapshotter
* expectErr -> expectedErr
* exiting-runtime -> existing-runtime

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2024-04-22 21:04:49 +02:00
Sebastiaan van Stijn
13e6b2b686
update to go1.21.9, go1.22.2
go1.21.9 (released 2024-04-03) includes a security fix to the net/http
package, as well as bug fixes to the linker, and the go/types and
net/http packages. See the Go 1.21.9 milestone for more details;
https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved

These minor releases include 1 security fixes following the security policy:

- http2: close connections when receiving too many headers

Maintaining HPACK state requires that we parse and process all HEADERS
and CONTINUATION frames on a connection. When a request's headers exceed
MaxHeaderBytes, we don't allocate memory to store the excess headers but
we do parse them. This permits an attacker to cause an HTTP/2 endpoint
to read arbitrary amounts of header data, all associated with a request
which is going to be rejected. These headers can include Huffman-encoded
data which is significantly more expensive for the receiver to decode
than for an attacker to send.

Set a limit on the amount of excess header frames we will process before
closing a connection.

Thanks to Bartek Nowotarski (https://nowotarski.info/) for reporting this issue.

This is CVE-2023-45288 and Go issue https://go.dev/issue/65051.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.22.2

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.8...go1.21.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-22 19:43:32 +02:00
Derek McGowan
42e4de9c54
Prepare release notes for v2.0.0-rc.1
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-22 10:13:11 -07:00
Derek McGowan
17294e5816
Merge pull request #10047 from containerd/dependabot/go_modules/golang-x-5cf8641f85
build(deps): bump the golang-x group with 3 updates
2024-04-22 16:18:12 +00:00
Shuaiyi Zhang
c51463010e docs: update registry config guide
Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
2024-04-22 12:01:30 +00:00
ChengenH
4a31bd606d chore: use errors.New to replace fmt.Errorf with no parameters will much better
Signed-off-by: ChengenH <hce19970702@gmail.com>
2024-04-21 21:49:31 +08:00
Fu Wei
8936631603
Merge pull request #10099 from kiashok/updateHcsshim-main
Update hcsshim to v0.12.3
2024-04-21 12:55:17 +00:00
Kirtana Ashok
a6a82c1023 Update hcsshim to v0.12.3
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-04-19 15:26:47 -07:00
Kirtana Ashok
7e60d5a074 Account for ipv4 vs ipv6 localhost
in windows port forwarding

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-04-19 11:30:49 -07:00
Kazuyoshi Kato
6e0dc9f50f
Merge pull request #10089 from samuelkarp/bump-nri-v0.6.1
mod: bump github.com/containerd/nri@v0.6.1
2024-04-18 23:07:13 +00:00
Samuel Karp
a153b2cd32
mod: bump github.com/containerd/nri@v0.6.1
Fixes https://github.com/containerd/containerd/issues/10085

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-04-18 15:00:34 -07:00
Phil Estes
d8340d9286
Merge pull request #10078 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.2.1
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1
2024-04-18 21:50:00 +00:00
Phil Estes
b73c7585ee
Merge pull request #10079 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.8
build(deps): bump github.com/klauspost/compress from 1.17.7 to 1.17.8
2024-04-18 21:49:46 +00:00
dependabot[bot]
77512e2d79
build(deps): bump the golang-x group with 3 updates
Bumps the golang-x group with 3 updates: [golang.org/x/mod](https://github.com/golang/mod), [golang.org/x/sync](https://github.com/golang/sync) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/mod` from 0.16.0 to 0.17.0
- [Commits](https://github.com/golang/mod/compare/v0.16.0...v0.17.0)

Updates `golang.org/x/sync` from 0.6.0 to 0.7.0
- [Commits](https://github.com/golang/sync/compare/v0.6.0...v0.7.0)

Updates `golang.org/x/sys` from 0.18.0 to 0.19.0
- [Commits](https://github.com/golang/sys/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 23:41:36 +00:00
dependabot[bot]
c8d9eba7c6
build(deps): bump github.com/klauspost/compress from 1.17.7 to 1.17.8
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.7 to 1.17.8.
- [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.7...v1.17.8)

---
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-04-15 23:41:14 +00:00
dependabot[bot]
1c0f73aa0d
build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 23:41:04 +00:00
Samuel Karp
8317959018
Merge pull request #10073 from dcantah/snapshotters-root-export
Snapshotters: Export the root path
2024-04-15 07:31:09 +00:00
Danny Canter
32caaee484 Snapshotters: Export the root path
Some of the snapshotters that allow you to change their root location
were already doing this, this just makes all of them follow the same
pattern.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-04-14 06:24:33 -07:00
Fu Wei
8eb03f17b1
Merge pull request #10070 from testwill/close_file
fix: close profile
2024-04-14 00:58:38 +00:00
Maksym Pavlenko
92900bf730
Merge pull request #10069 from anmaxvl/hpc-default-workingdir
fix default working directory `hostProcess`
2024-04-12 18:12:42 +00:00
guangwu
b82ced57f9 fix: close profile
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-04-12 18:08:29 +08:00
Maksim An
c7ea06a69b fix default working directory hostProcess
Per https://github.com/kubernetes/enhancements/tree/master/keps/sig-windows/1981-windows-privileged-container-support#container-mounts
the default working directory for `hostProcess` containers should
be `C:\hpc`, however the current default is set to windows default
which is `C:\`.

Signed-off-by: Maksim An <maksiman@microsoft.com>
2024-04-11 23:35:55 -07:00
Fu Wei
b693d137ed
Merge pull request #10048 from containerd/dependabot/go_modules/otel-db663757ef
build(deps): bump the otel group with 8 updates
2024-04-12 02:42:16 +00:00
dependabot[bot]
1040c7b98e
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.49.0` | `0.50.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.49.0` | `0.50.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.24.0` | `1.25.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.49.0 to 0.50.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.49.0...zpages/v0.50.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.49.0 to 0.50.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.49.0...zpages/v0.50.0)

Updates `go.opentelemetry.io/otel` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

Updates `go.opentelemetry.io/otel/trace` from 1.24.0 to 1.25.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 18:13:08 +00:00
Maksym Pavlenko
81546a447b
Merge pull request #10050 from containerd/dependabot/go_modules/google.golang.org/grpc-1.63.2
build(deps): bump google.golang.org/grpc from 1.62.1 to 1.63.2
2024-04-11 17:25:48 +00:00
Maksym Pavlenko
203f9c2b5b
Merge pull request #10059 from dcantah/ignore-eintr-helper
pkg/sys: Add helper to ignore eintr
2024-04-11 17:25:13 +00:00
Phil Estes
99693a32c2
Merge pull request #10041 from elezar/bump-container-device-interface-v0.7.1
Bump tags.cncf.io/container-device-interface to v0.7.1
2024-04-11 15:33:21 +00:00
Danny Canter
b50e9eae43 Refactor spots to make use of sys.IgnoringEintr
This makes use of pkg/sys's IgnoringEintr function
to clean up some of the redundant eintr loops we
had laying around.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-04-10 11:24:01 -07:00
Danny Canter
3ea69db8e9 Add helper to ignore eintr
We have quite a few pieces of code laying around containerd
that all loop and ignore eintr as they make syscalls directly
(or use a unix/syscall wrapper) because there's no stdlib
equivalent. This adds a small utility to pkg/sys that we can
use for all of these spots.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-04-10 11:16:23 -07:00
Phil Estes
2adae6093e
Merge pull request #10060 from dcantah/unix-waitid
Replace direct waitid syscall with unix.Waitid
2024-04-10 16:48:12 +00:00
Evan Lezar
1b62224181 Bump tags.cncf.io/container-device-interface to v0.7.1
This includes migrating from cdi.GetRegistry() to cdi.Configure() and
using top-level cdi Refresh and InjectDevices functions as applicable.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-04-10 15:25:11 +02:00
Danny Canter
ad584ebecb Replace direct waitid syscall with unix.Waitid
This also replaces the PPidFD constant with the definition in
x/sys/unix

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-04-10 05:52:43 -07:00
Akihiro Suda
27dfb0d09e
Merge pull request #10054 from tklauser/unix-syncfs
core/diff/apply: use unix.Syncfs
2024-04-10 10:18:47 +00:00
Derek McGowan
7c50784591
Remove empty default tls configuration in ctr
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-09 15:40:09 -07:00
Mike Brown
a68f9b7c56
Merge pull request #9419 from ChengyuZhu6/pause_image
cri: add sandbox image name to annotations
2024-04-09 15:52:04 +00:00
ChengyuZhu6
b6e3616949 cri: add pause image name to annotations
We are currently in the process of developing a feature to facilitate guest image pulling
on confidential-containers, and we would be grateful for containerd's support in this endeavor.
It would greatly assist our efforts if containerd could provide the pause image name and
add it into the annotations.

Fixes: #9418

Signed-off-by: ChengyuZhu6 <chengyu.zhu@intel.com>
2024-04-09 22:33:58 +08:00
Tobias Klauser
0ec14fdf8c
core/diff/apply: use unix.Syncfs
Use the Syncfs wrapper function defined in the golang.org/x/sys/unix
package instead of manually wrapping it in doSyncFs.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2024-04-09 15:12:43 +02:00
dependabot[bot]
739659a4b3
build(deps): bump google.golang.org/grpc from 1.62.1 to 1.63.2
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.1 to 1.63.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.62.1...v1.63.2)

---
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-04-08 23:56:23 +00:00
Mike Brown
406e9e84b4
Merge pull request #9415 from kiashok/fixIntegrationClientAddr
Use different containerd sock address for integration test client
2024-04-08 22:58:33 +00:00
Maksym Pavlenko
454bd58a27
Merge pull request #10031 from ktock/fail-plain-http-2.0
remote: Fix HTTPFallback fails when pushing manifest
2024-04-07 03:35:19 +00:00
Phil Estes
d29df16c75
Merge pull request #7807 from swagatbora90/tracing-documentation-update
Update tracing documentation to add details about manual instrumentation
2024-04-05 14:32:47 -04:00
Phil Estes
ac8f7698cf
Merge pull request #9999 from laurazard/fix-exec-concurrent-shim
runc-shim: only defer init process exits
2024-04-05 09:27:35 -04:00
Derek McGowan
d0cdb23fd2
Merge pull request #10024 from ktock/plain-http
Transfer: Registry: Enable plain HTTP
2024-04-04 22:15:17 +00:00
Kohei Tokunaga
4332794384
Transfer: Registry: Enable plain HTTP
Currenlty transfer service doesn't handle plain HTTP connection.
This commit fixes this issue by propagating
`(core/remotes/docker/config).HostOptions.DefaultScheme` from client to the
transfer service.
This commit also fixes ctr to use this feature for "--plain-http" flag.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-04-03 10:46:10 +09:00
Maksym Pavlenko
0807efb9ef
Merge pull request #10021 from sctb512/fix-unstable-sort
fix(cri): fix unexpected order of mounts since go 1.19
2024-04-02 21:26:09 +00:00
Swagat Bora
88b4cc659a address review comments
Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-04-02 20:40:55 +00:00
Swagat Bora
f20c49311d Update tracing documentation to add details about manual instrumentation
Signed-off-by: Swagat Bora <sbora@amazon.com>
2024-04-02 20:40:55 +00:00
Derek McGowan
3a8c27dff8
Merge pull request #9908 from ktock/transfer-host-dir
Transfer: Registry: Enable to use registry configuration diretory
2024-04-02 18:59:43 +00:00
Kohei Tokunaga
63d5573a38
remote: Fix HTTPFallback fails when pushing manifest
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-04-03 00:28:31 +09:00
Phil Estes
8b788ff93c
Merge pull request #10015 from containerd/dependabot/go_modules/github.com/distribution/reference-0.6.0
build(deps): bump github.com/distribution/reference from 0.5.0 to 0.6.0
2024-04-02 13:55:31 +00:00
Fu Wei
4c5f2bce1a
Merge pull request #10023 from dcantah/liststats-notfound
Add IsNotFound case to ListPodSandboxStats
2024-04-02 12:46:35 +00:00
ningmingxiao
7bd4d348eb add info of exited event
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2024-04-01 19:49:29 +08:00
Danny Canter
2474a99c30 Add IsNotFound case to ListPodSandboxStats
Fixes #10013. It seems we can end up in a spot where the sandbox store still
has a listing for a pod, whereas containerds underlying store has removed it.
It might be better to shield the caller (k8s) from these transient errors.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-03-30 21:20:22 -07:00
Bin Tang
3830f81678 fix(cri): fix unexpected order of mounts since go 1.19
Signed-off-by: Bin Tang <bintang@BindeMacBook-Air.local>
2024-03-30 10:57:57 +08:00
Phil Estes
c17839bdc7
Merge pull request #10016 from containerd/dependabot/go_modules/github.com/Microsoft/hcsshim-0.12.2
build(deps): bump github.com/Microsoft/hcsshim from 0.12.0 to 0.12.2
2024-03-29 19:32:51 +00:00
dependabot[bot]
cbb6441827
build(deps): bump github.com/Microsoft/hcsshim from 0.12.0 to 0.12.2
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.12.0 to 0.12.2.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](https://github.com/Microsoft/hcsshim/compare/v0.12.0...v0.12.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 07:32:36 +00:00
dependabot[bot]
362fcf2d27
build(deps): bump github.com/distribution/reference from 0.5.0 to 0.6.0
Bumps [github.com/distribution/reference](https://github.com/distribution/reference) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/distribution/reference/releases)
- [Commits](https://github.com/distribution/reference/compare/v0.5.0...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 07:32:27 +00:00
Maksym Pavlenko
7b0802cca7
Merge pull request #10004 from zjumoon01/ctr
ctr: fix parsing mount options
2024-03-29 05:07:02 +00:00
Kirtana Ashok
5b6ae0f796 Use different containerd sock address in tests
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-03-27 19:04:48 -07:00
Akihiro Suda
b0d00f8636
Merge pull request #9995 from containerd/dependabot/go_modules/github.com/pelletier/go-toml/v2-2.2.0
build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0
2024-03-27 11:20:53 +00:00
baijia
ab2c569fb2 ctr: fix parsing mount options
Set 'DisableSliceFlagSeparator = true'

urfave/cli/v2 uses ',' as default string slice separator.
That means '--mount type=bind,src=/src,des=/des,options=rbind:rw'
will be token as four bind mount options.

Fixes: #10003

Signed-off-by: baijia <baijia.wr@antgroup.com>
2024-03-27 17:50:39 +08:00
Fu Wei
61ec2e9eb9
Merge pull request #9679 from kiashok/portForwardingWindows-main
Change port forwarding on windows
2024-03-27 03:36:09 +00:00
Phil Estes
38a71154c6
Merge pull request #9971 from containerd/dependabot/go_modules/github.com/checkpoint-restore/go-criu/v7-7.1.0
build(deps): bump github.com/checkpoint-restore/go-criu/v7 from 7.0.0 to 7.1.0
2024-03-27 01:23:37 +00:00
Phil Estes
b40a912e7b
Merge pull request #9994 from containerd/dependabot/go_modules/github.com/intel/goresctrl-0.7.0
build(deps): bump github.com/intel/goresctrl from 0.6.0 to 0.7.0
2024-03-27 00:27:10 +00:00
Phil Estes
9c99229b1a
Merge pull request #9998 from irLinja/typo
docs: fix typo
2024-03-26 17:20:16 +00:00
Kirtana Ashok
b97ef91fb7 Change port forwarding on windows
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-03-26 10:19:24 -07:00
Arash Haghighat
ea681afbaa
docs: fix typo
Signed-off-by: Arash Haghighat <arash@linja.pro>
2024-03-26 16:45:12 +01:00
Fu Wei
74938f6a06
Merge pull request #9885 from Iceber/fix_pin_loaded_pause_image
cri: ensure the pause image loaded in older versions is pinned
2024-03-26 13:40:56 +00:00
Laura Brehm
6d00c3ada8
runc-shim: only defer init process exits
In order to make sure that we don't publish task exit events for init
processes before we do for execs in that container, we added logic to
`processExits` in 892dc54bd2 to skip these
and let the pending exec's `handleStarted` closure process them.

However, the conditional logic in `processExits` added was faulty - we
should only defer processing of exit events related to init processes,
not other execs. Due to this missing condition,
892dc54bd2 introduced a bug where, if
there are many concurrent execs for the same container/init pid, exec
exits are skipped and then never published, resulting in hanging
clients.

This commit adds the missing logic to `processExits`.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-03-26 13:39:11 +00:00
dependabot[bot]
da4ca49498
build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.1.1...v2.2.0)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 23:13:31 +00:00
dependabot[bot]
dd72fb3b25
build(deps): bump github.com/intel/goresctrl from 0.6.0 to 0.7.0
Bumps [github.com/intel/goresctrl](https://github.com/intel/goresctrl) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/intel/goresctrl/releases)
- [Commits](https://github.com/intel/goresctrl/compare/v0.6.0...v0.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 23:13:19 +00:00
Phil Estes
b450bffc9e
Merge pull request #9977 from thaJeztah/remove_todo
core/images/archive: normalizeReference: remove outdated TODO
2024-03-25 16:29:16 +00:00
Jian Wang
98544a3585 Add file name to device type check failure message
Signed-off-by: Jian Wang <w13915984028@gmail.com>
2024-03-25 13:03:50 +01:00
Derek McGowan
3b0b3e533c
Merge pull request #9976 from thaJeztah/internalize_cri_utils
pkg/systemd, pkg/seutil: move to internal/cri
2024-03-22 22:31:38 +00:00
Kazuyoshi Kato
f7ef4b0e02
Merge pull request #9983 from cpuguy83/fix_transfer_svc_platform_matcher
transfer: Platform matcher should match multiple platforms
2024-03-22 21:54:32 +00:00
Brian Goff
e41e9e11b5 transfer: Platform matcher should match multiple platforms
This allows arm64 to pull armhf images.
Before this change the transfer service would reject pulls for armhf on
an arm64 machine, or indeed any such platform variant mismatches.

I would argue that its a bit weird for the transfer service to reject a
pull at all since there are legitamate reasons to want to pull images
for other architectures, however that's a more philosophical change.

In the case where I ran into this, I have an arm64 machine running
an armhf containerd in an armhf container (for running some basic sanity
checks during packaging).
Tests started failing once `ctr` was moved to use the transfer service
by default.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-03-21 14:59:17 +00:00
Sebastiaan van Stijn
d0d35f0d03
core/images/archive: normalizeReference: remove outdated TODO
This TODO was added in 9e6db71954, at which time
the reference package was part of the docker/distribution (registry) repository.
The reference package has moved to a standalone module, which has been in use
since 4923470902, so this should no longer be a
concern.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 11:41:50 +01:00
Sebastiaan van Stijn
26158609b5
pkg/seutil: move to internal/cri
This pacakge is only used internally in the cri package, which is an internal
packages, so we can make the utility internal as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 11:11:24 +01:00
Sebastiaan van Stijn
33732bc13e
pkg/systemd: move to internal/cri
This pacakge is only used internally in the cri package, which is an internal
packages, so we can make the utility internal as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 11:05:25 +01:00
Maksym Pavlenko
124456ef83
Merge pull request #9864 from hinshun/feature/import-compressed
Automatically decompress archives for transfer service import
2024-03-19 22:16:25 +00:00
Maksym Pavlenko
9a4231dcfc
Merge pull request #9961 from zhanluxianshen/clean-cri-opts
Clean cri options and useless parms
2024-03-19 19:45:40 +00:00
Maksym Pavlenko
2986e45d9a
Merge pull request #9966 from AkihiroSuda/postpone-9766
CRI: postpone removal of deprecated config properties
2024-03-19 19:45:13 +00:00
Maksym Pavlenko
3c9e0bdac3
Merge pull request #9972 from containerd/dependabot/go_modules/github.com/containernetworking/plugins-1.4.1
build(deps): bump github.com/containernetworking/plugins from 1.4.0 to 1.4.1
2024-03-19 19:44:05 +00:00
Derek McGowan
93022d83d1
Merge pull request #9735 from dmcgowan/prepare-v2.0.0-rc.0
Prepare release notes for v2.0.0-rc.0
2024-03-18 18:46:11 -07:00
Derek McGowan
0d0850af16
Prepare v2.0.0-rc.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-18 18:38:35 -07:00
Derek McGowan
f5abb63c09
Update mailmap
Remove bot mailmap entry since release tool has been updated to ignore names with "[bot]"

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-18 18:38:34 -07:00
dependabot[bot]
30813f6463
build(deps): bump github.com/containernetworking/plugins
Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](https://github.com/containernetworking/plugins/compare/v1.4.0...v1.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 23:08:13 +00:00
dependabot[bot]
0fafc0c500
build(deps): bump github.com/checkpoint-restore/go-criu/v7
Bumps [github.com/checkpoint-restore/go-criu/v7](https://github.com/checkpoint-restore/go-criu) from 7.0.0 to 7.1.0.
- [Release notes](https://github.com/checkpoint-restore/go-criu/releases)
- [Commits](https://github.com/checkpoint-restore/go-criu/compare/v7.0.0...v7.1.0)

---
updated-dependencies:
- dependency-name: github.com/checkpoint-restore/go-criu/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 23:08:01 +00:00
Derek McGowan
d3a77cbb2c
Merge pull request #9967 from thaJeztah/bump_protobuf
vendor: github.com/golang/protobuf v1.5.4
2024-03-18 20:44:21 +00:00
Derek McGowan
7c1fca096d
Update migration script based on usage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-18 12:14:44 -07:00
Sebastiaan van Stijn
45e425ccce
vendor: github.com/golang/protobuf v1.5.4
commit 10c7f03b3b updated google.golang.org/protobuf
to v1.33.0, which addresses CVE-2024-24786, however a follow-up post on the
Golang security list issued a warning that the v1.33.0 update introduced a
breaking change, causing compatibility with github.com/golang/protobuf to be
broken;

> A small correction: This vulnerability applies when the UnmarshalOptions.DiscardUnknown
> option is set (as well as when unmarshaling into any message which contains a
> google.protobuf.Any). There is no UnmarshalUnknown option.
>
> In addition, version 1.33.0 of google.golang.org/protobuf inadvertently
> introduced an incompatibility with the older github.com/golang/protobuf
> module. (https://github.com/golang/protobuf/issues/1596) Users of the older
> module should update to github.com/golang/protobuf@v1.5.4.

Containerd itself does not appear to be using this code, but consumers may be,
so update the github.com/golang/protobuf to restore compatibility.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-18 13:44:06 +01:00
Akihiro Suda
4aa6fedd55
CRI: postpone removal of deprecated config properties
Postpone PR 9766 until containerd v2.1 at least.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-17 15:14:13 +09:00
Edgar Lee
34c545824f Automatically decompress archives for transfer service import
Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
2024-03-15 10:14:19 +08:00
zhanluxianshen
df26c189af
Clean cri options and useless parms
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2024-03-14 01:53:33 +00:00
Derek McGowan
c03290cb00
Merge pull request #9962 from dmcgowan/fix-podsandbox-exit-filter
Fix invalid event filter in podsandbox
2024-03-13 16:14:14 +00:00
Fu Wei
90ec00c80c
Merge pull request #9963 from dmcgowan/gha-on-fork
Update github actions ci to run on forks
2024-03-13 08:29:54 +00:00
Derek McGowan
88421068f7
Fix invalid event filter in podsandbox
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-12 18:52:44 -07:00
Derek McGowan
357c59b799
Update github actions ci to run on forks
Excludes actuated when on fork.
Runs some project tests on fork.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-12 18:20:02 -07:00
Derek McGowan
f8fbdfdd6f
Merge pull request #9956 from containerd/dependabot/github_actions/softprops/action-gh-release-2
build(deps): bump softprops/action-gh-release from 1 to 2
2024-03-12 20:13:24 +00:00
Derek McGowan
2baa309a5f
Merge pull request #9959 from containerd/dependabot/go_modules/google.golang.org/grpc-1.62.1
build(deps): bump google.golang.org/grpc from 1.62.0 to 1.62.1
2024-03-12 20:09:03 +00:00
Akihiro Suda
5a23e8878c
Merge pull request #9917 from AkihiroSuda/mv-testutil
mv internal/testutil pkg/testutil
2024-03-12 12:01:16 +00:00
Adrian Reber
218e2cf7cd
Return correct error if CRIU binary is missing
For the first version of containerd's "Forensic Container Checkpointing"
support the error message if the CRIU binary is not found was
deliberately wrong to not break Kubernetes e2e_node tests.

Now that the e2e_node tests have been adapted, containerd can return the
correct error message.

Signed-off-by: Adrian Reber <areber@redhat.com>
2024-03-12 08:29:30 +00:00
dependabot[bot]
4b719cc4b1
build(deps): bump google.golang.org/grpc from 1.62.0 to 1.62.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.0 to 1.62.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.62.0...v1.62.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 06:22:55 +00:00
Derek McGowan
9c77c389d8
Merge pull request #9958 from containerd/dependabot/go_modules/google.golang.org/protobuf-1.33.0
build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0
2024-03-12 05:42:35 +00:00
dependabot[bot]
10c7f03b3b
build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 00:02:43 +00:00
dependabot[bot]
21d3fedf44
build(deps): bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 23:09:36 +00:00
Akihiro Suda
9fc0b64bc4
Merge pull request #9879 from mikebrow/update-k8s-support-table
add k8s 1.29 and 1.30preview to support table
2024-03-09 00:29:08 +00:00
Phil Estes
3134eeb15b
Merge pull request #9930 from zhanluxianshen/clean-typo-plugins
Clean typos in plugins.
2024-03-08 20:12:57 +00:00
Phil Estes
3ac92ab772
Merge pull request #9914 from containerd/dependabot/go_modules/otel-a7a861fdf4
build(deps): bump the otel group with 8 updates
2024-03-08 17:29:00 +00:00
dependabot[bot]
228aa42a60
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.48.0` | `0.49.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.48.0` | `0.49.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.23.1` | `1.24.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.23.1` | `1.24.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.23.1` | `1.24.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.23.1` | `1.24.0` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.23.1` | `1.24.0` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.23.1` | `1.24.0` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.48.0 to 0.49.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.48.0...zpages/v0.49.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.48.0 to 0.49.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.48.0...zpages/v0.49.0)

Updates `go.opentelemetry.io/otel` from 1.23.1 to 1.24.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.23.1 to 1.24.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.23.1 to 1.24.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.23.1 to 1.24.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0)

Updates `go.opentelemetry.io/otel/sdk` from 1.23.1 to 1.24.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0)

Updates `go.opentelemetry.io/otel/trace` from 1.23.1 to 1.24.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.1...v1.24.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 15:21:15 +00:00
Phil Estes
1e1fd8fb49
Merge pull request #9926 from mxpv/runtime
Move core/runtime/v2/shim to pkg/shim
2024-03-08 15:20:53 +00:00
zhanluxianshen
47d13767f4
Clean typos in plugins.
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2024-03-08 07:33:20 +00:00
Phil Estes
249db79d6d
Merge pull request #9923 from containerd/dependabot/github_actions/azure/login-2
build(deps): bump azure/login from 1 to 2
2024-03-08 02:54:36 +00:00
Phil Estes
51023872dd
Merge pull request #9946 from austinvazquez/use-go-version-from-matrix
Use the Go toolchain in CI matrix to build binaries
2024-03-08 02:52:25 +00:00
Austin Vazquez
7ac9d6909c
Use the Go toolchain in CI matrix to build binaries
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-03-08 00:35:36 +00:00
Akihiro Suda
756e22005f
Merge pull request #9916 from containerd/dependabot/go_modules/github.com/stretchr/testify-1.9.0
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0
2024-03-07 23:32:08 +00:00
Phil Estes
3c34e2c87d
Merge pull request #6965 from adrianreber/2022-05-20-checkpoint-cri-rpc
Wire through CRI checkpoint RPC
2024-03-07 19:04:33 +00:00
Maksym Pavlenko
6a96e45012
Move shim package to pkg
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-03-07 10:05:26 -08:00
Adrian Reber
f25770e48d Wire through CRI ContainerCheckpoint RPC
This connects the new CRI ContainerCheckpoint RPC to the existing
internal checkpoint functions. With this commit it is possible
to checkpoint a container in Kubernetes using the Forensic Container
Checkpointing KEP (#2008):

 # curl X POST "https://localhost:10250/checkpoint/namespace/podId/container"

Which will result in containerd creating a checkpoint in the location
specified by Kubernetes (usually /var/lib/kubelet/checkpoints).

This is a Linux only feature because CRIU only exists on Linux.

Rewritten with the help of Phil Estes.

Signed-off-by: Phil Estes <estesp@gmail.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2024-03-07 17:34:07 +00:00
Derek McGowan
e53663cca7
Merge pull request #9932 from AkihiroSuda/go-1.21.8
update to go 1.21.8, 1.22.1
2024-03-07 05:08:18 +00:00
Fu Wei
1afc6ca3be
Merge pull request #9659 from ambarve/cimfs_unionfs
Don't create new scratch VHD per image for CimFS
2024-03-07 04:51:03 +00:00
Akihiro Suda
7ecdebff93
update to go 1.21.8, 1.22.1
See https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-07 08:32:40 +09:00
Derek McGowan
d9a867a076
Merge pull request #9939 from estesp/disable-test-failure-GHA
Disable OOM set score unpriv test temporarily
2024-03-06 21:28:18 +00:00
Phil Estes
723306d0ed
Disable OOM set score unpriv test temporarily
Temporary skip while we find root cause of GHA environment changes
causing failure.

Signed-off-by: Phil Estes <estesp@amazon.com>
2024-03-06 11:38:53 -05:00
Amit Barve
994fdd74e5 Don't create new scratch VHD per image for CimFS
CimFS layers don't need to create a new scratch VHD per image. The scratch VHDs used with CimFS are empty so
we can just create one base VHD and one differencing VHD and copy it for every scratch snapshot.
(Note that UVM VHDs are still unique per image because the VHD information is embedded in the UVM BCD during
import)

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2024-03-06 04:18:17 -08:00
Fu Wei
e814b03c74
Merge pull request #9925 from kiashok/updaetHcsshimTag-0.12.0
Update hcsshim to v0.12.0
2024-03-05 08:26:25 +00:00
Fu Wei
de6a094a28
Merge pull request #9598 from abel-von/sandbox-plugin-0103
sandbox: add event monitor for podsandbox controller
2024-03-05 08:23:31 +00:00
dependabot[bot]
016b588a98
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 06:15:37 +00:00
Maksym Pavlenko
9b6c1eee6e
Merge pull request #9924 from containerd/dependabot/go_modules/golang-x-ab76824e89
build(deps): bump the golang-x group with 2 updates
2024-03-05 05:40:02 +00:00
Maksym Pavlenko
3de575f17c
Merge pull request #9915 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.19.0
build(deps): bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0
2024-03-05 04:27:56 +00:00
Maksym Pavlenko
7d2bc0620b
Merge pull request #9911 from dmcgowan/introspection-split
Cleanup introspection interface
2024-03-05 03:20:45 +00:00
Maksym Pavlenko
c3dc7209f4
Merge pull request #9892 from dmcgowan/move-nri-packages
Move nri packages to plugin and internal
2024-03-05 01:31:52 +00:00
Akihiro Suda
580ae05986
Merge pull request #9910 from dmcgowan/ttrpc-proxy-interfaces
Add ttrpc to proxy interfaces
2024-03-05 01:01:22 +00:00
Kirtana Ashok
d9409c4611 Update hcsshim to v0.12.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-03-04 16:55:07 -08:00
dependabot[bot]
00d714e90a
build(deps): bump the golang-x group with 2 updates
Bumps the golang-x group with 2 updates: [golang.org/x/mod](https://github.com/golang/mod) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/mod` from 0.15.0 to 0.16.0
- [Commits](https://github.com/golang/mod/compare/v0.15.0...v0.16.0)

Updates `golang.org/x/sys` from 0.17.0 to 0.18.0
- [Commits](https://github.com/golang/sys/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 23:46:03 +00:00
dependabot[bot]
ab4de3e4c3
build(deps): bump azure/login from 1 to 2
Bumps [azure/login](https://github.com/azure/login) from 1 to 2.
- [Release notes](https://github.com/azure/login/releases)
- [Commits](https://github.com/azure/login/compare/v1...v2)

---
updated-dependencies:
- dependency-name: azure/login
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 23:06:36 +00:00
Derek McGowan
d3d4c5d2ae
Merge pull request #9828 from laurazard/fix-exec-exit-better
runc-shim: process exec exits before init (w/o extra locks!)
2024-03-04 17:32:51 +00:00
Phil Estes
afbb6dad52
Merge pull request #9918 from AkihiroSuda/cri-api-v0.30.0-alpha.3
go.mod: k8s.io/cri-api v0.30.0-alpha.3
2024-03-04 14:15:28 +00:00
Akihiro Suda
713dd8f8dc
go.mod: k8s.io/cri-api v0.30.0-alpha.3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-04 17:04:21 +09:00
Akihiro Suda
d9b9160ae1
mv internal/testutil pkg/testutil
The package is consumed by several snapshotter plugins

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-04 17:00:39 +09:00
dependabot[bot]
752917c0f3
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.18.0 to 1.19.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.18.0...v1.19.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-03-04 07:57:02 +00:00
Kohei Tokunaga
7a3b7fba59
Transfer: Registry: Enable to use registry configuration diretory
Currently transfer service isn't aware of configurations of hosts directory and
ctr's `--hosts-dir` doesn't work.
This commit fixes this issue by using `config.ConfigureHosts` instead of
`docker.ConfigureDefaultRegistries`.
This commit also fixes ctr to use this feature for "--hosts-dir" flag.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-03-04 15:43:30 +09:00
Derek McGowan
1bf781d8eb
Cleanup introspection interface
Split service proxy from service plugin.
Make introspection service easier for clients to use.
Update service proxy to support grpc and ttrpc.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-01 23:07:42 -08:00
Derek McGowan
5bd204109f
Remove grpc from Client connection interface
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-01 14:27:28 -08:00
Derek McGowan
347346e3cf
Add ttrpc support to content proxy
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-03-01 14:27:27 -08:00
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
Maksym Pavlenko
4c6d0ef1d5
Merge pull request #9833 from dmcgowan/update-1.7-release-timeline
Update 1.7 support timeline
2024-02-21 20:33:58 +00:00
dependabot[bot]
04c37d5659
build(deps): bump the k8s group with 5 updates
Bumps the k8s group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.29.1` | `0.29.2` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.29.1` | `0.29.2` |
| [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.29.1` | `0.29.2` |
| [k8s.io/klog/v2](https://github.com/kubernetes/klog) | `2.110.1` | `2.120.1` |
| [k8s.io/kubelet](https://github.com/kubernetes/kubelet) | `0.29.1` | `0.29.2` |


Updates `k8s.io/apimachinery` from 0.29.1 to 0.29.2
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.29.1...v0.29.2)

Updates `k8s.io/client-go` from 0.29.1 to 0.29.2
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.29.1...v0.29.2)

Updates `k8s.io/component-base` from 0.29.1 to 0.29.2
- [Commits](https://github.com/kubernetes/component-base/compare/v0.29.1...v0.29.2)

Updates `k8s.io/klog/v2` from 2.110.1 to 2.120.1
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.110.1...v2.120.1)

Updates `k8s.io/kubelet` from 0.29.1 to 0.29.2
- [Commits](https://github.com/kubernetes/kubelet/compare/v0.29.1...v0.29.2)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: k8s
- dependency-name: k8s.io/kubelet
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-21 19:33:00 +00:00
Phil Estes
b6ee1add7c
Merge pull request #9845 from dcantah/prometheus-middleware-deprecated
Replace go-grpc-prometheus with go-grpc-middleware/providers/prometheus
2024-02-21 18:55:34 +00:00
Phil Estes
b93409cf72
Merge pull request #9848 from akhilerm/update-crun-version
ci: update crun version to 1.14.3
2024-02-21 18:53:08 +00:00
Phil Estes
8ce402c24c
Merge pull request #9787 from AkihiroSuda/cri-rro-kep-3857
KEP-3857: Recursive Read-only (RRO) mounts
2024-02-21 18:52:43 +00:00
Derek McGowan
b8654e36f4
Merge pull request #8379 from jedevc/docker-pusher-concurrency
Fix various timing issues with docker pusher
2024-02-21 17:59:56 +00:00
Akhil Mohan
bd48104159
ci: update crun version to 1.14.3
Changes:
https://github.com/containers/crun/compare/1.14...1.14.3

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-02-21 18:46:02 +05:30
Derek McGowan
50d0de96a8
Update 1.7 support timeline
Tie the 1.7 support timeline to 1.6.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-20 14:32:27 -08:00
Brian Goff
4fbc9842d5 Changes to configuring otel from env only
These are standard environment variables described by the otel spec in
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/.

The old config options are removed

Also since otel will by default try to connect to https://localhost:4318
if no endpoint is set, this will also just disable the otlp plugin when
there is no endpoint so we don't have otel continuously trying to
connect to the default endpoint, littering the logs with connection
failure messages and collecting traces that won't go anywhere.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-02-20 21:59:45 +00:00
Brian Goff
753a525b3b Deprecate otel configs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-02-20 21:59:42 +00:00
Maksym Pavlenko
4510ca3db1
Merge pull request #9789 from dmcgowan/update-restart-plugin-type
Add container monitor plugin type for restart
2024-02-20 21:56:37 +00:00
Maksym Pavlenko
d32dc0e76d
Merge pull request #9847 from akhilerm/replace-prestart-oci-hook
replace deprecated Prestart to CreateRuntime hook
2024-02-20 21:51:02 +00:00
Maksym Pavlenko
16da4deddc
Merge pull request #9843 from containerd/dependabot/go_modules/github.com/opencontainers/image-spec-1.1.0
build(deps): bump github.com/opencontainers/image-spec from 1.1.0-rc6 to 1.1.0
2024-02-20 21:48:50 +00:00
Akhil Mohan
0693b936d2
replace deprecated Prestart to CreateRuntime hook
Prestart Hook is deprecated and can be replaced with CreateRuntime hook

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-02-20 21:54:47 +05:30
Danny Canter
6a21c96b55 Replace go-grpc-prometheus with go-grpc-middleware/providers/prometheus
Fixes #9806

go-grpc-prometheus is deprecated. The new location it was moved to also introduced
an entirely new api, but afaict this matches what we have at the moment.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-02-20 02:01:57 -08:00
Fu Wei
4612201f87
Merge pull request #9635 from Burning1020/fix-cri-mounts
cri: Stat host sandbox files before adding them
2024-02-20 09:54:16 +00:00
dependabot[bot]
567e56a206
build(deps): bump github.com/opencontainers/image-spec
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc6 to 1.1.0.
- [Release notes](https://github.com/opencontainers/image-spec/releases)
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md)
- [Commits](https://github.com/opencontainers/image-spec/compare/v1.1.0-rc6...v1.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 23:15:19 +00:00
Austin Vazquez
6a759713ad
Update golangci-lint to v1.56.1
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-02-19 15:15:01 +00:00
Austin Vazquez
f44d90be4a
Rename variables and snapshotter option to resolve lint warnings
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-02-19 15:14:00 +00:00
Zhang Tianyang
5611db5309 cri: Make sure host sandbox files exist before adding them to mounts
As `setupSandboxFiles` was done in sandbox controller, it is difficult
here to know if the sandbox controller has done and where the host path
in. Make sure the host path exists before adding them to linux container
mounts, otherwise, the container would generate some unnecessary mounts.

Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2024-02-19 20:40:24 +08:00
Akihiro Suda
9077d13728
KEP-3857: Recursive Read-only (RRO) mounts
See kubernetes/enhancements issue 3857 (PR 3858).

Replaces PR 9713 `cri: make read-only mounts recursively read-only`

Unlike PR 9713, this PR does not automatically upgrade RO mounts to RRO.

Test depends on:
- kubernetes-sigs/cri-tools PR 1344

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-19 00:42:50 +09:00
Akihiro Suda
83ad4367d1
script/test/utils.sh: readiness_check: print daemon log
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-17 23:56:38 +09:00
Samuel Karp
b87d78f456
Merge pull request #9765 from AkihiroSuda/remove-schema1
Disable the support for Schema 1 images
2024-02-17 09:20:15 +00:00
Phil Estes
1641c7571f
Merge pull request #9809 from dereknola/urfave_v2
Migrate Urfave CLI from v1 to v2
2024-02-16 16:13:37 +00:00
Phil Estes
0f5586ee09
Merge pull request #9748 from fuweid/upgrade-testcase
test: update upgrade test suite in integration
2024-02-16 16:11:25 +00:00
Fu Wei
dc88cdea1b
Merge pull request #9829 from mxpv/fp
Run failpoints tests only for runc
2024-02-16 06:10:08 +00:00
Derek McGowan
c36950d64e
Merge pull request #9831 from mxpv/status
Workaround "required job statuses" job list
2024-02-16 06:09:34 +00:00
Derek McGowan
d346aeebdf
Merge pull request #9746 from neoaggelos/fix/config-glob
Fix config import relative path glob
2024-02-16 06:08:17 +00:00
Derek McGowan
f8f1e5f7a6
Add container monitor plugin type for restart
Adds a plugin type for container monitor.
Rename the task monitor type to avoid confusion.
Add config migration for new plugin types to pass existing migration
tests.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-15 21:54:40 -08:00
Wei Fu
c86c8a16f0 integration: add case related to ContainerStats in upgrade suite
It's used to check new release containerd can parse metric data from existing
shim created by previous release.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
acec60f554 integration: update recover case for upgrade
The new release containerd should detect dead shim during recover.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
e659cd2752 integration: connect to shim by bridge client
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
51689b6618 integration: introduce hook for upgrade test suite
We can inject failpoint in beforeUpgradeHookFunc.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
a95c8ed591 integration: check data dir after delete container or pod
The new release containerd should cleanup old pod's data dir after
RemovePodSandbox.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
ec759f5be4 integration/*: extend Runtime.Status response
CRI Runtime Status contains `Info` and it can help us check current
configuration.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
401d4b491f integration: add some helper function to release upgrade cases
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:30 +08:00
Maksym Pavlenko
7cf8a00c77
Run failpoints tests only for runc
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 12:19:31 -08:00
Maksym Pavlenko
a890c8e537
Add job to report statuses from matrix jobs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 12:13:58 -08:00
Derek Nola
132485adb0
Convert CLI to urfave v2
Followed the Migration Guide at https://cli.urfave.org/migrate-v1-to-v2/
The major changes not pointed out in the migration guide are:
- context.Args() no longer produces a []slice, so context.Args().Slice()
  in substitued
- All cli.Global***** are deprecated (the migration guide is somewhat
  unclear on this)

Signed-off-by: Derek Nola <derek.nola@suse.com>

Vendor in urfave cli/v2

Signed-off-by: Derek Nola <derek.nola@suse.com>

Fix NewStringSlice calls

Signed-off-by: Derek Nola <derek.nola@suse.com>
2024-02-15 09:48:04 -08:00
Phil Estes
00fe7a4974
Merge pull request #9827 from dmcgowan/move-config-version
Move config version to version package
2024-02-15 14:58:04 +00:00
Kirill A. Korinsky
c8766123d9
Prevent GC from schedule itself with 0 period.
On startup `gcTimeSum` might work fast and return `0`, so on this case
the algorithm turns in infinity loop which simple consume CPU on timer
which fires without any interval.

Use `5ms` as fallback to have interval `245ms` for that case.

Closes: https://github.com/containerd/containerd/issues/5089

Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
2024-02-15 11:32:53 +01:00
Derek McGowan
a086125ae3
Move config version to version package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-14 21:09:44 -08:00
Akihiro Suda
99721c27e1
Disable the support for Schema 1 images
Schema 1 (`application/vnd.docker.distribution.manifest.v1+prettyjws`) has been
officially deprecated since containerd v1.7 (PR 6884).

We have planned to remove the support for Schema 1 in containerd v2.0, but this
removal may still surprise some users.
So, in containerd v2.0 we will just disable it by default.

The support for Schema 1 can be still enabled by setting an environment variable
`CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1`, however, this workaround
will be completely removed in containerd v2.1.

Schema 2 was introduced in Docker 1.10 (Feb 2016), so most users should
have been already using Schema 2 or OCI.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-15 11:11:35 +09:00
Mike Brown
f1a3c3705f
Merge pull request #9815 from kiashok/updateCRIServicePull
Pass runtimehandler from CRI to pull image request
2024-02-15 00:38:40 +00:00
Mike Brown
97f86f18ae
Merge pull request #9788 from kiashok/criRemoveImage
Add CRIImageService.RemoveImage()
2024-02-14 23:49:07 +00:00
Kirtana Ashok
b9dfba5b80 Add CRIImageService.RemoveImage()
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-14 13:49:39 -08:00
Kirtana Ashok
4c775fcfbf Pass runtimehandler from CRI pull image request
Starting with k8s cri-api v0.29.1, CRI supports new runtime handler flag

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-14 13:31:23 -08:00
Akihiro Suda
32169d591d
Merge pull request #9807 from AkihiroSuda/ctr-print-deprecations
ctr: print deprecation warnings on every invocation
2024-02-14 05:48:52 +00:00
Akihiro Suda
a2cf4fb9ba
Merge pull request #9817 from kiashok/moveToTraceLogs
Move high volume event logs to Trace level
2024-02-14 05:42:44 +00:00
Kirtana Ashok
4dcf089fa3 Move high volume event logs to Trace level
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-13 20:05:50 -08:00
Maksym Pavlenko
a843731305
Merge pull request #9767 from AkihiroSuda/cri-propagate-deprecation
cri: propagate deprecation list to runtime status
2024-02-13 21:22:26 +00:00
Akihiro Suda
1b3a96da6c
cri: propagate deprecation list to runtime status
Propagate the deprecation list to CRI runtime conditions.

The propagated conditions are visible via `crictl info`,
but not visible via `kubectl get nodes -o yaml` yet, although
the CRI API says "These conditions will be exposed to users to help
them understand the status of the system".

https://github.com/kubernetes/cri-api/blob/v0.29.1/pkg/apis/runtime/v1/api.proto#L1505-L1509

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-14 03:59:49 +09:00
Akihiro Suda
ec26600394
Merge pull request #9814 from mikebrow/update-critools
moving up cri-tools to pull in new CRI changes tied to k8s v1.29
2024-02-13 18:54:53 +00:00
Mike Brown
ac7febc93a moving up for new CRI changes
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2024-02-13 12:14:27 -06:00
Mike Brown
dd725fae25
Merge pull request #9378 from kiashok/updateCriApi
Update cri-api to v0.29.1
2024-02-13 16:01:10 +00:00
Fu Wei
81965c0a57
Merge pull request #9813 from UiPath/remove-loop-config
Remove internal LoopConfig struct
2024-02-13 11:50:36 +00:00
Alexandru Matei
ccec1e6e4c Remove internal LoopConfig struct
The struct is now part of golang.org/x/sys.
Follow-up for #9805

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2024-02-13 11:49:28 +02:00
Akihiro Suda
b21e93b320
Merge pull request #9811 from containerd/dependabot/go_modules/golang-x-cd731e5d14
build(deps): bump the golang-x group with 1 update
2024-02-13 07:03:42 +00:00
Akihiro Suda
1435b0552e
Merge pull request #9810 from containerd/dependabot/github_actions/golangci/golangci-lint-action-4
build(deps): bump golangci/golangci-lint-action from 3 to 4
2024-02-13 06:24:55 +00:00
dependabot[bot]
3d8da2ebfc
build(deps): bump the golang-x group with 1 update
Bumps the golang-x group with 1 update: [golang.org/x/mod](https://github.com/golang/mod).


Updates `golang.org/x/mod` from 0.14.0 to 0.15.0
- [Commits](https://github.com/golang/mod/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 23:58:13 +00:00
dependabot[bot]
a274439f2e
build(deps): bump golangci/golangci-lint-action from 3 to 4
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 23:37:29 +00:00
Maksym Pavlenko
4f76ebcb86
Merge pull request #9778 from adisky/use-latest-registry-conf
Update gce configure.sh to use registry config_path
2024-02-12 19:34:47 +00:00
Derek McGowan
44f92599e5
Merge pull request #9805 from UiPath/use-sys-for-loop-configure
go.mod: Bump golang.org/x/sys to v0.17.0
2024-02-12 18:28:20 +00:00
Akihiro Suda
468bee9a79
ctr: print deprecation warnings on every invocation
Print deprecation warnings on any ctr command, as users won't notice the
deprecations until we actually remove the deprecated features.

The warnings can be suppressed by setting
`CONTAINERD_SUPPRESS_DEPRECATION_WARNINGS=1`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-13 02:51:02 +09:00
Maksym Pavlenko
d4d228926c
Merge pull request #9804 from dims/revert-fix-for-k8s-nfs-related-tests
Revert "Fix for k8s nfs related tests"
2024-02-12 17:35:32 +00:00
Phil Estes
dff12d83fa
Merge pull request #9802 from austinvazquez/fix-links-in-snapshotter-docs
Fix unpacker link in remote snapshotter docs
2024-02-12 17:02:04 +00:00
Alexandru Matei
c2dfae8d05 go.mod: Bump golang.org/x/sys to v0.17.0
Replace internal LOOP_CONFIGURE ioctl implementation with
IoctlLoopConfigure from sys

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2024-02-12 15:55:33 +02:00
Davanum Srinivas
2c7520d6eb
Merge pull request #9803 from mxpv/depr
Remove deprecated functions and packages
2024-02-11 13:10:46 +00:00
Davanum Srinivas
41bb8b816b
Revert "Fix for k8s nfs related tests"
This reverts commit 23ebfd0305.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-10 22:34:30 -05:00
Maksym Pavlenko
48c8c5f502 Remove ParseSignal from client
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-10 18:02:05 -08:00
Maksym Pavlenko
281eb22ccd Remove deprecated dialer
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-10 17:58:38 -08:00
Maksym Pavlenko
1ce7b99511 Remove deprecated filesys funcs
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-10 17:55:57 -08:00
Maksym Pavlenko
5ca56ddbb4 Remove deprecated funcs from restart package
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-10 17:54:48 -08:00
Maksym Pavlenko
653b808992 Remove deprecated docker package
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-10 17:54:30 -08:00
Austin Vazquez
413fbe82c7
Fix unpacker link in remote snapshotter docs
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-02-10 16:42:24 -08:00
Davanum Srinivas
bb45ce1e06
Merge pull request #9799 from dims/fix-for-k8s-nfs-related-tests
Fix for k8s nfs related tests probably caused by `ulimit` changes
2024-02-10 20:46:45 +00:00
Maksym Pavlenko
128f249f0e
Merge pull request #9790 from dmcgowan/mv-transfer-packages
Move transfer and unpack packages to core
2024-02-10 16:49:55 +00:00
Davanum Srinivas
23ebfd0305
Fix for k8s nfs related tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-10 11:28:23 -05:00
kiashok
25ab902198 Update to v0.29.1 cri-api
Signed-off-by: kiashok <kiashok@microsoft.com>
2024-02-09 19:27:42 -08:00
Maksym Pavlenko
8ccc902cd1
Merge pull request #9798 from containerd/dependabot/go_modules/otel-6196c52bdd
build(deps): bump the otel group with 8 updates
2024-02-09 19:07:48 +00:00
Phil Estes
9b2313711b
Merge pull request #9782 from kinvolk/rata/userns-update-podSandboxStatus
Include userns info in cri/server PodSandboxStatus
2024-02-09 17:40:23 +00:00
dependabot[bot]
5e3e12d2ab
build(deps): bump the otel group with 8 updates
Bumps the otel group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.46.1` | `0.48.0` |
| [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) | `0.45.0` | `0.48.0` |
| [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | `1.21.0` | `1.23.0` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | `1.19.0` | `1.23.1` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | `1.19.0` | `1.23.1` |
| [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | `1.19.0` | `1.23.1` |
| [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | `1.21.0` | `1.23.1` |
| [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | `1.21.0` | `1.23.1` |


Updates `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` from 0.46.1 to 0.48.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.46.1...zpages/v0.48.0)

Updates `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` from 0.45.0 to 0.48.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go-contrib/compare/zpages/v0.45.0...zpages/v0.48.0)

Updates `go.opentelemetry.io/otel` from 1.21.0 to 1.23.0
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.23.0)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from 1.19.0 to 1.23.1
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.23.1)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` from 1.19.0 to 1.23.1
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.23.1)

Updates `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` from 1.19.0 to 1.23.1
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.23.1)

Updates `go.opentelemetry.io/otel/sdk` from 1.21.0 to 1.23.1
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.23.1)

Updates `go.opentelemetry.io/otel/trace` from 1.21.0 to 1.23.1
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.21.0...v1.23.1)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: otel
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 17:15:30 +00:00
Phil Estes
1b67dd7235
Merge pull request #9797 from austinvazquez/update-scorecards-dependency
Update codeql-action/upload-sarif dependency in scorecards workflow
2024-02-09 16:42:16 +00:00
Derek McGowan
528dcfaab9
Merge pull request #9794 from kiashok/updateGoVersion
Build with Go 1.22.0
2024-02-09 16:35:50 +00:00
Derek McGowan
8e5d6c893d
Merge pull request #9796 from austinvazquez/fix-links
Fix CRI link in readme
2024-02-09 05:13:02 +00:00
Austin Vazquez
c4bb72ae40
Remove CRI plugin path note
The links GitHub Action workflow is failing after a refactor to move the
CRI package from pkg/cri to internal/cri. The note which contained the
link is no longer needed as CRI plugin has been internal since v1.5.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-02-09 03:44:27 +00:00
Kirtana Ashok
87aa9e8008 Drop go 1.20 and build against 1.22
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-08 17:57:51 -08:00
Austin Vazquez
2763846956
Update codeql-action/upload-sarif dependency in scorecards workflow
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-02-09 00:47:37 +00:00
Maksym Pavlenko
b3f1c15b6a
Merge pull request #9786 from mxpv/ci
Extract setup-go step into composite action
2024-02-09 00:21:06 +00:00
Akihiro Suda
b466b7ef85
Merge pull request #9747 from AkihiroSuda/revert-9713
Revert "cri: make read-only mounts recursively read-only"
2024-02-08 10:29:03 +00:00
Akihiro Suda
1f58a53a61
Merge pull request #8048 from profnandaa/docs/windows-setup
docs: add step to include binaries in the $env:Path
2024-02-08 08:18:59 +00:00
Derek McGowan
634ac2f8fa
Update migration script for transfer packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-07 22:43:19 -08:00
Derek McGowan
f46aea6187
Move transfer and unpack packages
Packages related to transfer and unpacking provide core interfaces which
use other core interfaces and part of common functionality.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-07 22:40:15 -08:00
Aditi Sharma
d9b95ab686 Update gce configure.sh to use registry config_path
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2024-02-08 09:26:39 +05:30
Maksym Pavlenko
f5ed7b84e9
Merge pull request #9705 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.1.0
build(deps): bump google-github-actions/upload-cloud-storage from 2.0.0 to 2.1.0
2024-02-07 21:33:20 +00:00
Maksym Pavlenko
b85ad238b9
Merge pull request #9752 from dmcgowan/update-console-vendor
Update github.com/containerd/console to v1.0.4
2024-02-07 21:09:43 +00:00
Maksym Pavlenko
360fbf197b
Fix windows integration tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-07 13:01:43 -08:00
Maksym Pavlenko
2820343d47
Update workflow files to install Go via composite action
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-07 12:36:23 -08:00
Maksym Pavlenko
488b563610
Extract a composite action to install Go
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-07 12:28:17 -08:00
Derek McGowan
7fe08c63eb
Merge pull request #9733 from kiashok/platform-protobuf
Add OSVersion to platform protobuf
2024-02-07 20:20:47 +00:00
kiashok
5aa05481dd Add OSVersion to platform protobuf
It also extends the functions in api/types/platform_helpers.go

Signed-off-by: kiashok <kiashok@microsoft.com>
2024-02-07 11:33:51 -08:00
kiashok
d9cae66d8d Extend string match in make protos
Signed-off-by: kiashok <kiashok@microsoft.com>
2024-02-07 11:30:32 -08:00
Derek McGowan
c58b1fb407
Update github.com/containerd/console to v1.0.4
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-07 10:15:53 -08:00
Davanum Srinivas
69dff411ad
Merge pull request #9732 from henry118/big9726
bug fix: make sure cri image is pinned when it is pulled outside cri
2024-02-07 17:58:21 +00:00
Rodrigo Campos
06ed897b22 cri/server: Add userns tests in PodSandboxStatus
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-02-07 17:06:01 +01:00
Rodrigo Campos
6c356a5c75 cri: Expose userns in PodSandboxStatus rpc
We added support for userns but we weren't showing it in the
podSandboxStatus.

Let's just show the whole nsOpts, so we don't forget in the future
either if something else inside there changes.

Please note that this will expose the content of nsOpts.TargetId that we
weren't exposing before. But that seemed like a bug to me.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>

Maybe this is better?
2024-02-07 17:06:01 +01:00
Henry Wang
1eaf0c1f04 bug fix: make sure cri image is pinned when it is pulled outside cri
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-02-07 16:03:40 +00:00
Fu Wei
ff464f3687
Merge pull request #9779 from dmcgowan/move-image-event-publishing
Move image event publishing to metadata store
2024-02-07 14:10:42 +00:00
Fu Wei
805ed8e871
Merge pull request #9743 from klihub/fixes/nri-fd-double-close
go.{mod,sum}: update NRI dependency, fixing a potential fd double close error.
2024-02-07 08:15:40 +00:00
Samuel Karp
886795dd32
Merge pull request #9777 from mxpv/ci
[CI] Move inline PS scripts into files
2024-02-07 08:13:05 +00:00
Fu Wei
de14037133
Merge pull request #9744 from klihub/devel/enable-nri-by-default
Flip NRI on by default.
2024-02-07 07:55:29 +00:00
Derek McGowan
79a3b20a63
Merge pull request #9764 from Fish-pro/patch-1
Clean up repeated package import
2024-02-07 05:53:38 +00:00
Derek McGowan
9eb9038a9e
Avoid publishing data events during transaction
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-06 21:38:32 -08:00
Derek McGowan
86530c0afb
Move image event publishing to metadata store
The metadata store is in the best place to handle events directly after
the database has been updated. This prevents every user of the image
store interface from having to know whether or not they are responsible
for publishing events and avoid double events if the grpc local service
is used.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-06 21:24:55 -08:00
Maksym Pavlenko
32bd8eff9e Move inline PS scripts into files
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-06 18:27:21 -08:00
Krisztian Litkey
4e8e21a7d6
go.{mod,sum}: update NRI dependency, re-vendor.
Pull in latest NRI fixing a potential fd double close error.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-02-06 14:03:07 +02:00
Fu Wei
2f807b606a
Merge pull request #9750 from jiusanzhou/bugfix/integration-fix-strace-inject
Support inject delay running with the old version (4.x) of strace for test case
2024-02-06 05:30:42 +00:00
Maksym Pavlenko
d297fbee39
Merge pull request #9753 from kiashok/updateHcsshimMain
Update hcsshim to v0.12.0-rc.3
2024-02-06 03:45:22 +00:00
Fu Wei
e5a8e6ebcd
Merge pull request #9763 from mxpv/stale
Treat PRs that require rebase > 90 days as stale
2024-02-06 03:36:54 +00:00
Zechun Chen
5cbe92e88e Clean up repeated package import
Signed-off-by: Zechun Chen <zechun.chen@daocloud.io>
2024-02-06 11:06:33 +08:00
Maksym Pavlenko
72950c00b8 Treat PRs that require rebase > 90 days as stale
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-05 18:23:20 -08:00
Maksym Pavlenko
c78d526825
Merge pull request #9757 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.6
build(deps): bump github.com/klauspost/compress from 1.17.5 to 1.17.6
2024-02-06 02:13:35 +00:00
Maksym Pavlenko
56e026bf70
Merge pull request #9760 from containerd/dependabot/go_modules/github.com/opencontainers/image-spec-1.1.0-rc6
build(deps): bump github.com/opencontainers/image-spec from 1.1.0-rc5 to 1.1.0-rc6
2024-02-06 02:12:55 +00:00
Maksym Pavlenko
a4ff0b3139
Merge pull request #9754 from mxpv/ttrpc_update
Update TTRPC
2024-02-06 02:02:16 +00:00
dependabot[bot]
db437580bc
build(deps): bump github.com/opencontainers/image-spec
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.1.0-rc5 to 1.1.0-rc6.
- [Release notes](https://github.com/opencontainers/image-spec/releases)
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md)
- [Commits](https://github.com/opencontainers/image-spec/compare/v1.1.0-rc5...v1.1.0-rc6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 23:31:58 +00:00
dependabot[bot]
2c7d69530d
build(deps): bump github.com/klauspost/compress from 1.17.5 to 1.17.6
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.5 to 1.17.6.
- [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.5...v1.17.6)

---
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-05 23:30:39 +00:00
Maksym Pavlenko
da1673f55d Update vendor
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-05 11:48:16 -08:00
Maksym Pavlenko
047d42e901 Update ttrpc to v1.2.3
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-05 11:48:04 -08:00
Kirtana Ashok
64e96c7d47 Update hcsshim to v0.12.0-rc.3
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-05 10:42:36 -08:00
Zoe
a9060cda4a Support inject delay running with the old version (4.x) of strace for test case.
Only the newer version of strace can support `--detach-on` options
and set time duration with human readable string.

In the 4.x version of strace, using `-b` to replace `--detach-on`,
and injecting a delay with int usecs.

Signed-off-by: Zoe <hi@zoe.im>
2024-02-05 21:27:41 +08:00
Anthony Nandaa
9ef94fe528 fix(docs): fix cp and add step to include binaries in the $env:Path
This commit adds an extra (optional) step for the Windows
installation/set-up to include the containerd binaries in
the $env:Path so that later executions especially
for `ctr.exe` if needed, do not require to specify the full path.

It also further fixes the previous steps to be absolute and
also work with re-installations and upgrades.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2024-02-05 11:41:45 +03:00
Fu Wei
f5e7fe0cb6
Merge pull request #9644 from abel-von/fix-sandbox-status
sandbox: fix podsandbox recover status issue
2024-02-05 07:50:34 +00:00
Samuel Karp
0125a42fb5
Merge pull request #9729 from mxpv/duration
Remove duplicated TOML duration parsers
2024-02-05 07:43:51 +00:00
Krisztian Litkey
fe24b918f6
pkg/nri, docs: enable NRI by default.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-02-04 11:41:56 +02:00
Abel Feng
e230ed939c sandbox: add sandbox recover ut and e2e test
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-04 11:55:46 +08:00
Abel Feng
3124964743 sandbox: fix recover status set issue
We can't set the status to Ready before task.Wait succeed.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-04 11:52:37 +08:00
Angelos Kolaitis
256637249b
Fix config import relative path glob
Previously, resolveImports would apply a glob filter if
the path contained any '*', or otherwise convert relative
paths to absolute. This meant that it was impossible to
specify globs with paths relative to the main config file.

This commit first resolves relative to absolute paths, then
applies the glob filter (if any). A test case is added to ensure
that this now works as expected.

Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
2024-02-03 21:03:11 +02:00
Akihiro Suda
6670695836
Revert "cri: make read-only mounts recursively read-only"
Revert PR 9713, as it appeared to break the compatibility too much
https://github.com/kubernetes/enhancements/pull/3858#issuecomment-1925441072

This reverts commit b2f254fff0.

> Conflicts:
>	internal/cri/opts/spec_linux_opts.go

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-04 01:17:14 +09:00
Justin Chadwell
a9152ebf89 copy: prevent potential deadlock if close before fully written
We also need an additional check to avoid setting both the error and
response which can create a race where they can arrive in the receiving
thread in either order.

If we hit an error, we don't need to send the response.

> There is a condition where the registry (unexpectedly, not to spec)
> returns 201 or 204 on the put before the body is fully written. I would
> expect that the http library would issue close and could fall into a
> deadlock here. We could just read respC and call setResponse. In that
> case ErrClosedPipe would get returned and Commit shouldn't be called
> anyway.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:20:11 +01:00
Justin Chadwell
b48e1141eb copy: setError should imply Close
If sending two messages from goroutine X:

	a <- 1
	b <- 2

And receiving them in goroutine Y:

	select {
	case <- a:
	case <- b:
	}

Either branch of the select can trigger first - so when we call
.setError and .Close next to each other, we don't know whether the done
channel will close first or the error channel will receive first - so
sometimes, we get an incorrect error message.

We resolve this by not sending both signals - instead, we can have
.setError *imply* .Close, by having the pushWriter call .Close on
itself, after receiving an error.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:20:11 +01:00
Justin Chadwell
e4f91c2df0 copy: remove max number of ErrResets
If a writer continually asks to be reset then it should always succeed -
it should be the responsibility of the underlying content.Writer to
stop producing ErrReset after some amount of time and to instead return
the underlying issue - which pushWriter already does today, using the
doWithRetries function.

doWithRetries already has a separate cap for retries of 6 requests (5
retries after the original failure), and it seems like this would be
previously overridden by content.Copy's max number of 5 attempts, hiding
the original error.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:20:10 +01:00
Justin Chadwell
651cfa2a2c pushWriter: refactor reset pipe logic into separate function
Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:18:05 +01:00
Justin Chadwell
9d7641ff3e copy: improve error detection from closed pipes
If we get io.ErrClosedPipe in pushWriter.Write, there are three possible
scenarios:

- The request has failed, we need to attempt a reset, so we can expect a
  new pipe incoming on pipeC.
- The request has failed, we don't need to attempt a reset, so we can
  expect an incoming error on errC.
- Something else externally has called Close, so we can expect the done
  channel to be closed.

This patch ensures that we block for as long as possible (while still
handling each of the above cases, so we avoid hanging), to make sure
that we properly return an appropriate error message each time.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:18:05 +01:00
Justin Chadwell
91a50f70b7 copy: check if writer was closed before setting a pipe
If Close is called externally before a request is attempted, then we
will accidentally attempt to send to a closed channel, causing a panic.

To avoid this, we can check to see if Close has been called, using a
done channel. If this channel is ever done, we drop any incoming errors,
requests or pipes - we don't need them, since we're done.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:18:05 +01:00
Justin Chadwell
4660f63033 copy: remove wrapping io.NopCloser from push writer pipe
io.Pipe produces a PipeReader and a PipeWriter - a close on the write
side, causes an error on both the read and write sides, while a close on
the read side causes an error on only the read side. Previously, we
explicitly prohibited closing from the read side.

However, http.Request.Body requires that "calling Close should unblock a
Read waiting for input". Our reader will not do this - calling close
becomes a no-op. This can cause a deadlock because client.Do may never
terminate in some circumstances.

We need the Reader side to close its side of the pipe as well, which it
already does using the go standard library - otherwise, we can hang
forever, writing to a pipe that will never be closed.

Allowing the requester to close the body should be safe - we never reuse
the same reader between requests, as the result of body() will never be
reused by the guarantees of the standard library.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2024-02-03 10:18:05 +01:00
Samuel Karp
96bf529cbf
Merge pull request #9742 from mxpv/envelope
Move Message proto to types
2024-02-03 06:32:01 +00:00
Derek McGowan
a896610da1
Merge pull request #9718 from jsturtevant/transfer-service-windows
Add a default differ for Windows that matches the snapshotter when using transfer service
2024-02-02 20:38:26 +00:00
Samuel Karp
1a39b91819
Merge pull request #9741 from mxpv/internal_cri
Move CRI from pkg/ to internal/
2024-02-02 19:38:44 +00:00
Maksym Pavlenko
0facc85925 Fix proto formatting
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 10:35:23 -08:00
Maksym Pavlenko
7f2d2c4f44 Move Message proto to types
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 10:35:23 -08:00
Maksym Pavlenko
2875247338 Fix formatting after moving CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 10:12:08 -08:00
Maksym Pavlenko
bbac058cf3 Move CRI from pkg/ to internal/
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-02 10:12:08 -08:00
Derek McGowan
db1e16da34
Merge pull request #9730 from thockin/main
CRI: An empty DNSConfig != unspecified
2024-02-02 17:32:45 +00:00
Tim Hockin
6e365e9250
CRI: An empty DNSConfig != unspecified
If we find that DNSConfig is provided and empty (not nil), we should not
replace it with the host's resolv.conf.

Also adds tests.

Signed-off-by: Tim Hockin <thockin@google.com>
2024-02-01 13:37:22 -08:00
Maksym Pavlenko
9340be717f
Remove duplicated TOML duration parsers
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-01 11:48:33 -08:00
Maksym Pavlenko
ac54047344
Merge pull request #9713 from AkihiroSuda/cri-rro
cri: make read-only mounts recursively read-only
2024-02-01 18:30:25 +00:00
Akihiro Suda
b2f254fff0
cri: make read-only mounts recursively read-only
Prior to this commit, `readOnly` volumes were not recursively read-only and
could result in compromise of data;
e.g., even if `/mnt` was mounted as read-only, its submounts such as
`/mnt/usbstorage` were not read-only.

This commit utilizes runc's "rro" bind mount option to make read-only bind
mounts literally read-only. The "rro" bind mount options is implemented by
calling `mount_setattr(2)` with `MOUNT_ATTR_RDONLY` and `AT_RECURSIVE`.

The "rro" bind mount options requires kernel >= 5.12, with runc >= 1.1 or
a compatible runtime such as crun >= 1.4.

When the "rro" bind mount options is not available, containerd falls back
to the legacy non-recursive read-only mounts by default.

The behavior is configurable via `/etc/containerd/config.toml`:
```toml
version = 2
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
  # treat_ro_mounts_as_rro ("Enabled"|"IfPossible"|"Disabled")
  # treats read-only mounts as recursive read-only mounts.
  # An empty string means "IfPossible".
  # "Enabled" requires Linux kernel v5.12 or later.
  # This configuration does not apply to non-volume mounts such as "/sys/fs/cgroup".
  treat_ro_mounts_as_rro = ""
```

Replaces:
- kubernetes/enhancements issue 3857
- kubernetes/enhancements PR 3858

Note: this change does not affect non-CRI clients such as ctr, nerdctl, and Docker/Moby.
RRO mounts have been supported since nerdctl v0.14 (containerd/nerdctl PR 511)
and Docker v25 (moby/moby PR 45278).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-01 09:39:36 +09:00
Akihiro Suda
0dbe758833
Merge pull request #9716 from AkihiroSuda/rocky8.9
CI: update Rocky Linux to 8.9
2024-01-31 21:28:05 +00:00
Akihiro Suda
cde08a4ff8
Merge pull request #9715 from AkihiroSuda/crun-1.14
CI: bump up crun to 1.14
2024-01-31 21:11:28 +00:00
Akihiro Suda
7ab553369f
Merge pull request #9722 from dmcgowan/update-runc-1.1.12
Update runc binary to v1.1.12
2024-01-31 21:10:57 +00:00
Akihiro Suda
27706ca4dc
Merge pull request #9721 from imba-tjd/patch-1
docs: fix typo
2024-01-31 21:10:36 +00:00
James Sturtevant
f74e5ce7e6
Move differ default to its own file
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
2024-01-31 09:54:27 -08:00
Derek McGowan
82fb589ffb
Update runc binary to v1.1.12
Update the runc binary, which includes a fix for [CVE-2024-21626].

- release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.12
- full diff: https://github.com/opencontainers/runc/compare/v1.1.11...v1.1.12

[CVE-2024-21626]: https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-31 09:31:59 -08:00
谭九鼎
87a9835f16
docs: fix typo
Signed-off-by: 谭九鼎 <109224573@qq.com>
2024-01-31 21:37:48 +08:00
James Sturtevant
81409e9373
Add a default differ that matches the snapshotter
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
2024-01-30 14:34:58 -08:00
Akihiro Suda
93573f5cf3
Merge pull request #9714 from AkihiroSuda/rm-docs-cri-installation.md
rm docs/cri/installation.md
2024-01-30 20:57:37 +00:00
Akihiro Suda
2369185aac
CI: update Rocky Linux to 8.9
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-31 05:56:46 +09:00
Akihiro Suda
d8460a702a
CI: bump up crun to 1.14
Changes:
- https://github.com/containers/crun/releases/tag/1.13
- https://github.com/containers/crun/releases/tag/1.14

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-31 05:16:16 +09:00
Akihiro Suda
ebbce74230
rm docs/cri/installation.md
The file was replaced with the "Please update your bookmark" page on
Apr 1, 2022 (PR 6758).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-31 05:04:54 +09:00
Akihiro Suda
d58ec0b1ef
Merge pull request #9710 from containerd/dependabot/go_modules/github.com/google/uuid-1.6.0
build(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0
2024-01-30 19:51:39 +00:00
Akihiro Suda
4e34612df7
Merge pull request #9709 from containerd/dependabot/go_modules/google.golang.org/grpc-1.61.0
build(deps): bump google.golang.org/grpc from 1.60.1 to 1.61.0
2024-01-30 19:51:21 +00:00
Phil Estes
b537ed7436
Merge pull request #9711 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.5
build(deps): bump github.com/klauspost/compress from 1.17.4 to 1.17.5
2024-01-30 14:19:32 +00:00
Akihiro Suda
728b45d5c2
Merge pull request #9708 from containerd/dependabot/go_modules/github.com/containerd/plugin-0.1.0
build(deps): bump github.com/containerd/plugin from 0.0.0-20231101173250-7ec69893e1e7 to 0.1.0
2024-01-30 13:23:14 +00:00
Maksym Pavlenko
d558f889ca
Merge pull request #9706 from containerd/dependabot/github_actions/lycheeverse/lychee-action-1.9.3
build(deps): bump lycheeverse/lychee-action from 1.9.1 to 1.9.3
2024-01-30 04:26:37 +00:00
dependabot[bot]
49d5cc7f96
build(deps): bump github.com/klauspost/compress from 1.17.4 to 1.17.5
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.4 to 1.17.5.
- [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.4...v1.17.5)

---
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-01-29 23:48:00 +00:00
dependabot[bot]
4d33170ea8
build(deps): bump github.com/google/uuid from 1.5.0 to 1.6.0
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.5.0...v1.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 23:47:01 +00:00
dependabot[bot]
3a5b47d736
build(deps): bump google.golang.org/grpc from 1.60.1 to 1.61.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.60.1 to 1.61.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.60.1...v1.61.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-01-29 23:46:49 +00:00
dependabot[bot]
9a983caad1
build(deps): bump github.com/containerd/plugin
Bumps [github.com/containerd/plugin](https://github.com/containerd/plugin) from 0.0.0-20231101173250-7ec69893e1e7 to 0.1.0.
- [Release notes](https://github.com/containerd/plugin/releases)
- [Commits](https://github.com/containerd/plugin/commits/v0.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 23:46:33 +00:00
dependabot[bot]
495afb0c02
build(deps): bump lycheeverse/lychee-action from 1.9.1 to 1.9.3
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.9.1 to 1.9.3.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.9.1...v1.9.3)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 23:07:38 +00:00
dependabot[bot]
5365a1089d
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 23:07:18 +00:00
Derek McGowan
4f3a026bce
Merge pull request #9696 from dmcgowan/prepare-v2.0.0-beta.2
Prepare release notes for v2.0.0-beta.2
2024-01-29 17:00:54 +00:00
Phil Estes
f5f84a9c75
Merge pull request #8735 from iain-macdonald/iain-macdonald/issue-6377
remotes/docker/authorizer.go: refresh OAuth tokens when they expire
2024-01-29 16:18:56 +00:00
Derek McGowan
1b6019b5ed
Merge pull request #9681 from dmcgowan/cri-runtime-plugin
Add CRI Service plugin type
2024-01-29 16:05:16 +00:00
Samuel Karp
30a6485376
Merge pull request #9702 from roman-kiselenko/disable-scheduled-workflow-for-fork
Disable Links workflow in forks
2024-01-29 07:56:35 +00:00
Derek McGowan
64b4778fc2
Add deprecation warnings to CRI image server configuration
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-28 23:14:59 -08:00
Derek McGowan
65b3922df7
Split streaming config from runtime config
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-28 23:14:59 -08:00
Derek McGowan
58ff9d368d
Move cri plugin to plugins subpackage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-28 20:57:19 -08:00
Derek McGowan
d29a1bc6a0
Move sandbox info to cri types packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-28 20:57:19 -08:00
Derek McGowan
9795677fe9
Move cri base plugin to CRI runtime service
Create new plugin type for CRI runtime and image services.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-28 20:57:18 -08:00
roman-kiselenko
966d518014 The Links workflow should be disabled in forks.
Signed-off-by: roman-kiselenko <roman.kiselenko.dev@gmail.com>
2024-01-28 12:27:45 +03:00
Samuel Karp
22e1a2e65c
Merge pull request #9675 from yanggangtony/clean-indent-for-containerd-config.toml
Clean plugin indent in containerd-config.toml.5.md
2024-01-28 09:01:11 +00:00
Akihiro Suda
d48dcf8181
Merge pull request #9700 from yanggangtony/fix-typo-shims
Fix func (m manager) Info in containerd-shim-runc-v2.
2024-01-28 06:06:05 +00:00
yanggang
e15f191a2d
Fix func (m manager) Info in containerd-shim-runc-v2
Signed-off-by: yanggang <gang.yang@daocloud.io>
2024-01-28 02:19:41 +00:00
Akihiro Suda
c1d59e38ef
Merge pull request #9661 from dmcgowan/update-cri-container-events-multisub
Add support for multiple subscribers to CRI container events
2024-01-27 15:57:30 +00:00
Phil Estes
95d24b6403
Merge pull request #9692 from akhilerm/fix-sample-code
doc: fix package import in sample code
2024-01-26 19:13:52 +00:00
Phil Estes
fea1bc2dc7
Merge pull request #9688 from dmcgowan/move-errdefs-package
Use errdefs library
2024-01-26 16:01:20 +00:00
Phil Estes
939a98abdc
Merge pull request #9670 from containerd/dependabot/github_actions/actions/cache-4
build(deps): bump actions/cache from 3 to 4
2024-01-26 15:59:59 +00:00
Phil Estes
ed78a0b0ff
Merge pull request #9697 from akhilerm/remove-log-pkg
refactor: remove containerd/containerd/log
2024-01-26 15:55:05 +00:00
Phil Estes
3d93add18b
Merge pull request #9687 from akhilerm/refactor-protos
refactor: move plugin/fieldpath to api/types/
2024-01-26 15:05:39 +00:00
Akhil Mohan
4f570db1aa
refactor: remove containerd/containerd/log
The log package was kept because hcsshim had a dependency. This was
removed in https://github.com/microsoft/hcsshim/pull/1898. So, its not
required to maintain the containerd/containerd/log package anymore.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-01-26 12:02:34 +05:30
Derek McGowan
010857d33b
Add errdefs and platforms to migration script
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-25 22:18:45 -08:00
Derek McGowan
7cf54b437f
Remove unused pkg/errdefs package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-25 22:18:45 -08:00
Derek McGowan
fb9b59a843
Switch to new errdefs package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-25 22:18:45 -08:00
Derek McGowan
6b906a22d4
Prepare release notes for v2.0.0-beta.2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-25 22:11:44 -08:00
Akhil Mohan
b608c6f73d
doc: fix package import path in sample code
fix package import path that was changed as part of v2 in sample code
snippets.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-01-26 11:41:30 +05:30
Phil Estes
a2d0ddc88e
Merge pull request #9684 from AkihiroSuda/seccomp-6.7
seccomp: kernel 6.7
2024-01-25 19:07:42 +00:00
Akhil Mohan
b16e3572a3
refactor: move plugin/fieldpath to api/types/
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-01-26 00:24:08 +05:30
Maksym Pavlenko
7516bb915c
Merge pull request #9442 from AkihiroSuda/runtime-info2
api/services/instrospection: add PluginInfo
2024-01-25 17:50:42 +00:00
Maksym Pavlenko
8d417cbca0
Merge pull request #8890 from AkihiroSuda/follow-up-8744
remotes: FetchByDigest: propagate media type from config to desc
2024-01-25 17:00:14 +00:00
Derek McGowan
d5f7e54571
Merge pull request #9665 from fuweid/upgrade-recover-images
integration: add test for recovering images
2024-01-25 06:37:19 +00:00
Derek McGowan
611da71ba8
Merge pull request #9680 from jsturtevant/remove-walker-for-windows
Remove walker diff plugin for Windows
2024-01-25 04:23:51 +00:00
Derek McGowan
023ec5e52c
Merge pull request #9682 from AkihiroSuda/mv-seccomp-kernelversion
mv contrib/seccomp/kernelversion pkg/kernelversion
2024-01-25 04:23:33 +00:00
Akihiro Suda
22d586e515
api/services/instrospection: add PluginInfo
The new `PlunginInfo()` call can be used for instrospecting the details
of the runtime plugin.

```console
$ ctr plugins inspect-runtime --runtime=io.containerd.runc.v2 --runc-binary=runc
{
    "Name": "io.containerd.runc.v2",
    "Version": {
        "Version": "v2.0.0-beta.0-XX-gXXXXXXXXX.m",
        "Revision": "v2.0.0-beta.0-XX-gXXXXXXXXX.m"
    },
    "Options": {
        "binary_name": "runc"
    },
    "Features": {
        "ociVersionMin": "1.0.0",
        "ociVersionMax": "1.1.0-rc.2",
        ...,
    },
    "Annotations": null
}
```

The shim binary has to support `-info` flag, see `runtime/v2/README.md`

Replaces PR 8509 (`api/services/task: add RuntimeInfo()`)

Co-authored-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-25 10:00:30 +09:00
Derek McGowan
11de0d80f6
Merge pull request #9683 from yanggangtony/clean-nri_api
Code clean for nri_api.
2024-01-25 00:41:42 +00:00
Derek McGowan
9dbb7615b6
Merge pull request #9686 from elezar/update-configmd-for-cdi
Use tags.cncf.io CDI url in config.md
2024-01-24 22:12:56 +00:00
Maksym Pavlenko
75459afafd
Merge pull request #9673 from zzzzzzzzzy9/dev2
pod: CreatedAt time will be 269 years ago if create cri network failed
2024-01-24 16:31:01 +00:00
Evan Lezar
ad869e9053 Use tags.cncf.io CDI url in config.md
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-01-24 14:53:15 +01:00
Akihiro Suda
eb8981f352
mv contrib/seccomp/kernelversion pkg/kernelversion
The package isn't really relevant to seccomp

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-24 19:03:53 +09:00
Akihiro Suda
a6e52c74fa
seccomp: kernel 6.7
The following syscalls were added since kernel v5.16:
- v5.17 (libseccomp v2.5.4): set_mempolicy_home_node
- v6.5  (libseccomp v2.5.5): cachestat
- v6.6  (libseccomp v2.5.5): fchmodat2, map_shadow_stack
- v6.7  (libseccomp v2.5.5): futex_wake, futex_wait, futex_requeue

[Not covered in this commit]
- v6.8-rc1: statmount, listmount, lsm_get_self_attr, lsm_set_self_attr, lsm_list_modules

ref:
- `syscalls: update the syscall list for Linux v5.17` (libseccomp v2.5.4)
   d83cb7ac25
- `all: update the syscall table for Linux v6.7-rc3`  (libseccomp v2.5.5)
   53267af3fb

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-24 18:35:41 +09:00
yanggang
ed47102411
Code clean for nri_api.
Signed-off-by: yanggang <gang.yang@daocloud.io>
2024-01-24 09:29:28 +00:00
James Sturtevant
ade80789b1
Remove walker diff plugin for Windows
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
2024-01-23 16:31:34 -08:00
Derek McGowan
f2765617c5
Merge pull request #9662 from dmcgowan/replace-platform-package
Use github.com/containerd/platforms package
2024-01-23 19:50:25 +00:00
Derek McGowan
8e1578eed9
Merge pull request #9677 from elezar/dependency-update-container-device-interface-v0.6.2
Update container-device-interface to v0.6.2
2024-01-23 18:53:00 +00:00
Iain Macdonald
af6a90bf5c remotes/docker/authorizer.go: invalidate auth tokens when they expire.
Signed-off-by: Iain Macdonald <xiainx@gmail.com>
2024-01-23 09:58:57 -08:00
Derek McGowan
e79ec7a095
Remove deprecated platforms package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-23 09:14:03 -08:00
Derek McGowan
3f620143fe
Use github.com/containerd/platforms package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-23 09:14:03 -08:00
Evan Lezar
9dd29b3cf7 Update container-device-interface to v0.6.2
This includes migrating from the github.com/container-orchestrated-devices
repo to tags.cncf.io.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-01-23 11:36:34 +01:00
yanggang
7eccde5d03
Clean plugin indent in containerd-config.toml.5.md
Signed-off-by: yanggang <gang.yang@daocloud.io>
2024-01-23 07:02:07 +00:00
张钰10307750
b16d467404 pod: CreatedAt time will be 269 years ago while creating cri network failed.
We should set sandbox CreatedAt first time when we create sandbox struct,
   and then set sandbox CreatedAt second time after container started.

   Before this commit, we just set sandbox CreatedAt after container
   started, but if network create failed, the sandbox time is the
   default time, which is 269 years ago, so we need to set sandbox
   CreatedAt at first, even if an error occurred before start container.

Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn>
2024-01-23 10:44:49 +08:00
dependabot[bot]
378e9f4434
build(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 23:52:18 +00:00
Wei Fu
748fe20358 integration: add test for recovering images
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-20 23:29:04 +08:00
Derek McGowan
be9336fed1
Merge pull request #9634 from dmcgowan/add-migration-tests
Add migration tests
2024-01-20 06:41:55 +00:00
Yury Gargay
2e8e03389c
Add multi-subscriber support to GetContainerEvents CRI API
This commit addresses issue #7318 by introducing events broadcasting
to the current implementation. The integration/container_event_test.go
is extended to demonstrate the broadcasting capabilities
of two simultaneous connected clients.

Signed-off-by: Yury Gargay <yury.gargay@gmail.com>
2024-01-19 21:27:06 -08:00
Derek McGowan
e7eb08eb56
Add support for multiple subscribers to CRI container events
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-19 21:27:06 -08:00
Phil Estes
e73942d23d
Merge pull request #9555 from KodieGlosserIBM/strip-volatile-option-tmp-mounts
Remove overlayfs volatile option on temp mounts
2024-01-20 03:32:54 +00:00
Derek McGowan
6f44916e60
Merge pull request #9654 from dmcgowan/prepare-v2.0.0-beta.1
Prepare release notes for v2.0.0-beta.1
2024-01-19 21:13:41 +00:00
krglosse
cfe8321b4c strip-volatile-option-tmp-mounts
Signed-off-by: krglosse <krglosse@us.ibm.com>

do not alter original slice

Signed-off-by: krglosse <krglosse@us.ibm.com>

Update core/mount/temp.go

makes sense, thank you!

Co-authored-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: KodieGlosserIBM <39170759+KodieGlosserIBM@users.noreply.github.com>

do not copy mount structure unless conditional is met and adding a test case for it

Signed-off-by: krglosse <krglosse@us.ibm.com>

copy option slice when removing the element instead of giving the element an empty string

remove unneeded block

Signed-off-by: krglosse <krglosse@us.ibm.com>

simplify

Signed-off-by: krglosse <krglosse@us.ibm.com>
2024-01-19 12:51:34 -06:00
Akihiro Suda
0817c9798f
Merge pull request #9655 from AkihiroSuda/gha-use-standard-runners
CI: use standard GHA runners
2024-01-19 06:00:18 +00:00
Akihiro Suda
d34725f85a
CI: use standard GHA runners
"Larger" runners are no longer required for nested virt with Linux

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-19 12:33:23 +09:00
Fu Wei
44cd362275
Merge pull request #9432 from AkihiroSuda/ctr-transfer-service-default
ctr: use transfer service by default
2024-01-19 00:44:06 +00:00
Derek McGowan
9d2c221231
Prepare release notes for v2.0.0-beta.1
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-18 16:20:02 -08:00
Akihiro Suda
e9f2bba1f2
remotes: FetchByDigest: propagate media type from config to desc
A media type string passed via `WithMediaType()` was not propagated
to a descriptor returned by `FetchByDigest()`.

Follow-up to PR 8744

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-18 23:50:21 +09:00
Derek McGowan
d7689ae8ba
Remove CRI plugin config after migrating
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-18 06:46:50 -08:00
Derek McGowan
f48f61fd83
Add migration integration test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-18 06:46:50 -08:00
Derek McGowan
eb9925d88c
Update config migrations to decode using the plugin type
Ensure migration picks up defaults and correct ordering from the plugin
configuration. Ensures that the migration matches the behavior of the
default output and how the configuration will be loaded.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-18 06:46:50 -08:00
Derek McGowan
15713014d6
Update server config slice merge strategy
Merge slices while checking for equal values rather than always
appending. Remove setting Import to prevent migrations from setting
incorrect configuration Imports.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-18 06:46:49 -08:00
Derek McGowan
cf6f439eb0
Fix transfer plugin unpack configuration
Remove default unpack configuration to prevent duplication of
configuration from toml decoder appending to the default. When no unpack
configuration is provided, use the default.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-18 06:46:49 -08:00
Akihiro Suda
eb123db5fb
ctr: use transfer service by default
Prior to this commit, `--local=false` had to be explicitly specified to
opt-in to the transfer service

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-18 23:42:29 +09:00
Fu Wei
02e0fef84b
Merge pull request #9365 from dmcgowan/move-packages
Move packages based on contributing guide
2024-01-18 14:04:44 +00:00
Derek McGowan
94d1b20988
Add migration script to contrib
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 10:00:15 -08:00
Derek McGowan
9ee1f4716e
Rebuild protos with updated runtime location
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:58:18 -08:00
Derek McGowan
dbc74db6a1
Move runtime to core/runtime
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:58:04 -08:00
Derek McGowan
df9b0a0675
Move metrics to core/metrics
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:55 -08:00
Derek McGowan
19e763553c
Move pkg/truncindex to internal/truncindex
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:46 -08:00
Derek McGowan
764c907003
Move pkg/tomlext to internal/tomlext
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:37 -08:00
Derek McGowan
1c4be2d883
Move pkg/testutil to internal/testutil
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:28 -08:00
Derek McGowan
114df368f0
Move pkg/registrar to internal/registrar
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:19 -08:00
Derek McGowan
4ee6419fad
Move pkg/randutil to internal/randutil
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:10 -08:00
Derek McGowan
696cf25650
Move pkg/kmutex to internal/kmutex
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:57:01 -08:00
Derek McGowan
5e1d9543be
Move pkg/hasher to internal/hasher
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:52 -08:00
Derek McGowan
23914a01b8
Move pkg/failpoint to internal/failpoint
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:43 -08:00
Derek McGowan
c79ecfe246
Move pkg/cleanup to internal/cleanup
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:34 -08:00
Derek McGowan
8f0eb26311
Move tracing to pkg/tracing
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:25 -08:00
Derek McGowan
6be90158cd
Move sys to pkg/sys
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:16 -08:00
Derek McGowan
de606680b0
Move rootfs to pkg/rootfs
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:56:07 -08:00
Derek McGowan
fdb8a527c9
Move reference to pkg/reference
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:58 -08:00
Derek McGowan
e59f64792b
Move oci to pkg/oci
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:48 -08:00
Derek McGowan
fa8cae99d1
Move namespaces to pkg/namespaces
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:39 -08:00
Derek McGowan
b76236bb45
Move labels to pkg/labels
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:30 -08:00
Derek McGowan
bb71c28353
Move identifiers to pkg/identifiers
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:21 -08:00
Derek McGowan
5e00f63ce7
Move gc to pkg/gc
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:12 -08:00
Derek McGowan
11114b0a9a
Move gc/scheduler to plugins/gc
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:55:03 -08:00
Derek McGowan
c38f2ab724
Move filters to pkg/filters
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:54 -08:00
Derek McGowan
44a836c9b5
Move errdefs to pkg/errdefs
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:45 -08:00
Derek McGowan
70ed2696fa
Move events to pkg/events
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:36 -08:00
Derek McGowan
b0c3d00e98
Move cio to pkg/cio
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:27 -08:00
Derek McGowan
8e14c39e80
Move archive to pkg/archive
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:18 -08:00
Derek McGowan
fcd39ccc53
Move snapshots to core/snapshots
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:09 -08:00
Derek McGowan
e0fe656daf
Move snapshots/windows to plugins/snapshots/windows
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:54:00 -08:00
Derek McGowan
57bdbfba6a
Move snapshots/overlay to plugins/snapshots/overlay
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:53:51 -08:00
Derek McGowan
9b8c558f9f
Move snapshots/native to plugins/snapshots/native
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:53:42 -08:00
Derek McGowan
5c07d5d361
Move snapshots/lcow to plugins/snapshots/lcow
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:53:33 -08:00
Derek McGowan
8473322f0b
Move snapshots/devmapper to plugins/snapshots/devmapper
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:53:24 -08:00
Derek McGowan
7dd96fe346
Move snapshots/btrfs to plugins/snapshots/btrfs
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:53:15 -08:00
Derek McGowan
2909f07f85
Move snapshots/blockfile to plugins/snapshots/blockfile
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:53:06 -08:00
Derek McGowan
92d2a5fc02
Move services to plugins/services
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:57 -08:00
Derek McGowan
ce41d1c90a
Move services/server to cmd/containerd/server
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:48 -08:00
Derek McGowan
228ad5a5ca
Move sandbox to core/sandbox
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:39 -08:00
Derek McGowan
d133019c9b
Move runtime/restart/monitor to plugins/restart
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:30 -08:00
Derek McGowan
0dabf6f154
Move remotes to core/remotes
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:21 -08:00
Derek McGowan
6e5408dcec
Move mount to core/mount
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:12 -08:00
Derek McGowan
1a1e0e8c81
Move metadata to core/metadata
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:52:03 -08:00
Derek McGowan
18b3cbe4fa
Move metadata/plugin to plugins/metadata
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:54 -08:00
Derek McGowan
f80760f9ff
Move leases to core/leases
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:45 -08:00
Derek McGowan
cc6a5c9c69
Move leases/plugin to plugins/leases
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:35 -08:00
Derek McGowan
57ea8aef3d
Move images to core/images
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:26 -08:00
Derek McGowan
913edcd489
Move diff to core/diff
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:17 -08:00
Derek McGowan
d14350376e
Move diff/windows to plugins/diff/windows
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:51:08 -08:00
Derek McGowan
2d861b6ead
Move diff/walking to plugins/diff/walking
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:50:59 -08:00
Derek McGowan
aaf6ac04cb
Move diff/lcow to plugins/diff/lcow
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:50:50 -08:00
Derek McGowan
9456048f46
Move containers to core/containers
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:50:40 -08:00
Derek McGowan
21b4f3f0aa
Move content to core/content
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:50:32 -08:00
Derek McGowan
846f7d4e65
Move content/local to plugins/content/local
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-17 09:50:23 -08:00
Davanum Srinivas
aad37698ed
Merge pull request #9649 from dims/include-image-name-in-error-message
include image name in error message
2024-01-17 12:19:40 +00:00
Fu Wei
380e78e2bf
Merge pull request #9642 from containerd/dependabot/github_actions/actions/upload-artifact-4
build(deps): bump actions/upload-artifact from 3 to 4
2024-01-17 06:12:00 +00:00
Akihiro Suda
a83449cf11
Merge pull request #9621 from bart0sh/PR011-enable-CDI-by-default
config: enable CDI by default
2024-01-17 00:48:55 +00:00
Davanum Srinivas
725c92e7c7
include image name in error message
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-16 18:44:55 -05:00
dependabot[bot]
18b0d236cb
build(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-16 20:52:30 +00:00
Derek McGowan
07362334f0
Merge pull request #9645 from akhilerm/migrate-artifact-action-v4
ci: make artifact name unique in linux integration
2024-01-16 20:15:27 +00:00
Fu Wei
5226864fc6
Merge pull request #9646 from fuweid/debug-log-shim-plugin
runtime/v2: reduce shim plugin log
2024-01-16 15:33:43 +00:00
Phil Estes
64ca9ceeb6
Merge pull request #9643 from containerd/dependabot/github_actions/lycheeverse/lychee-action-1.9.1
build(deps): bump lycheeverse/lychee-action from 1.9.0 to 1.9.1
2024-01-16 15:22:26 +00:00
Wei Fu
f45b46b67f runtime/v2: reduce shim plugin log
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-16 22:28:16 +08:00
Akhil Mohan
20619a7c9f
ci: make artifact name unique in linux integration
actions/upload-artifact@v4 marks artifacts as immutable. Thus, tests
which use matrix should have a unique artifact name while using
upload-artifact github action

Ref: https://github.com/actions/upload-artifact/releases/tag/v4.0.0
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-01-16 18:30:18 +05:30
dependabot[bot]
2053d91578
build(deps): bump lycheeverse/lychee-action from 1.9.0 to 1.9.1
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.9.0...v1.9.1)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-16 00:03:52 +00:00
Akihiro Suda
f1e6cc3784
Merge pull request #9640 from fuweid/fix-9638
mount: UnmountRecursive return nil if path doesn't exist
2024-01-15 23:11:13 +00:00
Wei Fu
d4396c96bf mount: UnmountRecursive return nil if path doesn't exist
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-15 21:48:24 +08:00
Maksym Pavlenko
4dcfd5bf6e
Merge pull request #8355 from Jenkins-J/move-DefaultSnapshotter
Move DefaultSnapshotter constants
2024-01-12 22:18:33 +00:00
James Jenkins
8aa2551ce0 Move DefaultSnapshotter constants
Move the DefaultSnapshotter constants to the defaults package.
Fixes issue #8226.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2024-01-12 13:28:46 -05:00
Ed Bartosh
c8e8a093ce config: enable CDI by default
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2024-01-12 09:31:39 +02:00
Fu Wei
0a7c192ca9
Merge pull request #9630 from AkihiroSuda/transfer-desc
transfer: add OCI descriptors to Progress structure
2024-01-12 02:40:13 +00:00
Fu Wei
63e0ecd4b0
Merge pull request #9152 from dmcgowan/cri-split-image-service
Split CRI image service from GRPC handler
2024-01-12 02:18:50 +00:00
Derek McGowan
5a3d3f6138
Update load image test to use local import
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:10 -08:00
Derek McGowan
6041d4e60c
Update fuzz contrib for updated image service
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:10 -08:00
Derek McGowan
2a476d4214
Move ParseImageReferences to cri util
Avoids importing image service for utility function.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:10 -08:00
Derek McGowan
3baf5edb8b
Separate the CRI image config from the main plugin config
This change simplifies the CRI plugin dependencies by not requiring the
CRI image plugin to depend on any other CRI components. Since other CRI
plugins depend on the image plugin, this allows prevents a dependency
cycle for CRI configurations on a base plugin.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:09 -08:00
Derek McGowan
ad4c9f8a9d
Update CRI runtime platform and pinned image configuration
Updates the CRI image service to own image related configuration and
separate it from the runtime configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:09 -08:00
Derek McGowan
11f311fdd5
Add minimal interface to CRI image store
Avoid requiring the whole image store interface for
the image store cache which only needs Get.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:09 -08:00
Derek McGowan
02a9a456e1
Split image config from CRI plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:09 -08:00
Derek McGowan
d23ac1122e
Split CRI image service from GRPC handler
Prepares the CRI image service for splitting CRI into multiple plugins.
Also prepares for config migration which will spread across multiple
different plugins.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-11 09:55:08 -08:00
Akihiro Suda
a2472c0b5a
transfer: add OCI descriptors to Progress structure
The index media type and the digest are now shown in `ctr images pull --local=false`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-11 23:56:13 +09:00
Samuel Karp
a2f167e836
Merge pull request #9626 from kiashok/debugToTraceLogs
Move certain debug  level logs to trace level logs
2024-01-11 05:35:21 +00:00
Kirtana Ashok
f261969507 Move certain debug logs to trace logs
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-01-10 14:43:54 -08:00
Phil Estes
cf9aec3185
Merge pull request #9619 from wojiushixiaobai/patch-imgcrypt
build(deps): bump github.com/containerd/imgcrypt to v1.1.9
2024-01-10 10:44:10 -05:00
Phil Estes
25252e9790
Merge pull request #9623 from thaJeztah/update_golang_1.21.6
update to go1.21.6, go1.20.13
2024-01-10 15:05:00 +00:00
Sebastiaan van Stijn
a5d9587061
update to go1.21.6, go1.20.13
go1.21.6 (released 2024-01-09) includes fixes to the compiler, the runtime, and
the crypto/tls, maps, and runtime/pprof packages. See the Go 1.21.6 milestone on
our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.6+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.5...go1.21.6

go1.20.13 (released 2024-01-09) includes fixes to the runtime and the crypto/tls
package. See the Go 1.20.13 milestone on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.20.13+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.20.12...go1.20.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-10 10:42:07 +01:00
Derek McGowan
5232e1322c
Merge pull request #9615 from containerd/dependabot/github_actions/lycheeverse/lychee-action-1.9.0
build(deps): bump lycheeverse/lychee-action from 1.8.0 to 1.9.0
2024-01-10 04:54:48 +00:00
Derek McGowan
e8b49bc7f7
Merge pull request #9616 from containerd/dependabot/go_modules/golang-x-991d048ba7
build(deps): bump the golang-x group with 2 updates
2024-01-10 04:54:16 +00:00
Phil Estes
dd7f7bdc0e
Merge pull request #9288 from kiashok/updateCI-main
Uninstall mingw before attempting upgrade
2024-01-09 19:46:42 +00:00
Kirtana Ashok
21640c57a8 Uninstall mingw before attempting upgrade
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-01-09 09:14:05 -08:00
Fu Wei
46bca49bfc
Merge pull request #9611 from adityaramani/main
Handle failure when stopping a sandbox
2024-01-09 15:11:07 +00:00
吴小白
174efb1e02 update imgcrypt binary to v1.1.9
Signed-off-by: 吴小白 <296015668@qq.com>
2024-01-09 15:40:32 +08:00
Fu Wei
9f8b845334
Merge pull request #9463 from abel-von/sandbox-plugin-1205
sandbox: remove sandboxStore from podsandbox controller
2024-01-09 01:40:10 +00:00
dependabot[bot]
dfb1753800
build(deps): bump the golang-x group with 2 updates
Bumps the golang-x group with 2 updates: [golang.org/x/sync](https://github.com/golang/sync) and [golang.org/x/sys](https://github.com/golang/sys).


Updates `golang.org/x/sync` from 0.5.0 to 0.6.0
- [Commits](https://github.com/golang/sync/compare/v0.5.0...v0.6.0)

Updates `golang.org/x/sys` from 0.15.0 to 0.16.0
- [Commits](https://github.com/golang/sys/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: golang-x
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 23:48:26 +00:00
dependabot[bot]
2b415c911b
build(deps): bump lycheeverse/lychee-action from 1.8.0 to 1.9.0
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](https://github.com/lycheeverse/lychee-action/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 23:35:08 +00:00
Derek McGowan
ddfa334a85
Merge pull request #9607 from vvoland/contentprovider
content: Add InfoReaderProvider
2024-01-08 22:42:15 +00:00
Abel Feng
7dadd5f1bf sandbox: remove sandboxStore from podsandbox
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-01-09 00:19:17 +08:00
Fu Wei
781d027ba8
Merge pull request #9476 from roman-kiselenko/label-images-on-import
add label flags to ctr import
2024-01-08 09:04:44 +00:00
Akihiro Suda
aa66354c23
Merge pull request #9608 from jsturtevant/update-windows-periodic
[Windows] Use latest VM image in CI to get Windows updates regularly
2024-01-07 20:56:03 +00:00
roman-kiselenko
a3c62e698d add label flags to ctr import, add integration tests
Signed-off-by: roman-kiselenko <roman.kiselenko.dev@gmail.com>
2024-01-06 11:11:10 +03:00
Aditya Ramani
d01056555a Handle failure when stopping a sandbox
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2024-01-05 13:23:03 -08:00
Phil Estes
0bb7fd36ce
Merge pull request #9603 from thaJeztah/no_execabs
integration: remove use of golang.org/x/sys/execabs
2024-01-05 16:56:43 +00:00
Paweł Gronowski
8235665e7e
content: Add InfoReaderProvider
The interface that combines both content.InfoProvider and
content.Provider was duplicated in multiple places - create one directly
in `content` package and use it instead.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-01-05 16:37:26 +01:00
Sebastiaan van Stijn
fa83bc8de5
integration: remove use of golang.org/x/sys/execabs
This dependency was removed in 2af6db672e, but
was re-introduced in commit 2fab240f21.

Now that golang.org/x/tools also stopped using this dependency, removing
this use will remove the package from our dependency tree.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 10:05:37 +01:00
Fu Wei
c7c6bb9d13
Merge pull request #9477 from lengrongfu/feat/add-cgroupParent-to-integration
add get cgroupdriver from RuntimeConfig to integration
2024-01-05 03:44:39 +00:00
lengrongfu
dffeea4717 add get cgroupdriver from RuntimeConfig to integration
Signed-off-by: lengrongfu <lenronfu@gmail.com>
2024-01-05 10:58:47 +08:00
James Sturtevant
46b2f1d162
Use latest VM image to get Windows updates regularly
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2024-01-04 21:22:04 +00:00
Fu Wei
287b4cec9b
Merge pull request #9601 from kiashok/cimfsInitFix
Fix CimFS plugin init error
2024-01-04 02:18:14 +00:00
Kirtana Ashok
a8d39666d4 Move cimfs OS build compat check
to the operation functions instead of init()

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-01-03 16:05:08 -08:00
Maksym Pavlenko
d75bc05ef3
Merge pull request #9554 from vvoland/archive-sparse
import/export: Support references to missing content
2024-01-03 22:45:00 +00:00
Paweł Gronowski
0d3c3efe3b
integration/import-export: Add WithSkipMissing tests
Also refactor tests to use the t.Run and run each test concurrently in a
separate namespace.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-01-03 16:03:38 +01:00
Paweł Gronowski
b9af453f0c
export: Copy distribution source labels to manifest annotations
Persist manifest/indexes distribution source labels as annotations in
the index.json. This could allow the importer to fetch the missing blobs
from the external repository.

These can't really be persisted directly in blob descriptors because
that would alter the digests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-01-03 16:03:36 +01:00
Paweł Gronowski
61a7c4999c
import/export: Support references to missing content
Allow importing/exporting archives which doesn't have all the referenced
blobs. This allows to export/import an image with only some of the
platforms available locally while still persisting the full index.

> The blobs directory MAY be missing referenced blobs, in which case the missing blobs SHOULD be fulfilled by an external blob store.

https://github.com/opencontainers/image-spec/blob/v1.0/image-layout.md#blobs

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-01-03 16:03:34 +01:00
Fu Wei
f8b07365d2
Merge pull request #9593 from yankay/runc-1.1.11
update runc binary to v1.1.11
2024-01-02 12:52:17 +00:00
Kay Yan
1ab4fac94b update runc binary to v1.1.11
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-01-02 13:36:03 +00:00
Akihiro Suda
c98cb4af22
Merge pull request #9583 from containerd/dependabot/go_modules/github.com/containerd/cgroups/v3-3.0.3
build(deps): bump github.com/containerd/cgroups/v3 from 3.0.2 to 3.0.3
2023-12-30 11:53:12 +00:00
dependabot[bot]
5387747e92
build(deps): bump github.com/containerd/cgroups/v3 from 3.0.2 to 3.0.3
Bumps [github.com/containerd/cgroups/v3](https://github.com/containerd/cgroups) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/containerd/cgroups/releases)
- [Commits](https://github.com/containerd/cgroups/compare/v3.0.2...v3.0.3)

---
updated-dependencies:
- dependency-name: github.com/containerd/cgroups/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 11:45:53 +00:00
Fu Wei
1f76ca4081
Merge pull request #9581 from bryantbiggs/chore/update-otelgrpc
deps: Update otelgrpc
2023-12-29 09:58:13 +00:00
Bryant Biggs
a1e0601e03 fix: Update go.opentelemetry.io/otel/sdk/trace to satisfy traceProvider interface
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-12-28 09:56:54 -05:00
Bryant Biggs
78421616e0 deps: Update otelgrpc
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-12-28 09:47:05 -05:00
Derek McGowan
ced9b18c23
Merge pull request #9565 from koct9i/fix-return-grpc-code-unavailable-if-not-initialized
fix: return gRPC code "unavailable" if server is not initialized yet
2023-12-28 04:30:43 +00:00
Akihiro Suda
b23a75b611
Merge pull request #9579 from containerd/dependabot/go_modules/github.com/fsnotify/fsnotify-1.7.0
build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0
2023-12-28 02:10:55 +00:00
Akihiro Suda
ee9638dbba
Merge pull request #9577 from containerd/dependabot/go_modules/github.com/intel/goresctrl-0.6.0
build(deps): bump github.com/intel/goresctrl from 0.5.0 to 0.6.0
2023-12-28 00:29:05 +00:00
dependabot[bot]
bd4c281c56
build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.6.0...v1.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-28 00:05:31 +00:00
dependabot[bot]
62a824a4bd
build(deps): bump github.com/intel/goresctrl from 0.5.0 to 0.6.0
Bumps [github.com/intel/goresctrl](https://github.com/intel/goresctrl) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/intel/goresctrl/releases)
- [Commits](https://github.com/intel/goresctrl/compare/v0.5.0...v0.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 22:45:39 +00:00
Derek McGowan
fdc187bfb4
Merge pull request #9578 from containerd/dependabot/go_modules/google.golang.org/protobuf-1.32.0
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.32.0
2023-12-27 22:09:14 +00:00
Derek McGowan
8ef7b51661
Merge pull request #9576 from containerd/dependabot/go_modules/github.com/google/uuid-1.5.0
build(deps): bump github.com/google/uuid from 1.3.1 to 1.5.0
2023-12-27 22:05:47 +00:00
dependabot[bot]
7fe038e4a5
build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.32.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.32.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 23:16:57 +00:00
dependabot[bot]
81bb669428
build(deps): bump github.com/google/uuid from 1.3.1 to 1.5.0
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.1 to 1.5.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.3.1...v1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 23:16:38 +00:00
Akihiro Suda
b7b808c36f
Merge pull request #9571 from Dzejrou/main
shim: Create pid-file with 0644 permissions
2023-12-25 09:49:27 +00:00
Jaroslav Jindrak
9d328410a5 shim: Create pid-file with 0644 permissions
Fixes ae7021300

In ae7021300 the WritePidFile and WriteAddress functions were
changed to use AtomicFile instead of os.CreateFile. However,
AtomicFile creates a temporary file and then changes its permissions
with os.Chmod which alters the previously observed behavior of
os.CreateFile which takes the system's umask into account.

This means that on Linux-based systems these files suddenly
became world writable (#9363). The address file has since been
removed, but pid-file was still created as world writable. This
commit explicitly requests 0644 permissions as even on systems
without default umask of 0022 there is no reason to have these
two files world writable.

Signed-off-by: Jaroslav Jindrak <dzejrou@gmail.com>
2023-12-23 21:42:51 +01:00
Kevin Parsons
124bc0dcbe
Merge pull request #8807 from ambarve/cimfs
Add support for cimfs snapshotter & differ
2023-12-22 21:09:51 +00:00
Amit Barve
daa1ea522b Add cimfs differ and snapshotter
Details about CimFs project are discussed in #8346

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2023-12-20 09:29:08 -08:00
Fu Wei
643fa70a7d
Merge pull request #9561 from containerd/dependabot/go_modules/google.golang.org/grpc-1.60.1
build(deps): bump google.golang.org/grpc from 1.58.3 to 1.60.1
2023-12-20 15:45:21 +00:00
Fu Wei
83e09cc9e5
Merge pull request #9519 from containerd/dependabot/go_modules/github.com/google/uuid-1.5.0
build(deps): bump github.com/google/uuid from 1.3.1 to 1.5.0
2023-12-20 14:24:21 +00:00
Konstantin Khlebnikov
c191935747 fix: return gRPC code "unavailable" if server is not initialized yet
Correct error code helps client to decide when it should retry request.

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
2023-12-20 11:07:18 +01:00
Samuel Karp
935b22dbb7
Merge pull request #9560 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-2.0.0
build(deps): bump google-github-actions/upload-cloud-storage from 1.0.3 to 2.0.0
2023-12-19 07:45:10 +00:00
Samuel Karp
5db60aa61a
Merge pull request #9559 from containerd/dependabot/github_actions/actions/download-artifact-4
build(deps): bump actions/download-artifact from 3 to 4
2023-12-19 07:42:10 +00:00
Fu Wei
4e8c413349
Merge pull request #9551 from akhilerm/fix-ci-badge
docs: fix CI badge in README
2023-12-19 03:48:19 +00:00
dependabot[bot]
1f9151af60
build(deps): bump google.golang.org/grpc from 1.58.3 to 1.60.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.3 to 1.60.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.58.3...v1.60.1)

---
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>
2023-12-18 23:59:35 +00:00
dependabot[bot]
0b48b56598
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 1.0.3 to 2.0.0.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v1.0.3...v2.0.0)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 23:54:06 +00:00
dependabot[bot]
97ec26a5eb
build(deps): bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 23:53:36 +00:00
Derek McGowan
8f6892a8c6
Merge pull request #9488 from thaJeztah/plugin_context_cancel
tracing/plugin: newTracer: ignore context.Canceled errors on Close()
2023-12-18 19:41:21 +00:00
Sebastiaan van Stijn
22138541a2
tracing/plugin: newTracer: ignore context.Canceled errors on Close()
Before this, containerd would always print an error when shutting down;

    ERRO[2023-12-07T14:35:00.070333131Z] failed to close plugin                        error="context canceled" id=io.containerd.internal.v1.tracing

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-18 17:10:17 +01:00
Derek McGowan
2c8a996330
Merge pull request #9495 from jamesorlakin/chore/hosts-documentation-ns
Document `ns` query string added to mirror requests
2023-12-15 19:54:00 +00:00
Akhil Mohan
7c651e1837
docs: fix CI badge in README
Fix CI badge links to filter only merge_group events as main branch
now uses merge_group to push changes. This will give a more accurate
representation of the status of CI rather than showing the complete
status of CI workflow.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-12-15 18:35:46 +05:30
Akihiro Suda
23978a158f
Merge pull request #9537 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.17.0
build(deps): bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0
2023-12-15 11:24:24 +00:00
dependabot[bot]
e10c82e4cc
build(deps): bump github.com/google/uuid from 1.3.1 to 1.5.0
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.1 to 1.5.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.3.1...v1.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 01:55:50 +00:00
Akihiro Suda
1da783894b
Merge pull request #9540 from containerd/dependabot/go_modules/github.com/intel/goresctrl-0.5.0
build(deps): bump github.com/intel/goresctrl from 0.3.0 to 0.5.0
2023-12-15 01:14:35 +00:00
Akihiro Suda
d2444079d2
Merge pull request #9541 from samuelkarp/klog-infof
integration: fix format string for klog.Infof
2023-12-15 01:12:38 +00:00
Phil Estes
e5e7f613cf
Merge pull request #9514 from containerd/dependabot/github_actions/actions/upload-artifact-3
build(deps): bump actions/upload-artifact from 1 to 3
2023-12-14 14:56:55 +00:00
Phil Estes
aaf41a827a
Merge pull request #9533 from containerd/dependabot/github_actions/docker/setup-buildx-action-3
build(deps): bump docker/setup-buildx-action from 2 to 3
2023-12-14 14:56:23 +00:00
Phil Estes
ee881146f0
Merge pull request #9534 from containerd/dependabot/github_actions/github/codeql-action-3
build(deps): bump github/codeql-action from 2 to 3
2023-12-14 14:55:52 +00:00
Phil Estes
14e851ecc7
Merge pull request #9538 from containerd/dependabot/go_modules/github.com/Microsoft/hcsshim-0.12.0-rc.1
build(deps): bump github.com/Microsoft/hcsshim from 0.12.0-rc.0 to 0.12.0-rc.1
2023-12-14 14:55:21 +00:00
Samuel Karp
25dc823bfd
integration: fix format string for klog.Infof
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-12-13 22:56:57 -08:00
dependabot[bot]
fc4b78c05c
build(deps): bump github.com/intel/goresctrl from 0.3.0 to 0.5.0
Bumps [github.com/intel/goresctrl](https://github.com/intel/goresctrl) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/intel/goresctrl/releases)
- [Commits](https://github.com/intel/goresctrl/compare/v0.3.0...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 03:37:26 +00:00
dependabot[bot]
1c96087ce7
build(deps): bump github.com/Microsoft/hcsshim
Bumps [github.com/Microsoft/hcsshim](https://github.com/Microsoft/hcsshim) from 0.12.0-rc.0 to 0.12.0-rc.1.
- [Release notes](https://github.com/Microsoft/hcsshim/releases)
- [Commits](https://github.com/Microsoft/hcsshim/compare/v0.12.0-rc.0...v0.12.0-rc.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 03:37:06 +00:00
dependabot[bot]
7e3c8af520
build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.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.16.0...v1.17.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>
2023-12-14 03:36:55 +00:00
dependabot[bot]
f9303d04de
build(deps): bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 03:34:30 +00:00
dependabot[bot]
4c1ebe33bd
build(deps): bump docker/setup-buildx-action from 2 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 03:34:15 +00:00
Fu Wei
a901236bf0
Merge pull request #9532 from AkihiroSuda/dependabot
dependabot: enable groups
2023-12-14 02:58:39 +00:00
Akihiro Suda
98796a4da8
Merge pull request #9526 from containerd/dependabot/go_modules/github.com/moby/sys/mountinfo-0.7.1
build(deps): bump github.com/moby/sys/mountinfo from 0.6.2 to 0.7.1
2023-12-14 00:52:13 +00:00
Akihiro Suda
51fd1d47e6
dependabot: enable groups
See https://github.blog/changelog/2023-06-30-grouped-version-updates-for-dependabot-public-beta/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-12-14 09:38:44 +09:00
Akihiro Suda
2196327f55
Merge pull request #9525 from containerd/dependabot/go_modules/k8s.io/component-base-0.28.4
build(deps): bump k8s.io/component-base from 0.28.2 to 0.28.4
2023-12-13 22:59:43 +00:00
dependabot[bot]
4a71a93604
build(deps): bump github.com/moby/sys/mountinfo from 0.6.2 to 0.7.1
Bumps [github.com/moby/sys/mountinfo](https://github.com/moby/sys) from 0.6.2 to 0.7.1.
- [Release notes](https://github.com/moby/sys/releases)
- [Commits](https://github.com/moby/sys/compare/mountinfo/v0.6.2...mountinfo/v0.7.1)

---
updated-dependencies:
- dependency-name: github.com/moby/sys/mountinfo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 17:40:31 +00:00
Akihiro Suda
ff6324c953
Merge pull request #9527 from containerd/dependabot/go_modules/golang.org/x/mod-0.14.0
build(deps): bump golang.org/x/mod from 0.13.0 to 0.14.0
2023-12-13 16:50:40 +00:00
Phil Estes
73167c07a7
Merge pull request #9523 from containerd/dependabot/go_modules/github.com/klauspost/compress-1.17.4
build(deps): bump github.com/klauspost/compress from 1.17.2 to 1.17.4
2023-12-13 16:42:38 +00:00
dependabot[bot]
344fe957f4
build(deps): bump golang.org/x/mod from 0.13.0 to 0.14.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/mod/compare/v0.13.0...v0.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 16:14:48 +00:00
Akihiro Suda
308839d23a
Merge pull request #9521 from containerd/dependabot/go_modules/golang.org/x/sync-0.5.0
build(deps): bump golang.org/x/sync from 0.4.0 to 0.5.0
2023-12-13 15:07:04 +00:00
Phil Estes
565cc91657
Merge pull request #9494 from rumpl/fix-append-additonal-groups
WithAppendAdditionalGroups: better /etc/group handling
2023-12-13 14:59:58 +00:00
Fu Wei
9f17ed6771
Merge pull request #9522 from containerd/dependabot/go_modules/go.etcd.io/bbolt-1.3.8
build(deps): bump go.etcd.io/bbolt from 1.3.7 to 1.3.8
2023-12-13 13:50:01 +00:00
Akihiro Suda
614395ce65
Merge pull request #9513 from containerd/dependabot/github_actions/ossf/scorecard-action-2.3.1
build(deps): bump ossf/scorecard-action from 2.0.3 to 2.3.1
2023-12-13 12:33:03 +00:00
Akihiro Suda
93e3a50420
Merge pull request #9511 from containerd/dependabot/github_actions/google-github-actions/auth-2
build(deps): bump google-github-actions/auth from 0 to 2
2023-12-13 05:52:48 +00:00
Akihiro Suda
47b18765b2
Merge pull request #9509 from containerd/dependabot/github_actions/google-github-actions/upload-cloud-storage-1.0.3
build(deps): bump google-github-actions/upload-cloud-storage from 0.10.4 to 1.0.3
2023-12-13 05:12:31 +00:00
Akihiro Suda
e66b912048
Merge pull request #9517 from containerd/dependabot/github_actions/actions/stale-9
build(deps): bump actions/stale from 8 to 9
2023-12-13 05:11:26 +00:00
Akihiro Suda
fd163893bc
Merge pull request #9512 from containerd/dependabot/github_actions/crazy-max/ghaction-github-runtime-3
build(deps): bump crazy-max/ghaction-github-runtime from 2 to 3
2023-12-13 05:01:40 +00:00
Akihiro Suda
43bcea89a7
Merge pull request #9515 from containerd/dependabot/github_actions/actions/github-script-7
build(deps): bump actions/github-script from 6 to 7
2023-12-13 04:46:10 +00:00
Akihiro Suda
d9eeec3bd0
Merge pull request #9516 from containerd/dependabot/github_actions/docker/login-action-3
build(deps): bump docker/login-action from 2 to 3
2023-12-13 04:45:49 +00:00
Akihiro Suda
32ad372706
Merge pull request #9510 from containerd/dependabot/github_actions/actions/setup-go-5
build(deps): bump actions/setup-go from 3 to 5
2023-12-13 04:14:25 +00:00
Akihiro Suda
5f38d64f2a
Merge pull request #9508 from containerd/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2023-12-13 03:52:59 +00:00
dependabot[bot]
6726a2aebf
build(deps): bump k8s.io/component-base from 0.28.2 to 0.28.4
Bumps [k8s.io/component-base](https://github.com/kubernetes/component-base) from 0.28.2 to 0.28.4.
- [Commits](https://github.com/kubernetes/component-base/compare/v0.28.2...v0.28.4)

---
updated-dependencies:
- dependency-name: k8s.io/component-base
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:26:34 +00:00
dependabot[bot]
0c98f10631
build(deps): bump github.com/klauspost/compress from 1.17.2 to 1.17.4
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.17.2 to 1.17.4.
- [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.2...v1.17.4)

---
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>
2023-12-13 00:25:20 +00:00
dependabot[bot]
39ba0347ee
build(deps): bump go.etcd.io/bbolt from 1.3.7 to 1.3.8
Bumps [go.etcd.io/bbolt](https://github.com/etcd-io/bbolt) from 1.3.7 to 1.3.8.
- [Release notes](https://github.com/etcd-io/bbolt/releases)
- [Commits](https://github.com/etcd-io/bbolt/compare/v1.3.7...v1.3.8)

---
updated-dependencies:
- dependency-name: go.etcd.io/bbolt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:24:42 +00:00
dependabot[bot]
db43e3d1f7
build(deps): bump golang.org/x/sync from 0.4.0 to 0.5.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.4.0 to 0.5.0.
- [Commits](https://github.com/golang/sync/compare/v0.4.0...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:24:20 +00:00
dependabot[bot]
4660090baf
build(deps): bump actions/stale from 8 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:21:03 +00:00
dependabot[bot]
ace8ab1bd6
build(deps): bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:21:01 +00:00
dependabot[bot]
0b94716e82
build(deps): bump actions/github-script from 6 to 7
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:55 +00:00
dependabot[bot]
9133ad811d
build(deps): bump actions/upload-artifact from 1 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:47 +00:00
dependabot[bot]
c1823a7c6b
build(deps): bump ossf/scorecard-action from 2.0.3 to 2.3.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.3 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](865b409285...0864cf1902)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:41 +00:00
dependabot[bot]
36b12cbcbb
build(deps): bump crazy-max/ghaction-github-runtime from 2 to 3
Bumps [crazy-max/ghaction-github-runtime](https://github.com/crazy-max/ghaction-github-runtime) from 2 to 3.
- [Release notes](https://github.com/crazy-max/ghaction-github-runtime/releases)
- [Commits](https://github.com/crazy-max/ghaction-github-runtime/compare/v2...v3)

---
updated-dependencies:
- dependency-name: crazy-max/ghaction-github-runtime
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:36 +00:00
dependabot[bot]
dc5a6cfaef
build(deps): bump google-github-actions/auth from 0 to 2
Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 0 to 2.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v0...v2)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:31 +00:00
dependabot[bot]
f6a9c69665
build(deps): bump actions/setup-go from 3 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:26 +00:00
dependabot[bot]
e27ea7d1ad
build(deps): bump google-github-actions/upload-cloud-storage
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 0.10.4 to 1.0.3.
- [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases)
- [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v0.10.4...v1.0.3)

---
updated-dependencies:
- dependency-name: google-github-actions/upload-cloud-storage
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:20 +00:00
dependabot[bot]
3ca95282ea
build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 00:20:14 +00:00
Derek McGowan
c0e94bc9a8
Merge pull request #9492 from kiashok/moveCriConfig
Move GenerateRuntimeOptions() to pkg/cri/config
2023-12-13 00:13:46 +00:00
Maksym Pavlenko
8f1479132f
Merge pull request #9504 from AkihiroSuda/dependabot
CI: enable dependabot
2023-12-12 23:41:52 +00:00
Samuel Karp
edcbc508b6
Merge pull request #9496 from mxpv/links
Add nighly job to verify doc links (and fix broken links)
2023-12-12 23:04:50 +00:00
Phil Estes
35c125b2dd
Merge pull request #9503 from ktock/go-toml-2.1.1
go.mod: Bump up github.com/pelletier/go-toml to v2.1.1
2023-12-12 21:25:14 +00:00
Derek McGowan
1feb23465f
Merge pull request #9401 from fuweid/v2-mode
*: introduce image_pull_with_sync_fs in CRI
2023-12-12 14:34:44 +00:00
Djordje Lukic
1398186ca7
WithAppendAdditionalGroups: better /etc/group handling
Scratch images don't necessarily have the /etc/group file, so we shouldn't
fail if opening/parsing it is not needed: if all the group to add are numeric.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-12-12 15:24:41 +01:00
Akihiro Suda
5a140dca5e
CI: enable dependabot
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-12-12 18:46:07 +09:00
Kohei Tokunaga
c1197995b9
go.mod: Bump up github.com/pelletier/go-toml to v2.1.1
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-12-12 14:28:55 +09:00
Wei Fu
23278c81fb *: introduce image_pull_with_sync_fs in CRI
It's to ensure the data integrity during unexpected power failure.

Background:

Since release 1.3, in Linux system, containerD unpacks and writes files into
overlayfs snapshot directly. It doesn’t involve any mount-umount operations
so that the performance of pulling image has been improved.

As we know, the umount syscall for overlayfs will force kernel to flush
all the dirty pages into disk. Without umount syscall, the files’ data relies
on kernel’s writeback threads or filesystem's commit setting (for
instance, ext4 filesystem).

The files in committed snapshot can be loss after unexpected power failure.
However, the snapshot has been committed and the metadata also has been
fsynced. There is data inconsistency between snapshot metadata and files
in that snapshot.

We, containerd, received several issues about data loss after unexpected
power failure.

* https://github.com/containerd/containerd/issues/5854
* https://github.com/containerd/containerd/issues/3369#issuecomment-1787334907

Solution:

* Option 1: SyncFs after unpack

Linux platform provides [syncfs][syncfs] syscall to synchronize just the
filesystem containing a given file.

* Option 2: Fsync directories recursively and fsync on regular file

The fsync doesn't support symlink/block device/char device files. We
need to use fsync the parent directory to ensure that entry is
persisted.

However, based on [xfstest-dev][xfstest-dev], there is no case to ensure
fsync-on-parent can persist the special file's metadata, for example,
uid/gid, access mode.

Checkout [generic/690][generic/690]: Syncing parent dir can persist
symlink. But for f2fs, it needs special mount option. And it doesn't say
that uid/gid can be persisted. All the details are behind the
implemetation.

> NOTE: All the related test cases has `_flakey_drop_and_remount` in
[xfstest-dev].

Based on discussion about [Documenting the crash-recovery guarantees of Linux file systems][kernel-crash-recovery-data-integrity],
we can't rely on Fsync-on-parent.

* Option 1 is winner

This patch is using option 1.

There is test result based on [test-tool][test-tool].
All the networking traffic created by pull is local.

  * Image: docker.io/library/golang:1.19.4 (992 MiB)
    * Current: 5.446738579s
      * WIOS=21081, WBytes=1329741824, RIOS=79, RBytes=1197056
    * Option 1: 6.239686088s
      * WIOS=34804, WBytes=1454845952, RIOS=79, RBytes=1197056
    * Option 2: 1m30.510934813s
      * WIOS=42143, WBytes=1471397888, RIOS=82, RBytes=1209344

  * Image: docker.io/tensorflow/tensorflow:latest (1.78 GiB, ~32590 Inodes)
    * Current: 8.852718042s
      * WIOS=39417, WBytes=2412818432, RIOS=2673, RBytes=335987712
    * Option 1: 9.683387174s
      * WIOS=42767, WBytes=2431750144, RIOS=89, RBytes=1238016
    * Option 2: 1m54.302103719s
      * WIOS=54403, WBytes=2460528640, RIOS=1709, RBytes=208237568

The Option 1 will increase `wios`. So, the `image_pull_with_sync_fs` is
option in CRI plugin.

[syncfs]: <https://man7.org/linux/man-pages/man2/syncfs.2.html>
[xfstest-dev]: <https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git>
[generic/690]: <https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/tests/generic/690?h=v2023.11.19>
[kernel-crash-recovery-data-integrity]: <https://lore.kernel.org/linux-fsdevel/1552418820-18102-1-git-send-email-jaya@cs.utexas.edu/>
[test-tool]: <a17fb2010d/contrib/syncfs/containerd/main_test.go (L51)>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-12 10:18:39 +08:00
Wei Fu
bd5c602c4d api: introduce sync_fs to diff.ApplyRequest
It's flag to synchronize the underlying filesystem containing files
created during Apply.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-12 10:18:39 +08:00
James Lakin
6bb81ee577
Document ns query string added to mirror requests
This also adds clarification to the `server` field being used as a fallback.

Signed-off-by: James Lakin <james@jameslakin.co.uk>
2023-12-11 13:44:39 +00:00
Maksym Pavlenko
98526c9d38 Exclude releases directory from links checker
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-10 12:15:53 -08:00
Samuel Karp
75f72d6272
Merge pull request #9456 from fuweid/enable-arm64
*: enable ARM64 runner
2023-12-10 05:59:22 +00:00
Maksym Pavlenko
f67c1632f5 Add ignore list for links
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 13:43:06 -08:00
Maksym Pavlenko
e740dd3d6b Add links status badge
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 13:09:39 -08:00
Maksym Pavlenko
bfa651c69f Fix broken links
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 13:09:39 -08:00
Maksym Pavlenko
c9fa5b9801 Add nighly job to verify doc links
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-12-09 12:43:53 -08:00
Derek McGowan
9e4d53df75
Merge pull request from GHSA-7ww5-4wqc-m92c
[main] deny /sys/devices/virtual/powercap
2023-12-08 11:35:49 -08:00
Phil Estes
4a6a5af8d0
Merge pull request #9486 from thaJeztah/release_dockerignore
release: add .dockerignore to fix repeated builds
2023-12-08 10:37:11 -05:00
Kirtana Ashok
25b052cbca Move GenerateRuntimeOptions() to pkg/cri/config
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-12-07 12:23:00 -08:00
Wei Fu
cb5a48e645 *: enable ARM64 runner
There are many Kubernetes clusters running on ARM64. Enable ARM64 runner
is to commit to support ARM64 platform officially.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-07 23:55:36 +08:00
Phil Estes
a68efb1bad
Merge pull request #9351 from thaJeztah/update_golang_1.21.4
update to go1.21.5, go1.20.12
2023-12-07 10:39:24 -05:00
Sebastiaan van Stijn
596ada3ac0
release: add .dockerignore to fix repeated builds
Ignore previous release-artifacts so that repeated builds rebuild them. Before
this patch, building the dockerfile multiple times would rebuild the binaries,
but would not produce a new release-artifact (`.tar.gz`), because the make
target would not trigger if the file was already present.

With this patch, existing release-artifacts are no longer copied into the
Dockerfile, which prevents this, as well as saving some time copying files
that won't be used.

In addition to the above, other excludes were copied from the .gitignore,
to prevent cache-busts.

I also added `.DS_Store` files to the ignore-file. These files are generated
on macOS when navigating the filesystem, and would cause the build to fail if
present, as well as invalidating the build-cache;

    docker buildx build --build-arg RELEASE_VER=main --build-arg UBUNTU_VERSION=22.04 --build-arg GO_VERSION=1.21.5 -f .github/workflows/release/Dockerfile -o releases/ .
    ...
     > [target 4/4] RUN     export GIT_STATUS_OUTPUT=$(git status --porcelain) &&   test -z $GIT_STATUS_OUTPUT || (echo $GIT_STATUS_OUTPUT && exit 1):
    0.118 ++ git status --porcelain
    1.405 + export 'GIT_STATUS_OUTPUT=?? .DS_Store
    1.405 ?? .github/.DS_Store
    ...
    1.407 + test -z gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    1.407 /bin/bash: line 1: test: too many arguments
    1.408 + echo gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    1.408 + exit 1
    1.408 gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store

Finally, I removed a redundant "echo", which causes (as seen above) the list
of uncommitted files to be printed twice (or three times even). We already print
the list of files, as well as print the `test -z` command that is executed, which
includes the list of files (`$GIT_STATUS_OUTPUT`). With this patch applied;

    6.307 + test -z gc .DS_Store gc .github/.DS_Store gc api/.DS_Store gc api/api/ gc api/runtime/.DS_Store gc api/services/.DS_Store gc api/types/.DS_Store gc archive/.DS_Store gc cmd/.DS_Store gc cmd/containerd-shim-runc-v2/.DS_Store gc cmd/containerd-shim-runc-v2/vendor/ gc cmd/containerd/.DS_Store gc cmd/ctr/.DS_Store gc content/.DS_Store gc contrib/.DS_Store gc contrib/ansible/.DS_Store gc contrib/seccomp/.DS_Store gc diff/.DS_Store gc docs/.DS_Store gc docs/historical/.DS_Store gc events/.DS_Store gc gc/.DS_Store gc images/.DS_Store gc images/converter/.DS_Store gc integration/.DS_Store gc integration/cri-api/.DS_Store gc integration/failpoint/.DS_Store gc integration/images/.DS_Store gc integration/remote/.DS_Store gc leases/.DS_Store gc metadata/.DS_Store gc metrics/.DS_Store gc metrics/cgroups/.DS_Store gc metrics/types/.DS_Store gc pkg/.DS_Store gc pkg/cri/.DS_Store gc pkg/oom/.DS_Store gc pkg/transfer/.DS_Store gc plugins/.DS_Store gc protobuf/.DS_Store gc releases/.DS_Store
    6.307 /bin/bash: line 1: test: too many arguments
    6.308 + echo 'git repository contains uncommitted changes'
    6.308 + exit 1
    6.308 git repository contains uncommitted changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-07 15:03:34 +01:00
Samuel Karp
148d21b1ae
Merge pull request #9480 from dmcgowan/fix-otel-http
Fix otel version incompatibility
2023-12-06 22:08:58 +00:00
Derek McGowan
cf4b57989d
Remove deprecated tracing function
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-06 11:20:31 -08:00
Derek McGowan
8203bb9977
Add HTTP client update function to tracing library
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-06 11:17:44 -08:00
Milas Bowman
ad3b806a4f
fix(tracing): use latest version of semconv
All components need to use a consistent `semconv` version or OTel
will emit errors about "cannot merge resource due to conflicting Schema URL".

Switch to the appropriate semconv version, which requires dropping
usage of `httpconv`. Instead, the upstream HTTP client hooks are
used directly. (The lower-level functions are no longer exported by
OTel.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-12-06 11:09:40 -08:00
Akihiro Suda
194a1fdd2c
Merge pull request #9473 from ktock/cni-plugins-1.4.0
go.mod: Bump up github.com/containernetworking/plugins to v1.4.0
2023-12-06 05:27:21 +00:00
Derek McGowan
3b46a41527
Merge pull request #9474 from lengrongfu/feat/upgrade-crun-version
upgrade crun version from 1.9 to 1.12
2023-12-06 04:53:40 +00:00
lengrongfu
22db60b6ba upgrade crun version from 1.9 to 1.12
Signed-off-by: lengrongfu <lenronfu@gmail.com>
2023-12-06 10:19:43 +08:00
Kohei Tokunaga
9937909693
go.mod: Bump up github.com/containernetworking/plugins to v1.4.0
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-12-06 10:29:44 +09:00
Sebastiaan van Stijn
734219a21a
update to go1.21.5, go1.20.12
go1.21.5 (released 2023-12-05) includes security fixes to the go command,
and the net/http and path/filepath packages, as well as bug fixes to the
compiler, the go command, the runtime, and the crypto/rand, net, os, and
syscall packages. See the Go 1.21.5 milestone on our issue tracker for
details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.4...go1.21.5

from the security mailing:

[security] Go 1.21.5 and Go 1.20.12 are released

Hello gophers,

We have just released Go versions 1.21.5 and 1.20.12, minor point releases.

These minor releases include 3 security fixes following the security policy:

- net/http: limit chunked data overhead

  A malicious HTTP sender can use chunk extensions to cause a receiver
  reading from a request or response body to read many more bytes from
  the network than are in the body.

  A malicious HTTP client can further exploit this to cause a server to
  automatically read a large amount of data (up to about 1GiB) when a
  handler fails to read the entire body of a request.

  Chunk extensions are a little-used HTTP feature which permit including
  additional metadata in a request or response body sent using the chunked
  encoding. The net/http chunked encoding reader discards this metadata.
  A sender can exploit this by inserting a large metadata segment with
  each byte transferred. The chunk reader now produces an error if the
  ratio of real body to encoded bytes grows too small.

  Thanks to Bartek Nowotarski for reporting this issue.

  This is CVE-2023-39326 and Go issue https://go.dev/issue/64433.

- cmd/go: go get may unexpectedly fallback to insecure git

  Using go get to fetch a module with the ".git" suffix may unexpectedly
  fallback to the insecure "git://" protocol if the module is unavailable
  via the secure "https://" and "git+ssh://" protocols, even if GOINSECURE
  is not set for said module. This only affects users who are not using
  the module proxy and are fetching modules directly (i.e. GOPROXY=off).

  Thanks to David Leadbeater for reporting this issue.

  This is CVE-2023-45285 and Go issue https://go.dev/issue/63845.

- path/filepath: retain trailing \ when cleaning paths like \\?\c:\

  Go 1.20.11 and Go 1.21.4 inadvertently changed the definition of the
  volume name in Windows paths starting with \\?\, resulting in
  filepath.Clean(\\?\c:\) returning \\?\c: rather than \\?\c:\ (among
  other effects). The previous behavior has been restored.

  This is an update to CVE-2023-45283 and Go issue https://go.dev/issue/64028.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:34:44 +01:00
Sebastiaan van Stijn
2122004525
update to go1.21.4, go1.20.11
go1.21.4 (released 2023-11-07) includes security fixes to the path/filepath
package, as well as bug fixes to the linker, the runtime, the compiler, and
the go/types, net/http, and runtime/cgo packages. See the Go 1.21.4 milestone
on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.3...go1.21.4

from the security mailing:

[security] Go 1.21.4 and Go 1.20.11 are released

Hello gophers,

We have just released Go versions 1.21.4 and 1.20.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- path/filepath: recognize `\??\` as a Root Local Device path prefix.

  On Windows, a path beginning with `\??\` is a Root Local Device path equivalent
  to a path beginning with `\\?\`. Paths with a `\??\` prefix may be used to
  access arbitrary locations on the system. For example, the path `\??\c:\x`
  is equivalent to the more common path c:\x.

  The filepath package did not recognize paths with a `\??\` prefix as special.

  Clean could convert a rooted path such as `\a\..\??\b` into
  the root local device path `\??\b`. It will now convert this
  path into `.\??\b`.

  `IsAbs` did not report paths beginning with `\??\` as absolute.
  It now does so.

  VolumeName now reports the `\??\` prefix as a volume name.

  `Join(`\`, `??`, `b`)` could convert a seemingly innocent
  sequence of path elements into the root local device path
  `\??\b`. It will now convert this to `\.\??\b`.

  This is CVE-2023-45283 and https://go.dev/issue/63713.

- path/filepath: recognize device names with trailing spaces and superscripts

  The `IsLocal` function did not correctly detect reserved names in some cases:

  - reserved names followed by spaces, such as "COM1 ".
  - "COM" or "LPT" followed by a superscript 1, 2, or 3.

  `IsLocal` now correctly reports these names as non-local.

  This is CVE-2023-45284 and https://go.dev/issue/63713.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:31:28 +01:00
Samuel Karp
d55bfab176
Merge pull request #9465 from ambarve/sn_cleanup
Don't block snapshot garbage collection on Remove failures
2023-12-05 21:33:43 +00:00
Fu Wei
9a7130d132
Merge pull request #9461 from kinvolk/rata/idmap
pkg/process: Check using idmap mount options too
2023-12-05 15:43:14 +00:00
Amit Barve
ad96fded4c Don't block snapshot garbage collection on Remove failures
If a snapshot removal fails (during garbage collection), the entire garbage collection operation is
cancelled. This is problematic because once cleanup of any snapshot fails no other snapshots will be cleaned
and the disk usage will just keep increasing.
Solution is to return snapshot removal errors wrapped as "ErrFailedPrecondition" errors. The garbage
collectors continues cleanup if the error is of this type.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2023-12-04 15:00:00 -08:00
Fu Wei
87bf39a7f5
Merge pull request #9445 from dmcgowan/update-contributing-root-packages
Add core and internal root packages to contributing
2023-12-04 18:22:14 +00:00
Rodrigo Campos
8bbce8d37f pkg/process: Check using idmap mount options too
The runtime-spec just merged this PR:
	https://github.com/opencontainers/runtime-spec/pull/1224

This means that it is now possible to request idmap mounts by specifying
"idmap" or "ridmap" in the mount options, without any mappings.

Let's add a check to see if they are requested in that way too.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-12-04 15:17:59 +01:00
Maksym Pavlenko
47163c3c00
Merge pull request #9391 from abel-von/sandbox-plugin-1117
sandbox: Move CRI Image Service and CRI Base seperate plugins
2023-12-01 22:42:22 +00:00
Maksym Pavlenko
40ec4b9bce
Merge pull request #9410 from ktock/continuity-0.4.3
go.mod: github.com/containerd/continuity v0.4.3
2023-12-01 22:41:30 +00:00
Maksym Pavlenko
63609d33ca
Merge pull request #9434 from abel-von/add-integration-test
sandbox: add cri integration test case for upgrade
2023-12-01 22:40:35 +00:00
Maksym Pavlenko
e2303c267e
Merge pull request #9414 from ZhangShuaiyi/fix/tomlext_MarshalText
tomlext.Duration add MarshalText method
2023-12-01 22:36:53 +00:00
Maksym Pavlenko
a1a8a666fd
Merge pull request #9430 from ktock/fsnotify-1.7.0
Bump up github.com/fsnotify/fsnotify to v1.7.0
2023-12-01 22:35:01 +00:00
Maksym Pavlenko
6f405e89f8
Merge pull request #9447 from dcantah/dial-grpc-shim-socket
runtime/v2: net.Dial gRPC shim sockets before trying grpc
2023-12-01 22:32:41 +00:00
Derek McGowan
96aaf5a3b2
Add core and internal root packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-01 11:26:25 -08:00
Abel Feng
c0363754fb sandbox: get runtime info from sandbox or container
For backward compatibility, we should get runtimeInfo from sandbox in
db, or get it from the sandbox container in db.
Note that this is a temporary solution and we will remove the Container field in
Sandbox in cri cache, and replace it with a SandboxInsantance of type
containerd.Sandbox interface.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-12-01 15:58:27 +08:00
Abel Feng
95d2a3b7c0 upgrade: add cri upgrade test case
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-12-01 15:58:16 +08:00
Danny Canter
0bc9633414 runtime/v2: net.Dial gRPC shim sockets before trying grpc
This is mostly to workaround an issue with gRPC based shims after containerd
restart. If a shim dies while containerd is also down/restarting, on reboot
grpc.DialContext with our current set of DialOptions will make us wait for
100 seconds per shim even if the socket no longer exists or has no listener.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-11-30 19:37:43 -08:00
Kazuyoshi Kato
8459273f80
Merge pull request #9444 from AkihiroSuda/move-pkg-process
mv pkg/process cmd/containerd-shim-runc-v2/process
2023-12-01 00:08:34 +00:00
Derek McGowan
b8e32595ba
Merge pull request #8166 from laurazard/gzip-gstd-compression
Support gzip and zstd HTTP transport compression to fetch remote resources
2023-11-30 18:05:55 +00:00
Abel Feng
e1b4958663 sandbox: keep rootDir and stateDir compatible
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-30 23:06:53 +08:00
Abel Feng
b0fef6738f sandbox: migrate sandbox_mode to sandboxer
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-30 23:06:53 +08:00
Abel Feng
c8012b6d74 sandbox: make a clear dependency of cri plugins
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-30 23:06:41 +08:00
Laura Brehm
2ead895094
Support gzip and zstd HTTP transport compression to fetch remote resources
Co-authored-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-11-30 13:51:33 +00:00
Akihiro Suda
8e567aa581
mv pkg/process cmd/containerd-shim-runc-v2/process
The package is quite specific to runc and only imported by
containerd-shim-runc-v2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-11-30 21:50:04 +09:00
Derek McGowan
58af8cda54
Merge pull request #9422 from fuweid/upgrade-exec
integration: add new binary upgrade case
2023-11-29 22:37:51 +00:00
Derek McGowan
066ab793f2
Merge pull request #9428 from yibozhuang/containerd-stress-cri-endpoint
containerd-stress: use config address for CRI test
2023-11-28 22:01:55 +00:00
Kohei Tokunaga
a813097dcc
Bump up github.com/fsnotify/fsnotify to v1.7.0
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-28 17:07:23 +09:00
Yibo Zhuang
c384e37177 containerd-stress: use config address for CRI test
This change removes the hard-coded containerd endpoint
for CRI test and use the address in the config which would
honor the CLI flag.

Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
2023-11-27 17:51:02 -08:00
Wei Fu
d4c828c2ca integration: add new binary upgrade case
Add Exec-to-Existing-Running-Container case.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-26 22:38:02 +08:00
Samuel Karp
787943dc10
Merge pull request #9412 from profnandaa/fix/dialer_function_windows
pkg/dialer: minor fix on dialer function for windows
2023-11-23 00:38:51 +00:00
Anthony Nandaa
8e91edb71e fix(pkg/dialer): minor fix on dialer function for windows
This commit fixes the dialer function to make sure that
"npipe://" prefix is trimmed, just like the way it is done
in the Unix counterpart, `./dialer_unix.go:50`

This will also unblock some downstream work going on in
buildkit; setting up integration tests to run on Windows.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2023-11-22 04:25:11 -08:00
Shuaiyi Zhang
ad3f8c563b tomlext.Duration add MarshalText method
Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
2023-11-22 19:28:46 +08:00
Samuel Karp
6ed8f01aa1
Merge pull request #9384 from rokkiter/fix-ticker-leak
fix ticker leak
2023-11-22 05:41:57 +00:00
Derek McGowan
d682b16f9c
Merge pull request #9280 from vvoland/push-inherit-distribution-source
push: always inherit distribution sources from parent
2023-11-22 05:31:35 +00:00
Akihiro Suda
ab63218858
Merge pull request #9407 from ktock/golangci-lint-1.55.2
Bump up golangci-lint to v1.55.2 and tiny fix on .golangci.yml
2023-11-22 04:12:03 +00:00
Kohei Tokunaga
6da015284c
go.mod: github.com/containerd/continuity v0.4.3
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-22 12:26:35 +09:00
Kohei Tokunaga
cd348e6ef9
.golangci.yml: remove directories that don't exist
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-22 00:14:35 +09:00
Kohei Tokunaga
4b556a6e01
Bump up golangci-lint to v1.55.2
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-11-22 00:13:57 +09:00
Samuel Karp
f12e84b5c5
Merge pull request #9369 from fuweid/fix-pull-progress
fix: ImagePull should close http connection if there is no available data to read.
2023-11-20 19:02:21 +00:00
Paweł Gronowski
c51d4f9b69
push: always inherit distribution sources from parent
Propagate parent distribution source labels to each of its children even
if they're not missing. This allows to cross-repo mount blobs when the
child content has different distribution source label from its
parent manifest/index. This could happen when different parts of image
were fetched from different sources.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-11-20 15:06:16 +01:00
Maksym Pavlenko
e15c246550 Move CRI image service into a separate plugin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-20 09:41:27 +08:00
Wei Fu
80dd779deb remotes/docker: close connection if no more data
Close connection if no more data. It's to fix false alert filed by image
pull progress.

```
dst = OpenWriter (--> Content Store)

src = Fetch
        Open (--> Registry)
        Mark it as active request

Copy(dst, src) (--> Keep updating total received bytes)

   ^
   |  (Active Request > 0, but total received bytes won't be updated)
   v

defer src.Close()
content.Commit(dst)
```

Before migrating to transfer service, CRI plugin doesn't limit global
concurrent downloads for ImagePulls. Each ImagePull requests have 3 concurrent
goroutines to download blob and 1 goroutine to unpack blob. Like ext4
filesystem [1][1], the fsync from content.Commit may sync unrelated dirty pages
into disk. The host is running under IO pressure, and then the content.Commit
will take long time and block other goroutines. If httpreadseeker
doesn't close the connection after io.EOF, this connection will be
considered as active. The pull progress reporter reports there is no
bytes transfered and cancels the ImagePull.

The original 1-minute timeout[2][2] is from kubelet settting. Since CRI-plugin
can't limit the total concurrent downloads, this patch is to update 1-minute
to 5-minutes to prevent from unexpected cancel.

[1]: https://lwn.net/Articles/842385/
[2]: https://github.com/kubernetes/kubernetes/blob/release-1.23/pkg/kubelet/config/flags.go#L45-L48

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-18 10:23:05 +08:00
Wei Fu
7f410ae05a integration: reproduce #9347
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-18 10:23:05 +08:00
Wei Fu
2e9686c054 fix: deflake TestCRIImagePullTimeout/HoldingContentOpenWriter
The new active request is filed and there is no bytes read yet when the
progress reporter just wakes up. If the timeout / 2 is less than the
minPullProgressReportInternal, it's easy to file false alert.

We should remove the minPullProgressReportInternal limit.

Fixes: #8024

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-18 10:23:05 +08:00
Samuel Karp
349c8d12c8
Merge pull request #9393 from AkihiroSuda/ci-fedora39
CI: update Fedora to 39
2023-11-17 21:24:47 +00:00
Akihiro Suda
4aa932337c
CI: update Fedora to 39
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-11-18 05:28:09 +09:00
Derek McGowan
01f3937248
Merge pull request #9392 from fuweid/fix-ci
fix: podsandbox depends on Lease plugin
2023-11-17 18:00:01 +00:00
Wei Fu
f6c4de6b53 fix: podsandbox depends on Lease plugin
introduced by 09723a6175

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-17 23:29:04 +08:00
rokkiter
1b65fe2646 fix ticker leak
Signed-off-by: rokkiter <yongen.pan@daocloud.io>
2023-11-17 10:21:57 +08:00
Phil Estes
7ea66e3af7
Merge pull request #9376 from austinvazquez/update-getting-started-for-v2
Update documentation for containerd v2.0 packages
2023-11-16 23:46:46 +00:00
Fu Wei
09723a6175
Merge pull request #9275 from abel-von/sandbox-plugin-1019
sandbox: podsandbox controller init its own client
2023-11-16 10:01:02 +00:00
Samuel Karp
1a54a217ca
Merge pull request #9338 from Iceber/update_pinned_label
cri: fix update of pinned label for images
2023-11-16 05:54:55 +00:00
Austin Vazquez
1af0cba1a8 Update documentation for containerd v2.0 packages
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-11-16 00:40:21 +00:00
Maksym Pavlenko
5664c9a61a
Merge pull request #9368 from thaJeztah/shim_logs
services/server, runtime/v2/shim: use structured log for plugin ID
2023-11-15 23:21:26 +00:00
Maksym Pavlenko
860d525f3f
Merge pull request #9372 from austinvazquez/enhance-unpack-logs
Enhance container image unpack client logs
2023-11-15 23:20:23 +00:00
Samuel Karp
56f5864074
Merge pull request #9373 from akhilerm/remove-adopter-eliot
adopters.md: remove Eliot project
2023-11-15 23:08:09 +00:00
Derek McGowan
4ef1bafd6f
Merge pull request #9364 from mxpv/runc
Move runc shim implementation to cmd
2023-11-15 21:23:52 +00:00
Akhil Mohan
4f42da4161
adopters.md: remove Eliot project
remove Eliot project as it is inactive now.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-11-16 00:22:11 +05:30
Austin Vazquez
01c442147f Enhance container image unpack client logs
Adds debug message per layer unpacking and adds duration field to
the existing image unpacking debug message.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2023-11-15 17:30:53 +00:00
Derek McGowan
134dc8782b
Merge pull request #9256 from milas/otel-1.19
vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
2023-11-15 17:02:06 +00:00
Milas Bowman
e7390d4edc vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
Upgrade OpenTelemetry core libs to v1.19.0 and contrib (for gRPC
tracing) to v0.45.0.

The OpenTelemetry internal module structure/dependency graph is
rather complex, and recently some parts (e.g. metrics) have
graduated to "stable" from "unstable", so this upgrade is important
to unblock downstream projects to be able to use newer versions of
the OpenTelemetry libraries, as they can cause compatibility issues
due to internal/peer dependency changes otherwise.

Hopefully, future updates won't be as problematic, such that projects
using containerd as a dependency will be able to use newer versions
of the libraries in a compatible fashion.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-11-15 09:24:36 -05:00
Sebastiaan van Stijn
1a1bd6d0a7
runtime/v2/shim: use structured log for plugin ID
These logs were already using structured logs, so include "id" as a field,
which also prevents the id being quoted (and escaped when printing);

    time="2023-11-15T11:30:23.745574884Z" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1
    time="2023-11-15T11:30:23.745612425Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.pause\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1
    time="2023-11-15T11:30:23.745620884Z" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1
    time="2023-11-15T11:30:23.745625925Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1

Also updated some changed `WithError().WithField()` calls, to prevent some
overhead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
71fd85f5ed
runtime/v2/shim: run(): remove unused "name" argument
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
0a59c33be5
runtime/v2/shim: rename var that shadowed package var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
be22e12d56
services/server: use structured log for plugin ID
These logs were already using structured logs, so include "id" as a field,
which also prevents the id being quoted (and escaped when printing);

    time="2023-11-15T11:30:23.745574884Z" level=info msg="loading plugin \"io.containerd.internal.v1.shutdown\"..." runtime=io.containerd.runc.v2 type=io.containerd.internal.v1
    time="2023-11-15T11:30:23.745612425Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.pause\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1
    time="2023-11-15T11:30:23.745620884Z" level=info msg="loading plugin \"io.containerd.event.v1.publisher\"..." runtime=io.containerd.runc.v2 type=io.containerd.event.v1
    time="2023-11-15T11:30:23.745625925Z" level=info msg="loading plugin \"io.containerd.ttrpc.v1.task\"..." runtime=io.containerd.runc.v2 type=io.containerd.ttrpc.v1

Also updated some changed `WithError().WithField()` calls, to prevent some
overhead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:23:53 +01:00
Sebastiaan van Stijn
09de4f1fcc
services/server: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:08:53 +01:00
Sebastiaan van Stijn
14e621cf91
services/server: gofumpt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-15 13:08:52 +01:00
Abel Feng
32bf805e57 sandbox: add a sandboxService interface to criService
so that we can add a fakeSandboxService to the criService in tests.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:25:58 +08:00
Abel Feng
25a4c3d235 sandbox: remove SandboxersServicePlugin
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:22:10 +08:00
Abel Feng
0cf48bab2c sandbox: podsandbox init its own client
To break the cyclic dependency of cri plugin and podsandbox plugin,
we define a new plugin type of SandboxesServicePlugin and when cri init
it's own client, it will add the all the controllers by get them from
the SandboxesServicePlugin.
when podsandbox controller init it's client, it will not Require the
SandboxesServicePlugin.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:22:10 +08:00
Maksym Pavlenko
7d65a45639
Move runc shim implementation to cmd
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-11-14 10:13:32 -08:00
Samuel Karp
7deb68fbf4
Merge pull request #9266 from akhilerm/refactor-cri-labels
refactor labels used in cri server
2023-11-14 04:20:00 +00:00
Derek McGowan
276dce8651
Merge pull request #9358 from thaJeztah/bump_runc_binary_1.1.10
update runc binary to v1.1.10
2023-11-13 22:42:22 +00:00
Akhil Mohan
e682da76ce
fix labels in pod sandbox
Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-11-14 01:52:09 +05:30
Akhil Mohan
64c41162c3
update tests to use labels from cri/labels
Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-11-14 01:46:43 +05:30
Akhil Mohan
7e79225cec
refactor labels used in cri server
remove the duplication of labels used in cri/server
and move them to a common package cri/labels

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-11-14 01:45:26 +05:30
Sebastiaan van Stijn
274a162824
update runc binary to v1.1.10
- full diff: https://github.com/opencontainers/runc/compare/v1.1.9...v1.1.10
- release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.10

This is the tenth (and most likely final) patch release in the 1.1.z
release branch of runc. It mainly fixes a few issues in cgroups, and a
umask-related issue in tmpcopyup.

- Add support for `hugetlb.<pagesize>.rsvd` limiting and accounting.
  Fixes the issue of postgres failing when hugepage limits are set.
- Fixed permissions of a newly created directories to not depend on the value
  of umask in tmpcopyup feature implementation.
- libcontainer: cgroup v1 GetStats now ignores missing `kmem.limit_in_bytes`
  (fixes the compatibility with Linux kernel 6.1+).
- Fix a semi-arbitrary cgroup write bug when given a malicious hugetlb
  configuration. This issue is not a security issue because it requires a
  malicious config.json, which is outside of our threat model.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-13 16:03:29 +01:00
Iceber Gu
2e014fa2ac cri: fix update of pinned label for images
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2023-11-10 23:27:11 +08:00
Samuel Karp
45d7f2324d
Merge pull request #9046 from thaJeztah/depguard_libcontainer
golangci-lint: enable depguard to prevent re-introducing libcontainer
2023-11-10 02:27:18 +00:00
Kazuyoshi Kato
67650f2bf1
Merge pull request #9348 from lengrongfu/feat/default-enable-unprivileged-icmp-and-ports
add default enable unprivileged icmp/ports
2023-11-10 00:36:21 +00:00
Phil Estes
1dd9581209
Merge pull request #9262 from fuweid/init-upgrade-test
integration: init release upgrade testing
2023-11-09 19:54:40 +00:00
Sebastiaan van Stijn
cb555fa16f
golangci-lint: enable depguard to prevent re-introducing libcontainer
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-09 13:20:48 +01:00
Samuel Karp
669e0786d8
Merge pull request #9145 from deitch/doc-runtime-shim
document runtime and shim configuration and selection
2023-11-09 07:24:31 +00:00
Phil Estes
c2b39b139e
Merge pull request #9349 from fuweid/deflaky-TestIssue9103
integration: deflake TestIssue9103
2023-11-08 17:58:08 +00:00
Wei Fu
dac056fe74 integration: deflake TestIssue9103
Fixes: #9334

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-08 23:40:00 +08:00
rongfu.leng
7b9fcfd7c6 add default enable unprivileged icmp/ports
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-08 23:00:35 +08:00
Samuel Karp
5149050d6b
Merge pull request #9172 from lengrongfu/feat/add-validate-unprivileged
add verify kernel version when enable unprivileged
2023-11-08 07:34:58 +00:00
Phil Estes
c3101bd45f
Merge pull request #9341 from lengrongfu/fix/replace-expected-field
fix: expected and actual field position adjustment
2023-11-07 20:40:39 +00:00
Kazuyoshi Kato
186075d554
Merge pull request #9324 from thaJeztah/checkpoint_errs
client: remove obsolete ErrCheckpointRWUnsupported
2023-11-07 15:53:50 +00:00
Derek McGowan
de55dfc0f1
Merge pull request #9318 from dmcgowan/prepare-2.0-beta.0
Prepare release notes for 2.0.0-beta.0
2023-11-06 17:21:29 +00:00
rongfu.leng
a7cd49c68a expected and actual field position adjustment
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-07 00:20:06 +08:00
rongfu.leng
e099717f9f validate kernel version for unprivileged icmp/port
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-06 23:50:12 +08:00
Avi Deitcher
76049170b8 document runtime and shim configuration and selection
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2023-11-06 08:59:36 +02:00
Wei Fu
2fab240f21 integration: init release upgrade test
The TestUpgrade downloads the latest of previous release's binary and
use them to setup pods and then use current release to recover the
existing pods.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-05 17:51:28 +08:00
Samuel Karp
bd2db42464
Merge pull request #9287 from lengrongfu/feat/add-warning-use-inheritable
add warning use inheritable Capabilities
2023-11-04 00:33:18 +00:00
Akihiro Suda
33fab02dce
Merge pull request #7647 from thaJeztah/no_execabs
switch back from golang.org/x/sys/execabs to os/exec (go1.19)
2023-11-03 07:40:22 +00:00
Samuel Karp
edbd387236
Merge pull request #9319 from samuelkarp/config-deprecation-warnings
cri: add deprecation warnings for mirrors, auths, and configs
2023-11-02 20:19:04 +00:00
Sebastiaan van Stijn
2af6db672e
switch back from golang.org/x/sys/execabs to os/exec (go1.19)
This is effectively a revert of 2ac9968401, which
switched from os/exec to the golang.org/x/sys/execabs package to mitigate
security issues (mainly on Windows) with lookups resolving to binaries in the
current directory.

from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path

> ## PATH lookups
>
> Command and LookPath no longer allow results from a PATH search to be found
> relative to the current directory. This removes a common source of security
> problems but may also break existing programs that depend on using, say,
> exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in
> the current directory. See the os/exec package documentation for information
> about how best to update such programs.
>
> On Windows, Command and LookPath now respect the NoDefaultCurrentDirectoryInExePath
> environment variable, making it possible to disable the default implicit search
> of “.” in PATH lookups on Windows systems.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-02 21:15:40 +01:00
Samuel Karp
a596d09ec9
cri: add deprecation warning for configs
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-11-02 11:17:32 -07:00
Samuel Karp
35924bccc0
cri: add deprecation warning for auths
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-11-02 11:17:32 -07:00
Samuel Karp
d7cb25d770
cri: add deprecation warning for mirrors
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-11-02 11:17:31 -07:00
Samuel Karp
58cc275eb8
cri: add ability to emit deprecation warnings
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-11-02 11:17:31 -07:00
Samuel Karp
6cd0e8e405
Merge pull request #9321 from dmcgowan/switch-to-plugin-repo
Switch to plugin repo
2023-11-02 16:50:49 +00:00
Phil Estes
740717673f
Merge pull request #9317 from jsturtevant/fix-sbserver-windows
CRI: Handle ArgsEscaped for new Sb Server by clearing commandline in spec
2023-11-02 14:45:39 +00:00
Phil Estes
3d6c5ea487
Merge pull request #9308 from ZhangShuaiyi/fix/TestRwLoop
test: remove /dev/loopX in TestRwLoop
2023-11-02 14:44:59 +00:00
Phil Estes
cb742b5dff
Merge pull request #9320 from vinayakankugoyal/io_uring
Don't allow io_uring related syscalls in the RuntimeDefault seccomp profile.
2023-11-02 14:43:35 +00:00
Sebastiaan van Stijn
68cac3f62f
client: remove obsolete ErrCheckpointRWUnsupported
runtime v1 is deprecated, and this error appears to be unused.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-02 09:49:14 +01:00
rongfu.leng
df19888f83 add warning use inheritable Capabilities
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-11-02 16:14:59 +08:00
Derek McGowan
411e2bce49
Remove plugins package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 23:01:42 -07:00
Derek McGowan
9db21401c4
Switch to github.com/containerd/plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 23:01:42 -07:00
Akihiro Suda
a72adffa65
Merge pull request #9316 from dmcgowan/rename-client-package
Move client to subpackage
2023-11-02 02:16:08 +00:00
Vinayak Goyal
a48ddf4a20 Don't allow io_uring related syscalls in the RuntimeDefault seccomp profile.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2023-11-02 01:23:58 +00:00
Derek McGowan
2dfae4c4b6
Prepare release notes for v2.0.0-beta.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 17:23:18 -07:00
Derek McGowan
6ca4b52605
Update mailmap
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 17:10:26 -07:00
James Sturtevant
a67efe88db
Add tests cases
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
2023-11-01 15:32:43 -07:00
Derek McGowan
f1d659dc50
Update package name in Makefile
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 14:28:24 -07:00
James Sturtevant
0ffc3e9873
Handle ArgsEscaped for new Sb Server
The PR https://github.com/containerd/containerd/pull/8198 fixed this for CRI but missed clearing the commandline in the forked SB server. This simply adds that back in

Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
2023-11-01 12:06:07 -07:00
Derek McGowan
b85df264ef
Rename opt to avoid stutter
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 10:39:54 -07:00
Derek McGowan
261e01c2ac
Move client to subpackage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-01 10:37:00 -07:00
Akihiro Suda
19ff94b701
Merge pull request #9306 from dmcgowan/containerd-v2-module
Containerd v2 module
2023-11-01 15:20:35 +00:00
Shuaiyi Zhang
b6adf43d4a test: use 'Autoclear: ture' in TestRwLoop and add Autoclear test
Signed-off-by: Shuaiyi Zhang <zhang_syi@qq.com>
2023-11-01 11:49:12 +08:00
Samuel Karp
d8d2b79e1d
Merge pull request #9305 from AlexRod34/doc-ops-update
Update cli --help output for consistency
2023-10-30 20:23:00 +00:00
Alex Rodriguez
124d3a20a6
Sync ops.md, update CLI --help output to be consistent in descriptions
Signed-off-by: Alex Rodriguez <alexrodriguez@ibm.com>
2023-10-30 08:54:29 -07:00
Derek McGowan
6021103e1f
Merge pull request #9274 from yyb196/fix-invalid-token
fix bug that using invalid token to retry fetching layer
2023-10-30 13:53:22 +00:00
Derek McGowan
5fdf55e493
Update go module to github.com/containerd/containerd/v2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-29 20:52:21 -07:00
Derek McGowan
abfc8be530
Fix lint in integration/client
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 22:32:44 -07:00
Derek McGowan
ddd73ad300
Move protofiles generated into v2 directory
Protobuf will automatically put the files generated for a v2 module into
a v2 directory. Move them to their correct location after running the
protobuild.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 15:44:23 -07:00
Derek McGowan
638b474c81
Temporarily remove imgcrypt in CRI to fix circular dependency
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 15:36:47 -07:00
Derek McGowan
192168038e
Temporarily remove integration/client submodule
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-27 11:11:20 -07:00
Samuel Karp
332fbd907e
Merge pull request #9258 from samuelkarp/introspection-deprecation-warning
Expose usage of deprecated features
2023-10-26 22:49:37 +00:00
Akihiro Suda
82d7a69605
Merge pull request #9286 from thaJeztah/bump_copress
vendor: github.com/klauspost/compress v1.17.2
2023-10-26 03:26:44 +00:00
Akihiro Suda
c5bd5cbeda
Merge pull request #9297 from milas/grpc-1.58.3-main
vendor: google.golang.org/grpc v1.58.3
2023-10-25 23:35:19 +00:00
Samuel Karp
90f1638e72
Merge pull request #9294 from dmcgowan/push-match-request-scheme
Check scheme and host of request on push redirect
2023-10-25 22:13:48 +00:00
Sebastiaan van Stijn
4e3fbd36e7
vendor: github.com/klauspost/compress v1.17.2
fixes data corruption with zstd output in "best"

full diff: https://github.com/klauspost/compress/compare/v1.17.1...v1.17.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-25 23:55:07 +02:00
Mike Brown
43d3cb9eb7
Merge pull request #9283 from dmcgowan/tls-default-behavior
Avoid TLS fallback when protocol is not ambiguous
2023-10-25 21:09:37 +00:00
Milas Bowman
856d1053f4 vendor: google.golang.org/grpc v1.58.3
Upgrade google.golang.org/grpc to v1.58.3 in preparation for
upgrading OTel, which has a dependency on the latest version.

See also: containerd/containerd#9281.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-10-25 16:47:11 -04:00
Samuel Karp
8b153152af
Merge pull request #9289 from dmcgowan/fuzz-daemon-cleanup
fuzz: update go fuzz to directly instantiate server
2023-10-25 17:54:44 +00:00
Derek McGowan
466ee870d5
Check scheme and host of request on push redirect
When the HTTP fallback is used, the scheme changes from HTTPS to HTTP
which can cause a mismatch on redirect, causing the authorizer to get
stripped out. Since the redirect host must match the redirect host in
this case, credentials are only sent to the same origin host that
returned the redirect.

This fixes an issue for a push getting a 401 unauthorized on the PUT
request even though credentials are available.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-25 08:47:22 -07:00
Samuel Karp
3fff8b4f62
ctr: new deprecations command
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:33 -07:00
Samuel Karp
079383dbec
dynamic: record deprecation for dynamic plugins
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:32 -07:00
Samuel Karp
260e71abc4
server: add ability to record config deprecations
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:32 -07:00
Samuel Karp
bc861b66f9
pull: record deprecation warning for schema 1
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:32 -07:00
Samuel Karp
9aab446733
introspection: add support for deprecations
Deprecation warnings are retrieved from the warning service and
returned via the Server RPC.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:31 -07:00
Samuel Karp
57c897f10d
api/introspection: deprecation warnings in server
The Server rpc in introspection service is extended to expose
deprecation warnings based on observed feature use in containerd.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:31 -07:00
Samuel Karp
240733ce2f
warning: new service for deprecations
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:31 -07:00
Samuel Karp
aff5b809c5
deprecation: new package for deprecations
This package enumerates the known deprecations in the current version of
containerd.  New deprecations should be added here, and old ones
removed.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-10-24 22:38:30 -07:00
Derek McGowan
f74ca32b89
Merge pull request #9290 from ktock/golangci-lint-1.55.0
ci: bump up golangci-lint to v1.55.0
2023-10-25 04:38:31 +00:00
Derek McGowan
d48ceb6065
Avoid TLS fallback when protocol is not ambiguous
The TLS fallback should only be used when the protocol is ambiguous due
to provided TLS configurations and defaulting to http. Do not add TLS
configurations when defaulting to http. When the port is 80 or will be
defaulted to 80, there is no protocol ambiguity and TLS fallback should
not be used.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-24 20:27:19 -07:00
Derek McGowan
ed759bae32
Update go fuzz to directly instantiate server
Avoid importing the cmd libraries and create the server instance
directly from the server library.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-24 20:20:41 -07:00
沈陵
09e40511af fix bug that using invalid token to retry fetching layer
Signed-off-by: frankyang <yyb196@gmail.com>
2023-10-25 10:30:24 +08:00
Phil Estes
fa4ae46b15
Merge pull request #9295 from dmcgowan/disable-windows-2019
Disable windows-2019 integration test temporarily
2023-10-25 01:41:31 +00:00
Derek McGowan
2fea521d0c
Disable windows-2019 integration test temporarily
Disable windows-2019 integration tests until mingw issue is fixed

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-24 15:50:08 -07:00
Kohei Tokunaga
9fc407d8cf
ci: bump up golangci-lint to v1.55.0
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-24 10:34:02 +09:00
Derek McGowan
18c9e7ec4c
Merge pull request #9270 from fuweid/fix-sb-issues
pkg/cri: should ignore no sandbox bucket
2023-10-21 21:44:16 +00:00
Derek McGowan
788f7f248a
Merge pull request #9218 from fuweid/followup-idmapped
idmapped: use pidfd to avoid pid reuse issue
2023-10-20 17:34:02 +00:00
Derek McGowan
e973109c2d
Merge pull request #9233 from mxpv/tasks
Switch runc shim to task service v3 and fix restore
2023-10-20 17:26:31 +00:00
Derek McGowan
e3c3478cb6
Merge pull request #9279 from abel-von/remove-validate-mode
sandbox: remove ValidateMode as it is not used
2023-10-20 06:13:16 -07:00
Abel Feng
8b4f9656d2 sandbox: remove ValidateMode as it is not used
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-20 16:02:13 +08:00
Wei Fu
337cc21719 pkg/cri: should ignore no sandbox bucket
The sandbox might be recovered from v1.x release. It doesn't have
metadata bucket. We should ignore the not-found error.

How to reproduce the issue:

```bash
➜  containerd git:(main) sudo ctr version
Client:
  Version:  1.6.22
  Revision: 8165feabfdfe38c65b599c4993d227328c231fca
  Go version: go1.19.11

Server:
  Version:  1.6.22
  Revision: 8165feabfdfe38c65b599c4993d227328c231fca
  UUID: be4216aa-8a2e-4305-9186-efeacd2d9a17

➜  containerd git:(main) cat /tmp/pod.json
{
    "metadata": {
        "name": "nginx-sandbox",
        "namespace": "default",
        "attempt": 1,
        "uid": "hdishd83djaidwnduwk28bcsb"
    },
    "log_directory": "/tmp",
    "linux": {
    }
}

➜  containerd git:(main) sudo crictl runp /tmp/pod.json
616ea1cc657c57e80abf74e707a8177878ac2ec1ab7c346b4adb7bc0fadf986e
➜  containerd git:(main) sudo crictl pods
POD ID              CREATED             STATE               NAME                NAMESPACE           ATTEMPT             RUNTIME
616ea1cc657c5       9 seconds ago       Ready               nginx-sandbox       default             1                   (default)

➜  containerd git:(main) make BUILDTAGS=no_btrfs
➜  containerd git:(main) sudo PREFIX=/usr make install
+ install bin/ctr bin/containerd bin/containerd-stress bin/containerd-shim-runc-v2

➜  containerd git:(main) sudo systemctl restart containerd
➜  containerd git:(main) sudo ctr version
Client:
  Version:  v1.7.0-943-g980767551
  Revision: 9807675518
  Go version: go1.20.10

Server:
  Version:  v1.7.0-943-g980767551
  Revision: 9807675518
  UUID: be4216aa-8a2e-4305-9186-efeacd2d9a17

➜  containerd git:(main) sudo crictl stopp  616ea1cc657c5
Stopped sandbox 616ea1cc657c5

➜  containerd git:(main) sudo crictl rmp 616ea1cc657c5
E1019 14:03:37.885162 2052643 remote_runtime.go:295] "RemovePodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to remove sandbox metadata from store: failed to delete sandbox \"616ea1cc657c57e80abf74e707a8177878ac2ec1ab7c346b4adb7bc0fadf986e\": bucket not found" podSandboxID="616ea1cc657c5"
removing the pod sandbox "616ea1cc657c5": rpc error: code = Unknown desc = failed to remove sandbox metadata from store: failed to delete sandbox "616ea1cc657c57e80abf74e707a8177878ac2ec1ab7c346b4adb7bc0fadf986e": bucket not found
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-20 15:20:18 +08:00
Maksym Pavlenko
f90f80d9b3
Merge pull request #9254 from adisky/cri-streaming-from-k8s
Use staging k8s.io/kubelet/cri/streaming package
2023-10-19 12:32:12 -07:00
Maksym Pavlenko
f515cd5c55
Reorder fields when writing bootstrap params
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:06 -07:00
Maksym Pavlenko
3d53fbe858
Fix CRI integration tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:05 -07:00
Maksym Pavlenko
f76eaf5a6b
Fix 'not a directory' error when restoring bootstrap.json
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:05 -07:00
Maksym Pavlenko
cf75cfa32c
Add more logs around shim restore
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:04 -07:00
Maksym Pavlenko
8061cb0237
Save bootstrap.json instead of address file
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:03 -07:00
Maksym Pavlenko
e03bf32b86
Switch runc to v3
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:03 -07:00
Maksym Pavlenko
7a2d801d62
Expose shim instance version
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:02 -07:00
Maksym Pavlenko
f66c46806a
Bridge task service v2
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:29:01 -07:00
Maksym Pavlenko
daaf67662f
Switch runc shim to task v3
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-19 12:28:59 -07:00
Maksym Pavlenko
f7af7fce8a
Merge pull request #9268 from dmcgowan/cri-sandbox-controller-initialization
Initialize sandbox controller list on CRI server creation
2023-10-19 10:38:18 -07:00
Derek McGowan
bb64e6a8ef
Initialize sandbox controller list on CRI server creation
Avoid calling out to the client to get a sandbox controller and instead
setup the list of controllers on initialization. This fixes a test
failure which does not set the client.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-18 15:25:25 -07:00
Derek McGowan
9807675518
Merge pull request #8268 from abel-von/sandbox-plugin
Sandbox: make sandbox controller plugin
2023-10-18 10:16:10 -07:00
Aditi Sharma
03d81f595f Use cri streaming pkg from k8s staging
Use staging k8s.io/kubelet/cri/streaming package

Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2023-10-18 09:14:28 +05:30
Fu Wei
dc7dba9c20
Merge pull request #9239 from jiangliu/cri-multi-snapshotters
CRI: use (snapshotter_id, snapshot_key) to uniquely identify snapshots
2023-10-18 09:30:55 +08:00
Maksym Pavlenko
8e62cfcf89
Merge pull request #9253 from dmcgowan/add-proxy-diff-exports
Add exports to proxy plugin config
2023-10-17 15:34:41 -07:00
Maksym Pavlenko
bb27db4970
Merge pull request #8736 from dcantah/testcontainerpids-windows
Integration: Alter TestContainerPids for Windows
2023-10-17 13:26:13 -07:00
Maksym Pavlenko
5b8f401bab
Merge pull request #9255 from thaJeztah/update_image_spec
replace some hardcoded strings with ocispec consts
2023-10-17 11:53:02 -07:00
Sebastiaan van Stijn
b006f1c159
integration/client: replace hardcoded strings for OCI-spec consts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-17 17:53:24 +02:00
Sebastiaan van Stijn
d3f5e0c90e
images/archive: replace hardcoded strings for OCI-spec consts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-17 17:53:21 +02:00
Akihiro Suda
562d2998ab
Merge pull request #9251 from ktock/image-spec-v1.1.0-rc5
go.mod: bump up github.com/opencontainers/image-spec to v1.1.0-rc5
2023-10-18 00:51:31 +09:00
Jiang Liu
8e7c10c6d0 CRI: enhance ImageFsInfo() to support multiple snapshotters
Enhance cri/server/image/imagefs_info.go:ImageFsInfo() to support
snapshotter per runtime. Now `ImageFsInfoResponse.ImageFilesystems` may
contain multiple entries.

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
2023-10-17 17:38:18 +08:00
Samuel Karp
423c7ad4fe
Merge pull request #9211 from UiPath/use-loop-configure 2023-10-16 23:40:58 -07:00
Derek McGowan
e4639ad18b
Add exports to proxy plugin config
Allows external plugins to define exports.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-16 21:25:57 -07:00
Kohei Tokunaga
3986f80c35
go.mod: bump up github.com/opencontainers/image-spec to v1.1.0-rc5
Release note: https://github.com/opencontainers/image-spec/releases/tag/v1.1.0-rc5

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-17 10:19:55 +09:00
Derek McGowan
aef2ebc76a
Merge pull request #9250 from thaJeztah/bump_x_net
vendor: golang.org/x/net v0.17.0
2023-10-16 15:42:53 -07:00
Kazuyoshi Kato
14c50204e1
Merge pull request #9247 from thaJeztah/bump_grpc
vendor: google.golang.org/grpc v1.57.1
2023-10-16 14:48:01 -07:00
Sebastiaan van Stijn
f7c9e99422
vendor: golang.org/x/net v0.17.0
full diff: https://github.com/golang/text/compare/v0.13.0...v0.17.0

This fixes the same CVE as go1.21.3 and go1.20.10;

- net/http: rapid stream resets can cause excessive work

  A malicious HTTP/2 client which rapidly creates requests and
  immediately resets them can cause excessive server resource consumption.
  While the total number of requests is bounded to the
  http2.Server.MaxConcurrentStreams setting, resetting an in-progress
  request allows the attacker to create a new request while the existing
  one is still executing.

  HTTP/2 servers now bound the number of simultaneously executing
  handler goroutines to the stream concurrency limit. New requests
  arriving when at the limit (which can only happen after the client
  has reset an existing, in-flight request) will be queued until a
  handler exits. If the request queue grows too large, the server
  will terminate the connection.

  This issue is also fixed in golang.org/x/net/http2 v0.17.0,
  for users manually configuring HTTP/2.

  The default stream concurrency limit is 250 streams (requests)
  per HTTP/2 connection. This value may be adjusted using the
  golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams
  setting and the ConfigureServer function.

  This is CVE-2023-39325 and Go issue https://go.dev/issue/63417.
  This is also tracked by CVE-2023-44487.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 21:50:24 +02:00
Sebastiaan van Stijn
c3652540c7
vendor: golang.org/x/text v0.13.0
full diff: https://github.com/golang/text/compare/v0.11.0...v0.13.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 21:48:18 +02:00
Sebastiaan van Stijn
ff602c2133
vendor: golang.org/x/sys v0.13.0
full diff: https://github.com/golang/sys/compare/v0.10.0...v0.13.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 21:47:15 +02:00
Sebastiaan van Stijn
39b168cdb7
vendor: google.golang.org/grpc v1.57.1
server: prohibit more than MaxConcurrentStreams handlers from running at once
(CVE-2023-44487).

In addition to this change, applications should ensure they do not leave running
tasks behind related to the RPC before returning from method handlers, or should
enforce appropriate limits on any such work.

- https://github.com/grpc/grpc-go/compare/v1.57.0...v1.57.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 20:50:18 +02:00
Maksym Pavlenko
eb9ce4fd64
Merge pull request #9246 from GoodDaisy/main
Fix typos
2023-10-16 09:04:54 -07:00
Daisy Rong
930ee552e0 Fix typos
Signed-off-by: Daisy Rong <zrong0405@gmail.com>
2023-10-16 22:14:09 +08:00
Abel Feng
3ef300ca75 sandbox: remove global variable of podsandbox controller
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 21:17:50 +08:00
Abel Feng
7bca70c0c3 sandbox: do not call Connect when loadShim
The ShimManager.Start() will call loadShim() to get the existing shim if SandboxID
is specified for a container, but shimTask.PID() is called in loadShim,
which will call Connect() of Task API with the ID of a task that is not
created yet(containerd is getting the shim and Task API address to call
Create, so the task is not created yet).
In this commit we change the logic of loadShim() to get the shim without calling
Connect() of the not created container ID.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 21:17:50 +08:00
Abel Feng
d2d434b7d6 sandbox: add all sandbox information to Create method
When call sandbox controller to create sandbox, we change the param from
sandbox id to total sandbox object to git all information to controller,
so that sandbox controller do not rely on the sandbox store anymore,
this is more decouple for the sandbox controller plugin inside
containerd, and it is neccesary for remote sandbox controller plugins as
it is not able to get sandbox from the sandbox store anymore.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 21:17:50 +08:00
Abel Feng
0707f68690 sandbox: ignore not found error when remove sandbox
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 21:17:50 +08:00
Abel Feng
2951fb6dc6 sandbox: support more sandbox controllers
make containerd extensible to support more sandbox controllers
registered into containerd by config.
we change the default sandbox controller plugin's name from "local" to "shim".
to make sure we can get the controller by the plugin name it registered into
containerd.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 21:17:44 +08:00
Abel Feng
8b35976850 sandbox: add Sandboxer field to sandbox metadata
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 20:49:36 +08:00
Abel Feng
69e501e7cd sandbox: change SandboxMode to Sandboxer
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 20:49:36 +08:00
Abel Feng
f372b3501b sandbox: add sandboxer field of sandbox requests
As we are going to support more kinds of sandboxers, we have to tell
containerd which sandboxer used to manipulate a specific sandbox.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-10-16 20:49:36 +08:00
Alexandru Matei
a782fd6da2 Use LOOP_CONFIGURE when creating loop devices
LOOP_CONFIGURE is a new ioctl that is a lot faster than
the LOOP_SET_FD+LOOP_SET_STATUS64 calls

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2023-10-16 13:02:12 +03:00
Samuel Karp
de92d012bc
Merge pull request #9242 from ktock/compress-1.17.1 2023-10-15 22:42:51 -07:00
Samuel Karp
dbe82b7f6e
Merge pull request #9238 from fuweid/deprecated-go-plugin 2023-10-15 22:15:56 -07:00
Samuel Karp
cc9389a3fe
Merge pull request #9215 from qiutongs/docker-schema1-label 2023-10-15 22:07:51 -07:00
Qiutong Song
7712375630 Add a new image label if it is docker schema 1
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2023-10-16 04:11:33 +00:00
Jiang Liu
5ad6f34329 CRI: use (snapshotter_id, snapshot_key) to uniquely identify snapshots
Before snapshotter per runtime, CRI only supports a global snapshotter.
So a snapshot can be uniquely identified by `snapshot_key`. With snapshotter
per runtime enabled, there may be multiple snapshotters used by CRI. So only
(snapshotter_id, snapshot_key) can uniquely identify a snapshot.
Also extends CRI/store/snapshot/Store to support multiple snapshotters.

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
2023-10-16 10:21:10 +08:00
Kohei Tokunaga
41b2b2a7b8
go.mod: bump up github.com/klauspost/compress from v1.17.0 to v1.17.1
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-16 10:38:00 +09:00
Wei Fu
4febb08528 deprecated: go-plugin library as runtime plugin
We, containerd, suggest user to use binary plugins or RPC-based plugins.
Since go plugin has too many restrictions, I'm not sure that how many users
use the go plugin to extend the core function in the production.

Based on the fact that we put a lot of effort to make external plugins
better, suggest to deprecate go-plugin type plugin in v2.0 and remove it
in v2.1

REF: https://github.com/containerd/containerd/pull/556

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-16 08:55:07 +08:00
Mike Brown
23573965ff
Merge pull request #9234 from dmcgowan/fix-basic-auth-credential-error
remotes: add handling for missing basic auth credentials
2023-10-13 16:41:22 -05:00
Derek McGowan
51c9ffe468
remotes: add handling for missing basic auth credentials
When a credential handler is provided but no basic auth credentials
are provided, handle the error specifically rather than treating
the credentials as not implemented. This allows a clearer error to
be provided to users rather than a confusing not implemented error
or generic unauthorized error.

Add unit tests for the basic auth case.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-13 12:42:19 -07:00
Maksym Pavlenko
c49e6a7a1b
Merge pull request #9200 from kzys/igzip
Use Intel ISA-L's igzip if available
2023-10-13 11:13:01 -07:00
Derek McGowan
15bf23df09
Merge pull request #9231 from fuweid/update-release.md
RELEASES.md: mark legacy CRI as removed status
2023-10-13 05:59:53 -07:00
Samuel Karp
8ed0255f1b
Merge pull request #9205 from lengrongfu/feat/add-cpu-burst 2023-10-12 23:55:00 -07:00
Wei Fu
4f339b5b58 RELEASES.md: mark legacy CRI as removed status
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 14:21:24 +08:00
Akihiro Suda
9fcc3beb59
Merge pull request #9230 from mxpv/exit
Exit shim when shutdown manager is done
2023-10-13 14:51:20 +09:00
Akihiro Suda
0cd7bdd4a5
Merge pull request #9214 from dmcgowan/generalize-plugin-library
Generalize plugin library
2023-10-13 14:50:38 +09:00
Derek McGowan
0a4f792117
Remove use of v1 runtime plugin type for Unix
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-12 21:22:33 -07:00
Derek McGowan
71f8b4357e
Move dynamic plugins to a subpackage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-12 21:22:32 -07:00
Derek McGowan
7b2a918213
Generalize the plugin package
Remove containerd specific parts of the plugin package to prepare its
move out of the main repository. Separate the plugin registration
singleton into a separate package.

Separating out the plugin package and registration makes it easier to
implement external plugins without creating a dependency loop.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-12 21:22:32 -07:00
Derek McGowan
a80606bc2d
Move plugin type definitions to containerd plugins package
The plugins packages defines the plugins used by containerd.
Move all the types and properties to this package.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-12 20:52:56 -07:00
Derek McGowan
cb969085f5
Temporarily remove zfs as built in plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-12 20:39:22 -07:00
Maksym Pavlenko
2486c12987 Exit shim when shutdown manager is done
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 19:53:05 -07:00
Akihiro Suda
a7333657af
Merge pull request #9228 from mxpv/cri
🪦 RIP legacy CRI
2023-10-13 08:43:41 +09:00
Akihiro Suda
9c367d09f1
Merge pull request #9223 from dmcgowan/config-migration-v1
Introduce top level config migration
2023-10-13 08:43:13 +09:00
Maksym Pavlenko
1b31993240 Rename sbserver to server
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 15:46:57 -07:00
Derek McGowan
4edc6c2d99
Add note about configuration versions in releases
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-12 14:52:44 -07:00
Maksym Pavlenko
c5c94dc86c Fix CRI tests panic on CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 14:35:27 -07:00
Maksym Pavlenko
a3c2c1e4da Clean shell scripts
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 10:30:46 -07:00
Maksym Pavlenko
fa1d3a9ccb Fix dependencies after remove
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 10:30:46 -07:00
Wei Fu
3742f7f0db idmapped: use pidfd to avoid pid reuse issue
It's followup for #5890.

The containerd-shim process depends on the mount package to init rootfs
for container. For the container enable user namespace, the mount
package needs to fork child process to get the brand-new user namespace.
However, there are two reapers in one process (described by the
following list) and there are race-condition cases.

1. mount package
2. sys.Reaper as global one which watch all the SIGCHLD.

=== [kill(2)][kill] the wrong process ===

Currently, we use pipe to ensure that child process is alive. However,
the pide file descriptor can be hold by other process, which the child
process cannot exit by self. We should use [kill(2)][kill] to ensure the
child process. But we might kill the wrong process if the child process
might be reaped by containerd-shim and the PID might be reused by other
process.

=== [waitid(2)][waitid] on the wrong child process ===

```
containerd-shim process:

Goroutine 1(GetUsernsFD):                   Goroutine 2(Reaper)

1. Ready to wait for child process X

                                            2. Received SIGCHLD from X

                                            3. Reaped the zombie child process X

                                            (X has been reused by other child process)

4. Wait on process X

The goroutine 1 will be stuck until the process X has been terminated.
```

=== open `/proc/X/ns/user` on the wrong child process ===

There is also pid-reused risk between opening `/proc/$pid/ns/user` and
writing `/proc/$pid/u[g]id_map`.

```
containerd-shim process:

Goroutine 1(GetUsernsFD):                   Goroutine 2(Reaper)

1. Fork child process X

2. Write /proc/X/uid_map,gid_map

                                            3. Received SIGCHLD from X

                                            4. Reaped the zombie child process X

                                            (X has been reused by other process)

5. Open /proc/X/ns/user file as usernsFD

The usernsFD links to the wrong X!!!
```

In order to fix the race-condition, we should use [CLONE_PIDFD][clone2] (Since
Linux v5.2).

When we fork child process `X`, the kernel will return a process file
descriptor `X_PIDFD` referencing to child process `X`. With the pidfd, we can
use [pidfd_send_signal(2)][pidfd_send_signal] (Since Linux v5.1)
to send signal(0) to ensure the child process `X` is alive. If the `X` has
terminated and its PID has been recycled for another process. The
pidfd_send_signal fails with the error ESRCH.

Therefore, we can open `/proc/X/{ns/user,uid_map,gid_map}` file
descriptors as first and then use pidfd_send_signal to check the process
is still alive. If so, we can ensure the file descriptors are valid and
reference to the child process `X`. Even if the `X` PID has been reused
after pidfd_send_signal call, the file descriptors are still valid.

```code
X, pidfd = clone2(CLONE_PIDFD)

usernsFD = open /proc/X/ns/user
uidmapFD = open /proc/X/uid_map
gidmapFD = open /proc/X/gid_map

pidfd_send_signal pidfd, signal(0)
  return err if no such process

== When we arrive here, we can ensure usernsFD/uidmapFD/gidmapFD are correct
== even if X has been reused after pidfd_send_signal call.

update uid/gid mapping by uidmapFD/gidmapFD
return usernsFD
```

And the [waitid(2)][waitid] also supports pidfd type (Since Linux 5.4).
We can use pidfd type waitid to ensure we are waiting for the correct
process. All the PID related race-condition issues can be resolved by
pidfd.

```bash
➜  mount git:(followup-idmapped) pwd
/home/fuwei/go/src/github.com/containerd/containerd/mount

➜  mount git:(followup-idmapped) sudo go test -test.root -run TestGetUsernsFD -count=1000 -failfast -p 100  ./...
PASS
ok      github.com/containerd/containerd/mount  3.446s
```

[kill]: <https://man7.org/linux/man-pages/man2/kill.2.html>
[clone2]: <https://man7.org/linux/man-pages/man2/clone.2.html>
[pidfd_send_signal]: <https://man7.org/linux/man-pages/man2/pidfd_send_signal.2.html>
[waitid]: <https://man7.org/linux/man-pages/man2/waitid.2.html>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 00:56:55 +08:00
Maksym Pavlenko
2332b9ba10 Remove legacy CRI from CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 09:18:55 -07:00
Maksym Pavlenko
536abf1b35 Remove legacy CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 09:18:45 -07:00
Maksym Pavlenko
33b1a833c6 Move CRI testing package out
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 09:18:20 -07:00
Maksym Pavlenko
016114ff6f Move bandwidth package out of CRI server
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 09:12:52 -07:00
Danny Canter
3c1e7ffb80 Integration: Alter TestContainerPids for Windows
The point of this test is to see that we successfully can get all of
the pids running in the container and they match the number expected,
but for Windows this concept is a bit different. Windows containers
essentially go through the usermode boot phase of the operating system,
and have quite a few processes and system services running outside of
the "init" process you specify. Because of this, there's not a great
way to say "there should only be N processes running" like we can ensure
for Linux. So, on Windows check that we're at least greater than one.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-10-12 01:04:17 -07:00
Derek McGowan
8f013bb717
Add migration for older configuration versions
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-11 20:28:50 -07:00
Samuel Karp
420503072e
Merge pull request #9027 from akhilerm/fix-ctr-forbidden-characters 2023-10-11 17:29:55 -07:00
Derek McGowan
0f8b79b2af
Merge pull request #9221 from thaJeztah/update_golang_1.21.3
update to go1.21.3, go1.20.10
2023-10-11 14:47:09 -07:00
Sebastiaan van Stijn
313f514fdd
update to go1.21.3. gp1.20.10
go1.21.3 (released 2023-10-10) includes a security fix to the net/http package.
See the Go 1.21.3 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.21.3+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.21.2...go1.21.3

From the security mailing:

[security] Go 1.21.3 and Go 1.20.10 are released

Hello gophers,

We have just released Go versions 1.21.3 and 1.20.10, minor point releases.

These minor releases include 1 security fixes following the security policy:

- net/http: rapid stream resets can cause excessive work

  A malicious HTTP/2 client which rapidly creates requests and
  immediately resets them can cause excessive server resource consumption.
  While the total number of requests is bounded to the
  http2.Server.MaxConcurrentStreams setting, resetting an in-progress
  request allows the attacker to create a new request while the existing
  one is still executing.

  HTTP/2 servers now bound the number of simultaneously executing
  handler goroutines to the stream concurrency limit. New requests
  arriving when at the limit (which can only happen after the client
  has reset an existing, in-flight request) will be queued until a
  handler exits. If the request queue grows too large, the server
  will terminate the connection.

  This issue is also fixed in golang.org/x/net/http2 v0.17.0,
  for users manually configuring HTTP/2.

  The default stream concurrency limit is 250 streams (requests)
  per HTTP/2 connection. This value may be adjusted using the
  golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams
  setting and the ConfigureServer function.

  This is CVE-2023-39325 and Go issue https://go.dev/issue/63417.
  This is also tracked by CVE-2023-44487.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-11 20:29:07 +02:00
Sebastiaan van Stijn
6b752b5362
update to go1.21.2, go1.20.9
go1.21.2 (released 2023-10-05) includes one security fixes to the cmd/go package,
as well as bug fixes to the compiler, the go command, the linker, the runtime,
and the runtime/metrics package. See the Go 1.21.2 milestone on our issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.21.2+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.21.1...go1.21.2

From the security mailing:

[security] Go 1.21.2 and Go 1.20.9 are released

Hello gophers,

We have just released Go versions 1.21.2 and 1.20.9, minor point releases.

These minor releases include 1 security fixes following the security policy:

- cmd/go: line directives allows arbitrary execution during build

  "//line" directives can be used to bypass the restrictions on "//go:cgo_"
  directives, allowing blocked linker and compiler flags to be passed during
  compliation. This can result in unexpected execution of arbitrary code when
  running "go build". The line directive requires the absolute path of the file in
  which the directive lives, which makes exploting this issue significantly more
  complex.

  This is CVE-2023-39323 and Go issue https://go.dev/issue/63211.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-11 20:28:03 +02:00
Fu Wei
8db0d39c68
Merge pull request #9104 from cyyzero/fix-deadlock 2023-10-10 07:36:29 +08:00
rongfu.leng
8f3d1c9d9b add cpu-burst param to ctr command
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-10-09 21:51:24 +08:00
Fu Wei
ecda3b88ce
Merge pull request #9177 from lengrongfu/fix/toml-version-upgrade-bug 2023-10-09 20:19:09 +08:00
rongfu.leng
3ddcd6120d add Duration type to compatible toml v1 version
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-10-09 14:19:23 +08:00
Samuel Karp
b30e0163ac
Merge pull request #8934 from oss-qm/submit/go_build_flags
Makefile: allow overriding GO_BUILD_FLAGS via environment
2023-10-08 00:23:01 -07:00
Samuel Karp
841c693710
Merge pull request #9076 from CFSworks/fix-ipv6-pref
Fix `ip_pref` configuration option
2023-10-06 23:31:45 -07:00
Kazuyoshi Kato
40099ed56b
Merge pull request #9118 from CharityKathure/windows-default-path-overwrite-fix
Fix windows default path overwrite
2023-10-06 16:06:12 -07:00
kaz
535916d1d0 Skip exec.LookPath if a specific gzip implementation is disabled
Both pigz and igzip can be disabled via the environment variables.
If disabled, calling exec.LookPath and logging "not found" message is,
even in the debug level, doesn't make much sense.

Signed-off-by: Kazuyoshi Kato <kaz@fly.io>
2023-10-06 09:26:59 -07:00
Akhil Mohan
4b59d67dd4
add a new flag "skip-reference-check" to skip reference name check
Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-10-06 17:57:04 +05:30
Kazuyoshi Kato
34378ec9b4 Use Intel ISA-L's igzip if available
Intel ISA-L is Intel's open source (BSD) library that outperforms both
gzip and pigz. This commit checks and uses igzip if available.

Signed-off-by: Kazuyoshi Kato <kaz@fly.io>
2023-10-05 22:16:03 -07:00
Akihiro Suda
66aab638da
Merge pull request #8989 from dmcgowan/add-image-delete-target
Add image delete target
2023-10-05 10:53:57 -07:00
Akihiro Suda
e820a361fe
Merge pull request #9141 from dmcgowan/config-migration
Add support for plugin config migration
2023-10-05 10:51:34 -07:00
Charity Kathure
f73fe52667 Merge branch 'windows-default-path-overwrite-fix' of https://github.com/CharityKathure/containerd into windows-default-path-overwrite-fix 2023-10-05 10:10:14 +03:00
Charity Kathure
7d63690874 Fix windows default path overwrite issue
Windows Containers have a default path already configured at bootup. WithDefaultPathEnv overwrites this with a unix path

Signed-off-by: charitykathure <kathurecharity505@gmail.com>
2023-10-05 10:09:30 +03:00
Charity Kathure
13dcf558e9 Fix windows default path overwrite issue
Windows Containers have a default path already configured at bootup. WithDefaultPathEnv overwrites this with a unix path

Signed-off-by: charitykathure <kathurecharity505@gmail.com>
2023-10-04 23:10:46 +03:00
Phil Estes
3bb46b62c4
Merge pull request #9191 from ktock/compress-v1.17.0
go.mod: Bump up github.com/klauspost/compress v1.16.7 to v1.17.0
2023-10-04 08:52:49 -04:00
Fu Wei
bce8fe60df
Merge pull request #9183 from dcantah/cri-snapshotter-platform 2023-10-04 11:40:33 +08:00
Kohei Tokunaga
39478eeec4
go.mod: Bump up github.com/klauspost/compress v1.16.7 to v1.17.0
- release: https://github.com/klauspost/compress/releases/tag/v1.17.0
- diff: https://github.com/klauspost/compress/compare/v1.16.7...v1.17.0

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-04 10:01:50 +09:00
Derek McGowan
5b097a0817
Merge pull request #9187 from vvoland/remotes-docker-mounted-fix
remotes/docker: Fix MountedFrom prefixed with target repository
2023-10-03 09:33:35 -07:00
Derek McGowan
59134b5b3a
Merge pull request #8924 from polarathene/fix/use-implicit-nofile-limit
fix: Remove `LimitNOFILE` from `containerd.service`
2023-10-03 09:08:32 -07:00
Phil Estes
cffe399e89
Merge pull request #9184 from Kern--/xnet013
Bump x/net to 0.13
2023-10-03 10:41:57 -04:00
Phil Estes
3a154647d3
Merge pull request #9186 from ktock/golangci-lint-v1.54.2
Bump up golangci-lint to v1.54.2
2023-10-03 10:41:41 -04:00
Phil Estes
399c9d8326
Merge pull request #8861 from jedevc/docker-resolver-relevant-error
docker: return most relevant error from docker resolution
2023-10-03 10:40:52 -04:00
Paweł Gronowski
859c2651e5
remotes/docker: Fix MountedFrom prefixed with target repository
`MountedFrom` was prefixed with the whole target repository instead of
just the registry hostname.

Also adjust the test cases to use the registry hostname.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-03 16:40:10 +02:00
Derek McGowan
e8770b1716
Merge pull request #9155 from neersighted/image_cleanup_2
Use mediatype helpers in more places
2023-10-03 07:11:12 -07:00
Kohei Tokunaga
c85b1d1e4e
Bump up golangci-lint to v1.54.2
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-03 21:57:07 +09:00
Kohei Tokunaga
6169433b6b
Fix linter issues for golangci-lint 1.54.2
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-03 21:56:47 +09:00
Danny Canter
e3cb7471a6 CRI: Snapshotter per runtime handler adjustments
Pass the passed in context into some nested function calls, wrap
errors instead of %+v, and change some tests to strictly just test
for an error and not an exact error.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-10-03 02:05:34 -07:00
Fu Wei
28fa2751f2
Merge pull request #9182 from dmcgowan/localhost-http-fallback
remotes: always try to establish tls connection when tls configured
2023-10-03 16:11:48 +08:00
Kern Walster
42dc8faba8 Bump x/net to 0.13
This silences govulncheck detecting
https://pkg.go.dev/vuln/GO-2023-1988.

containerd does not directly use x/net

Signed-off-by: Kern Walster <walster@amazon.com>
2023-10-03 04:41:35 +00:00
Derek McGowan
79772a0dd4
remotes: always try to establish tls connection when tls configured
When a endpoint is configured for http and has a tls configuration,
always try to the tls connection and fallback to http when the tls
connections fails from receiving an http response. This fixes an issue
with default localhost endpoints which get defaulted to http with
insecure tls also configured but are using tls.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-02 15:29:11 -07:00
Phil Estes
e1655fe915
Merge pull request #9179 from henry118/test-assertion
Fix some assertions for integ tests
2023-10-02 14:51:12 -04:00
Wei Fu
11a7751af5 *: add runc-fp as runc wrapper to inject failpoint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-02 17:44:41 +00:00
Chen Yiyang
68dd47ef70 containerd-shim-runc-v2: avoid potential deadlock in create handler
After pr #8617, create handler of containerd-shim-runc-v2 will
call handleStarted() to record the init process and handle its exit.
Init process wouldn't quit so early in normal circumstances. But if
this screnario occurs, handleStarted() will call
handleProcessExit(), which will cause deadlock because create() had
acquired s.mu, and handleProcessExit() will try to lock it again.

So, I added a parameter muLocked to handleStarted to indicate whether
or not s.mu is currently locked, and thus deciding whether or not to
lock it when calling handleProcessExit.

Fix: #9103
Signed-off-by: Chen Yiyang <cyyzero@qq.com>
2023-10-02 17:44:41 +00:00
Chen Yiyang
6604ff6c55 containerd-shim-runc-v2: remove unnecessary s.getContainer()
Previous code has already called `getContainer()`, just pass it into
`s.getContainerPids` to reduce unnecessary lock and map lookup.

Signed-off-by: Chen Yiyang <cyyzero@qq.com>
2023-10-02 17:44:41 +00:00
Henry Wang
0d76fe5c1d Fix some assertions for integ tests
Signed-off-by: Henry Wang <henwang@amazon.com>
2023-10-02 17:14:27 +00:00
Derek McGowan
3a3d5dee15
Merge pull request #9178 from fuweid/fixci
ci-fix: pin the mingw version 12.2.0.3042023
2023-10-02 10:02:37 -07:00
Wei Fu
1dced31c36 ci-fix: pin the mingw version 12.2.0.3042023
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-02 22:10:52 +08:00
Fu Wei
02c9520d38
Merge pull request #9173 from charles-chenzz/main
update gitignore
2023-10-02 19:35:39 +08:00
charles-chenzz
aae71aa8e8 update gitignore to indicate that where contributors can use global gitignore
Signed-off-by: zefeng chen <Rekles666@gmail.com>
2023-10-02 19:00:04 +08:00
Fu Wei
1f0caa11c7
Merge pull request #9158 from AkihiroSuda/reword-cri-disable_cgroup 2023-09-30 01:22:56 +08:00
Derek McGowan
350a648581
Merge pull request #9164 from AkihiroSuda/fix-9163
cri: call RegisterReadiness after NewCRIService
2023-09-29 09:50:39 -07:00
Akihiro Suda
8ffb03d689
cri: stop recommending disable_cgroup
Disabling cgroup is no longer needed since cgroup v2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-09-29 23:08:00 +09:00
Akihiro Suda
5365f4b29e
cri: call RegisterReadiness after NewCRIService
`NewCRIService()` may easily fail and its error has to be ignored
unless the CRI plugin is in the `required_plugins` list.

Now this has to be called before `RegisterReadiness()`, as
PR 9153 "Require plugins to succeed after registering readiness"
was merged on 2023-09-29.

Fix issue 9163: `[Regression in main (2023-09-29)]: containerd-rootless.sh doesn't start up`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-09-29 23:06:36 +09:00
Derek McGowan
46645b393b
Call migrations per version
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-28 15:24:26 -07:00
Phil Estes
c5ce2a5f75
Merge pull request #9153 from dmcgowan/require-readiness-plugins
Require plugins to succeed after registering readiness
2023-09-28 11:23:45 -04:00
Maksym Pavlenko
e62cacc4d6
Merge pull request #9147 from bryantbiggs/docs/transfer-service
docs: Update `transfer` service docs to reflect completed implementations for `1.7`
2023-09-27 12:30:44 -07:00
Bjorn Neergaard
5518a50260
remotes: simplify mediatype logic
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:56 -06:00
Bjorn Neergaard
8b105984b5
pkg/transfer/local: simplify mediatype logic
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:55 -06:00
Bjorn Neergaard
79acce4621
integration: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:54 -06:00
Bjorn Neergaard
0ba5b4b62c
oci: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:52 -06:00
Bjorn Neergaard
cdba61603c
remotes: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:51 -06:00
Bjorn Neergaard
69034f7558
pkg/display: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:50 -06:00
Bjorn Neergaard
5ab04ac5a1
pkg/unpack: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:49 -06:00
Bjorn Neergaard
da11969793
pkg/snapshotters: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:48 -06:00
Bjorn Neergaard
f1cbc5f90c
containerd: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 13:12:47 -06:00
Akihiro Suda
9ca6fd9e6e
Merge pull request #9117 from kinvolk/rata/userns-chown-opt-in
Require opt-in for rootfs chown when idmap mounts is not supported
2023-09-28 02:34:41 +09:00
Akihiro Suda
719fa3d3f7
Merge pull request #9114 from thaJeztah/remove_libcontainer
remove github.com/opencontainers/runc dependency
2023-09-28 02:17:02 +09:00
Phil Estes
61a8905012
Merge pull request #9154 from neersighted/image_cleanup
images: use mediatype helpers
2023-09-27 12:33:29 -04:00
Sebastiaan van Stijn
4b1bb1293e
remove github.com/opencontainers/runc dependency
This migrates uses of github.com/opencontainers/runc/libcontainer/user
to the new github.com/moby/sys/user module, which was extracted from
runc at commit [opencontainers/runc@a3a0ec48c4].

This is the initial release of the module, which is a straight copy, but
some changes may be made in the next release (such as fixing camel-casing
in some fields and functions (Uid -> UID).

[opencontainers/runc@a3a0ec48c4]: a3a0ec48c4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 17:34:28 +02:00
Bjorn Neergaard
62f621a344
images: simplify mediatype logic
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:57 -06:00
Bjorn Neergaard
377c5ca9cd
images/archive: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:56 -06:00
Bjorn Neergaard
bb8a472f24
images: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:54 -06:00
Derek McGowan
e7254406c9
Require plugins to succeed after registering readiness
When readiness is registered on initialization, the plugin must not
fail. When such a plugin fails, containerd will hang on the readiness
condition.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 17:10:55 -07:00
Derek McGowan
62f273d508
Add migrate subcommand to config command
Allows applying migration to existing configurations

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 16:54:24 -07:00
Derek McGowan
0320ad1843
Add config migration to plugin package
Add reset registrations function to plugin package

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 16:53:35 -07:00
Derek McGowan
f58158e2d3
Add config migration and bump config version
Allows plugins to migrate from older configurations

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-26 16:53:33 -07:00
Akihiro Suda
9ffb34ac49
Merge pull request #9054 from macOScontainers/canonicalize-filter-mount-path
Fix usages of `mountinfo.PrefixFilter`
2023-09-27 05:10:27 +09:00
Bryant Biggs
bf4fbe4e87 docs: Update transfer service docs to reflect completed implementations for 1.7
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-09-26 12:31:19 -04:00
Phil Estes
bcd658c76c
Merge pull request #9146 from thaJeztah/nil_error
images: Config: explicitly return nil-error
2023-09-26 12:27:00 -04:00
Phil Estes
5444dae0d4
Merge pull request #9120 from dmcgowan/image-usage-test
Image usage test
2023-09-26 11:59:31 -04:00
Phil Estes
9fded7ca7d
Merge pull request #9143 from dmcgowan/plugin-config-unknown-fields
Add warning for plugin configs with unknown fields
2023-09-26 11:55:39 -04:00
Sebastiaan van Stijn
b40e95e0ea
images: Config: explicitly return nil-error
just a minor nit :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 13:20:41 +02:00
Derek McGowan
36c2222d3f
Add usage calculation test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-25 20:18:13 -07:00
Derek McGowan
3b60e93667
Create new imagetest package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-25 20:18:13 -07:00
Maksym Pavlenko
c33249cbe6
Merge pull request #9142 from jsturtevant/no-changes-wasm
Allow for images with artifacts layers to pull and run
2023-09-25 19:03:06 -07:00
Derek McGowan
4c344f2fa5
Add warning for plugin configs with unknown fields
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-25 16:09:15 -07:00
James Sturtevant
a9ba33f8ff Allow for images with artifacts to pull
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-09-25 22:10:19 +00:00
Phil Estes
0f3d312aca
Merge pull request #9131 from dmcgowan/toml-v2
Update go-toml to v2
2023-09-25 08:52:15 -04:00
Derek McGowan
650148313c
Add warning log for unknown config fields
Add error log for failure to parse toml

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-24 20:50:54 -07:00
Derek McGowan
f11033174e
Merge pull request #9129 from kinvolk/rata/userns-doc
docs/userns: Clarify requirements for k8s 1.25/1.26
2023-09-22 22:22:58 -07:00
Derek McGowan
b5615caf11
Update go-toml to v2
Updates host file parsing to use new v2 method rather than the removed
toml.Tree.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 15:35:12 -07:00
Derek McGowan
e0e6f870b7
Merge pull request #9086 from dmcgowan/move-to-log-repo
Use github.com/containerd/log
2023-09-22 09:25:29 -07:00
Derek McGowan
8b413daff0
Remove log package except for exported const used by hcsshim
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Derek McGowan
2f1b92710a
Update zfs library to use new log repository
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Derek McGowan
508aa3a1ef
Move to use github.com/containerd/log
Add github.com/containerd/log to go.mod

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Rodrigo Campos
f1070c4e18 docs/userns: Clarify requirements for k8s 1.25/1.26
crun 1.4.3 as well as runc 1.1 both support to open bind-mounts before
dropping privileges, as they are inaccessible after switching to the
user namespace. So that is the minimum version to use with containerd
1.7.

Also, since containerd 2.0 we use idmap mounts for files mounted in the
container created by containerd (like etc/hostname, etc/hosts, etc.), so
in that case we require newer OCI runtimes too. However, as the kubelet
doesn't request idmap mounts for kube volumes, we can lower the kernel
version.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-22 15:52:38 +02:00
Fu Wei
7a0e6b7e77
Merge pull request #9112 from adityaramani/handle-shim-kill
Sandbox: Handle unexpected shim kill events
2023-09-22 13:31:11 +08:00
Akihiro Suda
3ebe5d1c56
Merge pull request #9124 from dmcgowan/cri-image-store-no-client
Update CRI image store to not use containerd client
2023-09-21 19:17:21 +09:00
Davanum Srinivas
b101cad15c
Merge pull request #9126 from bryantbiggs/fix/add-containerd-namespace
fix: Add `containerd` to the message type reference
2023-09-20 22:51:43 -04:00
Samuel Karp
87671c2dee
Merge pull request #9122 from henry118/netns-doc 2023-09-20 16:25:15 -07:00
Bryant Biggs
42eee8bf05 fix: Add containerd to the message type reference
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-09-20 16:32:05 -04:00
Derek McGowan
c3694aaf87
Merge pull request #9093 from thaJeztah/swap_log_pkg_alias
alias log package to github.com/containerd/log v0.1.0, and (soft)deprecate
2023-09-20 11:45:59 -07:00
Derek McGowan
9e819fb4a8
Update CRI image store to not use containerd client
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-20 10:11:51 -07:00
Henry Wang
dcb2e7447b Improve doc of func NewNetNS
Signed-off-by: Henry Wang <henwang@amazon.com>
2023-09-20 17:00:33 +00:00
Fu Wei
782ad19f6c
Merge pull request #8356 from dmcgowan/drop-inheritable-capabilities
Support for dropping inheritable capabilities
2023-09-20 09:40:45 +08:00
Derek McGowan
2ce971d890
Add delete target to image remove
Adds atomicity to image delete when deleting from a list.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-19 17:23:33 -07:00
Derek McGowan
f8fb2dad39
api: update image service to support target in delete request
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-19 17:17:16 -07:00
Rodrigo Campos
8e3722c7d1 CI: Set slow_chown for overlayfs snapshotter
Userns requires idmap mounts or to opt-in for a slow and expensive
chown. As idmap mounts support for overlayfs was merged in 5.19, let's
add the slow_chown config for our CI.

The config is harmless to keep it in new kernels, as if idmap mounts is
supported, it will be just used. Whenever all our CI is run with kernels
>= 5.19, we can remove this setting.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 17:55:47 +02:00
Rodrigo Campos
46d3094aa3 docs/userns: Fix small typo
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
d008d64a8f docs/userns: Clarify containerd 1.7 limitations
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
e379082000 docs/userns: Document the need to opt-in for a slow chown
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 16:37:40 +02:00
Rodrigo Campos
8bf8e2b975 snapshotter: Use capa prefix consistently for capabilities
The overlay snapshotter is using capa, not capab, let's use that in all
the palces.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 14:42:51 +02:00
Rodrigo Campos
ec9e0dca91 overlay: Require opt-in if idmap mounts are not supported.
If we don't use idmap mounts, doing a chown per pod is very expensive:
it implies duplicating the container storage for the image for every pod
and the latency to start a new pod is affected too.

Let's make sure users are aware of this, by having them opt-in, for
snapshotters that we have a better solution (like overlayfs, that has
support for idmap mounts).

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-19 14:42:51 +02:00
Sebastiaan van Stijn
03b9ce56b5
deprecate logs package, but disable linter (for transitioning)
Deprecate the pacakge, but suppress linting errors for now. This is to allow
backporting these changes to release branches, which may still need to transition.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-19 08:44:35 +02:00
Sebastiaan van Stijn
d69ae811d6
alias log package to github.com/containerd/log v0.1.0
This "soft" deprecates the package, but keeps the local uses of the package,
which can make backporting this to release-branches easier (we can
still move all uses in those branches as well though).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-19 08:44:10 +02:00
Akihiro Suda
00666764b8
Merge pull request #9102 from dmcgowan/add-usage-package
Add usage package
2023-09-19 11:24:26 +09:00
Bjorn Neergaard
6c6dfcbce2
contrib/apparmor: deny /sys/devices/virtual/powercap
While this is not strictly necessary as the default OCI config masks this
path, it is possible that the user disabled path masking, passed their
own list, or is using a forked (or future) daemon version that has a
modified default config/allows changing the default config.

Add some defense-in-depth by also masking out this problematic hardware
device with the AppArmor LSM.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-18 16:57:09 -06:00
Bjorn Neergaard
106a9b7767
oci/spec: deny /sys/devices/virtual/powercap
The ability to read these files may offer a power-based sidechannel
attack against any workloads running on the same kernel.

This was originally [CVE-2020-8694][1], which was fixed in
[949dd0104c496fa7c14991a23c03c62e44637e71][2] by restricting read access
to root. However, since many containers run as root, this is not
sufficient for our use case.

While untrusted code should ideally never be run, we can add some
defense in depth here by masking out the device class by default.

[Other mechanisms][3] to access this hardware exist, but they should not
be accessible to a container due to other safeguards in the
kernel/container stack (e.g. capabilities, perf paranoia).

[1]: https://nvd.nist.gov/vuln/detail/CVE-2020-8694
[2]: 949dd0104c
[3]: https://web.eece.maine.edu/~vweaver/projects/rapl/

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-18 16:56:11 -06:00
Aditya Ramani
729c97cf39 Handle unexpected shim kill events
When a shim process is unexpectedly killed in a way that was not initiated through containerd - containerd reports the pod as not ready but the containers as running. This results in kubelet repeatedly sending container kill requests that fail since containerd cannot connect to the shim.

Changes:

- In the container exit handler, treat `err: Unavailable` as if the container has already exited out
- When attempting to get a connection to the shim, if the controller isn't available assume that the shim has been killed (needs to be done since we have a separate exit handler that cleans up the reference to the shim controller - before kubelet has the chance to call StopPodSandbox)

Signed-off-by: Aditya Ramani <a_ramani@apple.com>
2023-09-18 12:15:55 -07:00
Derek McGowan
ed5f7e7c8c
Update image in client to use new usage package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-18 11:20:07 -07:00
Derek McGowan
96a23ccc1d
Create new usage package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-18 11:19:22 -07:00
Phil Estes
82df7d5208
Merge pull request #9091 from thaJeztah/update_nri
vendor: github.com/containerd/nri v0.5.0
2023-09-18 10:17:06 -04:00
Akihiro Suda
a8d078cc9b
Merge pull request #9108 from BinSquare/remove-SourceDateEpochOrNow
Refactor: Removing inherently flaky and unused SourceDateEpochOrNow function.
2023-09-18 17:58:40 +09:00
BinBin He
79f781d009 Refactor: Removing inherently flaky and unused SourceDateEpochOrNow function.
Signed-off-by: BinBin He <BinSquare@users.noreply.github.com>
2023-09-17 08:34:26 -07:00
Sebastiaan van Stijn
8cbb4ea5d3
vendor: github.com/containerd/nri v0.5.0
This version no longer has a dependency on containerd, cutting
down the number of circular dependencies.

full diff: https://github.com/containerd/nri/compare/v0.4.0...v0.5.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-16 10:40:21 +02:00
Brennan Kinney
3ca39ef016 fix: Remove LimitNOFILE from containerd.service
Remove `LimitNOFILE` from `containerd.service` to rely on the systemd v240 implicit default of `1024:524288`. On supported platforms with systemd prior to v240, packagers will patch the service with an explicit `LimitNOFILE=1024:524288`.

- `1024` soft limit is an implicit default, avoiding unexpected breakage. Software that needs a higher limit should request to raise the soft limit for its process.
- `524288` hard limit is an implicit default since systemd v240 and is adequate for most processes (_half of the historical limit from `fs.nr_open` of `1048576`_), while 4096 is the implicit default from the kernel (often too low).
- The hard limit may not exceed `fs.nr_open` (_which a value of `infinity` will resolve to_). On most systems with systemd v240 or newer, this will resolve to an excessive size of 2^30 (over 1 billion).
- When set to `infinity` (usually as the soft limit) software may experience significantly increased resource usage, resulting in a performance regression or runtime failures that are difficult to troubleshoot.

Signed-off-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-09-15 09:04:53 +12:00
Derek McGowan
31b6cdfd10
Merge pull request #8493 from DataDog/image-verifier-bindir-plugin
Add image verifier transfer service plugin system based on a binary directory
2023-09-14 06:37:17 -07:00
Phil Estes
3f315fcabf
Merge pull request #9095 from thaJeztah/isolate_platform 2023-09-14 08:31:50 -04:00
Fu Wei
fe17f65159
Merge pull request #8287 from kinvolk/rata/userns-stateless-idmap
Add support for userns in stateless and stateful pods with idmap mounts (KEP-127, k8s >= 1.27)
2023-09-14 18:14:02 +08:00
Rodrigo Campos
83240a4f77 Bump crun to 1.9
crun 1.9 was just released with fixes and exposes idmap mounts support
via the "features" sub-command.

We use that feature to throw a clear error to users (if they request
idmap mounts and the OCI runtime doesn't support it), but also to skip
tests on CI when the OCI runtime doesn't support it.

Let's bump it so the CI runs the tests with crun.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-14 11:03:15 +02:00
Rodrigo Campos
967313049f doc: Add documentation about CRI user namespaces
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 23:37:47 +02:00
Phil Estes
a831db9d35
Merge pull request #9096 from AkihiroSuda/release-remove-extra-binaries
release: remove `cri-containerd-*.tar.gz` release bundles
2023-09-13 14:23:34 -04:00
Phil Estes
25198a0557
Merge pull request #8330 from vvoland/remotes-docker-status-exists-mounted
remotes/docker: Add Mounted and Exists push status
2023-09-13 13:14:39 -04:00
Rodrigo Campos
2e13d39546 pkg/process: Only use idmap mounts if runc supports it
runc, as mandated by the runtime-spec, ignores unknown fields in the
config.json. This is unfortunate for cases where we _must_ enable that
feature or fail.

For example, if we want to start a container with user namespaces and
volumes, using the uidMappings/gidMappings field is needed so the
UID/GIDs in the volume don't end up with garbage. However, if we don't
fail when runc will ignore these fields (because they are unknown to
runc), we will just start a container without using the mappings and the
UID/GIDs the container will persist to volumes the hostUID/GID, that can
change if the container is re-scheduled by Kubernetes.

This will end up in volumes having "garbage" and unmapped UIDs that the
container can no longer change. So, let's avoid this entirely by just
checking that runc supports idmap mounts if the container we are about
to create needs them.

Please note that the "runc features" subcommand is only run when we are
using idmap mounts. If idmap mounts are not used, the subcommand is not
run and therefore this should not affect containers that don't use idmap
mounts in any way.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Rodrigo Campos
fce1b95076 go.mod: Update runtime spec to include features.MountExtensions
Future patches will use that field.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Rodrigo Campos
a81f80884b Revert "cri: Throw an error if idmap mounts is requested"
This reverts commit 7e6ab84884.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Rodrigo Campos
e832605a80 integration: Simplify WithVolumeMount()
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Rodrigo Campos
24aa808fe2 integration: Add userns test with volumes
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Rodrigo Campos
ab5b43fe80 cri/sbserver: Pass down UID/GID mappings to OCI runtime
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:44:54 +02:00
Sebastiaan van Stijn
e916d77c81
platforms: move ToProto, FromProto to api/types
These utilities resulted in the platforms package to have the containerd
API as dependency. As this package is used in many parts of the code, as
well as external consumers, we should try to keep it light on dependencies,
with the potential to make it a standalone module.

These utilities were added in f3b7436b61,
which has not yet been included in a release, so skipping deprecation
and aliases for these.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-13 16:44:52 +02:00
Sebastiaan van Stijn
381442945b
platforms: remove errdefs dependency
This cleans up the platforms package from dependencies that are not strictly
needed. This is in preparation of making this package a separate module, which
can be shared by plugins, and containerd versions (as well as external consumers),

- Remove dependency on the errdefs package: most uses of these error
  definitions were used internally, and other errors may not be useful
  for external consumers as sentinel errors.
- ErrInvalidArgument may be a potential exception, although a look at
  current uses of this package shows that there's no special handling of
  invalid parameters vs other errors (all would boil down to "the passed
  platform is invalid" (either the format, or parsing is not implemented
  on a specific platform)
- Remove uses of the convenience "Platform" alias in favor of using the
  upstream (from OCI spec). Consumers of this package can still use the
  convenience alias, but make sure that function signatures do not imply
  that it's a different type (which can cause confusion).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-13 16:44:48 +02:00
Rodrigo Campos
e0b2b17de3 cri/server: Add tests for the linux-specific parts of VolumeMounts()
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:42:31 +02:00
Rodrigo Campos
10cb112e4a cri/server: Add tests for ContainerMounts()
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:42:31 +02:00
Rodrigo Campos
97dfa7f556 cri/server: Pass down uidMappings to OCI runtime
When the kubelet sends the uid/gid mappings for a mount, just pass them
down to the OCI runtime.

OCI runtimes support this since runc 1.2 and crun 1.8.1.

And whenever we add mounts (container mounts or image spec volumes) and
userns are requested by the kubelet, we use those mappings in the mounts
so the mounts are idmapped correctly. If no userns is used, we don't
send any mappings which just keeps the current behavior.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-09-13 16:42:31 +02:00
Phil Estes
0f52935a53
Merge pull request #9088 from samuelkarp/nri
vendor: update github.com/containerd/nri@v0.4.0
2023-09-13 10:26:02 -04:00
Akihiro Suda
b42bdd125d
release: remove cri-containerd-*.tar.gz release bundles
The `cri-containerd-*.tar.gz` release bundles have been deprecated
since containerd v1.6.

These bundles are no longer created in the CI, however, the
corresponding Makefile targets are still kept, as they are still used by
external CIs.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-09-13 23:22:32 +09:00
Samuel Karp
39804bc3f0
Merge pull request #8909 from liggitt/fieldmask 2023-09-13 00:33:44 -07:00
Samuel Karp
9656b8c0d0
nri: update mock plugin handlers
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-09-12 17:51:27 -07:00
Samuel Karp
6f9de91efc
vendor: update github.com/containerd/nri@v0.4.0
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-09-12 16:41:05 -07:00
Phil Estes
4f691faf61
Merge pull request #9022 from dmcgowan/gc-image-collectible
gc: add support for image expiration
2023-09-12 11:07:40 -04:00
Akihiro Suda
c07cadda3e
Merge pull request #9062 from dmcgowan/add-contributors-guide
Add contributors guide
2023-09-12 15:17:40 +09:00
Derek McGowan
bf1c1042e4
Merge pull request #9083 from thaJeztah/lease_withlabel
leases: add WithLabel
2023-09-11 16:06:11 -07:00
Sebastiaan van Stijn
f7089ba225
leases: add WithLabel
This adds a new WithLabel function, which allows to set a single label on
a lease, without having to first construct an intermediate map[string]string.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-11 21:03:40 +02:00
Sebastiaan van Stijn
1480e3bd4f
leases: cleanup TestWithLabels
- don't define a type, but just an ad-hoc struct
- use a single slice with test-cases; this allows IDE's to pick up the
  table as a test-table (which allows (re-)running individual tests)
- make use of testify's assert.Equal to compare the results, instead
  of a DIY loop over the expected values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-11 18:36:16 +02:00
Marat Radchenko
d94a789d15 Fix usages of mountinfo.PrefixFilter
It says: The prefix path **must be absolute, have all symlinks resolved, and cleaned**. But those requirements are violated in lots of places.

What happens when it is given a non-canonicalized path is that `mountinfo.GetMounts` will not find mounts.

The trivial case is:
```
$ mkdir a && ln -s a b && mkdir b/c b/d && mount --bind b/c b/d && cat /proc/mounts | grep -- '[ab]/d'
/dev/sdd3 /home/user/a/d ext4 rw,noatime,discard 0 0
```
We asked to bind-mount b/c to b/d, but ended up with mount in a/d.
So, mount table always contains canonicalized mount points, and it is an error to look for non-canonicalized paths in it.

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-09-10 15:14:26 +03:00
Fu Wei
d015c99b2e
Merge pull request #9060 from zhuangqh/polish-criu
task: expose criu work path opt
2023-09-09 16:35:04 +08:00
Fu Wei
40f8ce622b
Merge pull request #9072 from thaJeztah/update_golang_1.21.1
update to go1.21.1, go1.20.8
2023-09-09 12:41:14 +08:00
jerryzhuang
45e303eea5 task: expose criu work path opt
Signed-off-by: jerryzhuang <zhuangqhc@gmail.com>
2023-09-09 12:13:09 +08:00
Sam Edwards
f77185f9e8 Fix "even if IPv4 comes first" test to have IPv4 first
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
2023-09-08 21:46:10 -06:00
Sam Edwards
88a849626f Don't use To16() != nil to detect IPv6 addresses
The ip.To16() function returns non-nil if `ip` is any kind
of IP address, including IPv4. To look for IPv6 specifically,
use ip.To4() == nil.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
2023-09-08 21:44:49 -06:00
Sebastiaan van Stijn
eaf6071019
update to go1.21.1, go1.20.8
go1.21.1 (released 2023-09-06) includes four security fixes to the cmd/go,
crypto/tls, and html/template packages, as well as bug fixes to the compiler,
the go command, the linker, the runtime, and the context, crypto/tls,
encoding/gob, encoding/xml, go/types, net/http, os, and path/filepath packages.
See the Go 1.21.1 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.21.1+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.21.0...go1.21.1

From the security mailing:

[security] Go 1.21.1 and Go 1.20.8 are released

Hello gophers,

We have just released Go versions 1.21.1 and 1.20.8, minor point releases.

These minor releases include 4 security fixes following the security policy:

- cmd/go: go.mod toolchain directive allows arbitrary execution
  The go.mod toolchain directive, introduced in Go 1.21, could be leveraged to
  execute scripts and binaries relative to the root of the module when the "go"
  command was executed within the module. This applies to modules downloaded using
  the "go" command from the module proxy, as well as modules downloaded directly
  using VCS software.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2023-39320 and Go issue https://go.dev/issue/62198.

- html/template: improper handling of HTML-like comments within script contexts
  The html/template package did not properly handle HMTL-like "<!--" and "-->"
  comment tokens, nor hashbang "#!" comment tokens, in <script> contexts. This may
  cause the template parser to improperly interpret the contents of <script>
  contexts, causing actions to be improperly escaped. This could be leveraged to
  perform an XSS attack.

  Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for reporting this
  issue.

  This is CVE-2023-39318 and Go issue https://go.dev/issue/62196.

- html/template: improper handling of special tags within script contexts
  The html/template package did not apply the proper rules for handling occurrences
  of "<script", "<!--", and "</script" within JS literals in <script> contexts.
  This may cause the template parser to improperly consider script contexts to be
  terminated early, causing actions to be improperly escaped. This could be
  leveraged to perform an XSS attack.

  Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for reporting this
  issue.

  This is CVE-2023-39319 and Go issue https://go.dev/issue/62197.

- crypto/tls: panic when processing post-handshake message on QUIC connections
  Processing an incomplete post-handshake message for a QUIC connection caused a panic.

  Thanks to Marten Seemann for reporting this issue.

  This is CVE-2023-39321 and CVE-2023-39322 and Go issue https://go.dev/issue/62266.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-09 01:02:43 +02:00
Derek McGowan
210db9b101
Merge pull request #9067 from thaJeztah/update_cdi
vendor: github.com/cncf-tags/container-device-interface v0.6.1
2023-09-08 15:19:37 -07:00
Derek McGowan
1a7490c5a6
Add link to CONTRIBUTING from README
Replace link to BUILDING since CONTRIBUTING already points to it

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-08 11:18:14 -07:00
Derek McGowan
0413f12723
Add contributors guide
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-08 11:18:14 -07:00
Sebastiaan van Stijn
05093d7c07
vendor: github.com/cncf-tags/container-device-interface v0.6.1
Removes uses of the github.com/opencontainers/runc/libcontainer/devices
package.

full diff: https://github.com/cncf-tags/container-device-interface/compare/v0.6.0...v0.6.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-08 13:53:43 +02:00
Ethan Lowman
ac1d556b92
Add image verifier transfer service plugin system based on a binary directory
Signed-off-by: Ethan Lowman <ethan.lowman@datadoghq.com>
2023-09-07 18:45:02 -04:00
Jordan Liggitt
55b2df560f
go.mod: github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2023-09-07 16:53:10 -04:00
Jordan Liggitt
a00888db83
fix reference to canonical fieldmask type
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2023-09-07 16:53:02 -04:00
Maksym Pavlenko
c13f47a3ae
Merge pull request #9029 from dmcgowan/push-inherit-distribution-sources
push: inherit distribution sources from parent
2023-09-07 12:46:18 -07:00
Derek McGowan
74e205f1e7
Merge pull request #8792 from zhuangqh/fix/writer-deadlock
content: reduce the contention between ref lock and boltdb lock
2023-09-06 09:58:07 -07:00
Akihiro Suda
e44d9e1c4f
Merge pull request #9061 from AkihiroSuda/crun-1.8.7
CI: bump up crun to 1.8.7
2023-09-07 01:32:48 +09:00
Phil Estes
827a960303
Merge pull request #9050 from vernou/fix-windows-installation-script
fix(docs): fix on the windows installation script
2023-09-06 12:07:00 -04:00
Akihiro Suda
0041996ca0
CI: bump up crun to 1.8.7
https://github.com/containers/crun/compare/1.8.3...1.8.7

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-09-06 23:45:56 +09:00
VERNOU Cédric
4bc0b26602
Revert the removal of the parameter Container
Signed-off-by: VERNOU Cédric <1659796+vernou@users.noreply.github.com>
2023-09-06 14:56:21 +02:00
Akhil Mohan
6ec0d4a3ad
prevent ctr from creating tags with forbidden characters
check if the target tag that is to be created using ctr image tag
is valid and does not contain any forbidden characters.

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-09-06 15:47:52 +05:30
jerryzhuang
a4bdbf7844 content: reduce the contention between ref lock and boltdb lock
tryLock only once to reduce the amount of time the lock is held

Signed-off-by: jerryzhuang <zhuangqhc@gmail.com>
2023-09-05 23:34:13 +08:00
Fu Wei
5c37d3827b
Merge pull request #9055 from fuweid/fix-fuzz-issue
contrib/fuzz: fix redeclared issue
2023-09-05 23:03:57 +08:00
Derek McGowan
b11439fc4b
Merge pull request #9034 from thaJeztah/replace_reference
replace reference/docker for github.com/distribution/reference v0.5.0
2023-09-05 06:52:29 -07:00
Akihiro Suda
0ee2433c94
Merge pull request #5890 from artqzn/idmapped_mounts
RFC: Initial support of idmapped mount points
2023-09-05 20:41:05 +09:00
Wei Fu
abfabb6d82 contrib/fuzz: fix redeclared issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-05 19:04:19 +08:00
Akihiro Suda
e30a40eb65
Merge pull request #9016 from djdongjin/remove-most-logrus
Remove most logrus import
2023-09-05 16:09:12 +09:00
Ilya Hanov
295bcec074 snapshotter: implement unit tests for idmapped mounts for overlay
Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
Ilya Hanov
9d01ed1c32 integration: add test for idmapped mounts
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
Ilya Hanov
e49e6d6fd7 snapshotter: implement slow path for idmapped mounts check for overlay
Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
Ilya Hanov
1555a31bf6 mount: support idmapped mount points
This patch introduces idmapped mounts support for
container rootfs.

The idmapped mounts support was merged in Linux kernel 5.12
torvalds/linux@7d6beb7.
This functionality allows to address chown overhead for containers that
use user namespace.

The changes are based on experimental patchset published by
Mauricio Vásquez #4734.
Current version reiplements support of idmapped mounts using Golang.

Performance measurement results:
Image           idmapped mount  recursive chown
BusyBox         00.135          04.964
Ubuntu          00.171          15.713
Fedora          00.143          38.799

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Signed-off-by: Artem Kuzin <artem.kuzin@huawei.com>
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
Ilya Hanov
723c88ce30 snapshotter: add "--remap-labels" support to overlayfs
Previously the only fuse-overlayfs supports "--remap-labels" option.
Since idmapped mounts were landed to Linux kernel v5.12 it becomes
possible to use it with overlayfs via mount_setattr() system call.

The changes are based on experimental patchset published by
Mauricio Vásquez #4734.

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
Signed-off-by: Artem Kuzin <artem.kuzin@huawei.com>
Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
Ilya Hanov
e8ddf669f5 snapshotter: support "remap-ids" capability for overlayfs
Previously remapping of a snapshotter has been done using
recursive chown.

Commit
31a6449734 added a support
for "remap-ids" capability which allows snapshotter internals do
remappings in case of idmapped mounts support to avoid recursive
chown and creating a new remapped snapshot.

Signed-off-by: Ilya Hanov <ilya.hanov@huawei-partners.com>
2023-09-05 01:23:30 +03:00
Derek McGowan
817391989f
Merge pull request #9044 from thaJeztah/update_uuid
vendor: github.com/google/uuid v1.3.1
2023-09-04 14:30:46 -07:00
VERNOU Cédric
ef6b91947e
fix(docs): fix on the windows installation script
Modify the parameter `-Path` to reference a folder, so `Copy-Item` create the destination folder.
Remove "-Container:$false" that flatten the hierarchy folder.

Signed-off-by: VERNOU Cédric <1659796+vernou@users.noreply.github.com>
2023-09-02 13:19:50 +02:00
Fu Wei
e2bf34feaf
Merge pull request #9033 from dcantah/sberror-include-id
CRI: Include sandbox ID in failed to recover error
2023-09-02 10:48:34 +08:00
Akihiro Suda
74705ae4f4
Merge pull request #9045 from thaJeztah/less_libcontainer
remove uses of github.com/runc/libcontainer/cgroups
2023-09-02 07:56:41 +09:00
Akihiro Suda
5a6c32da38
Merge pull request #9041 from fuweid/enable-fuzz-build
.github: enable fuzz build
2023-09-02 07:47:32 +09:00
Phil Estes
6f2855ef0f
Merge pull request #9036 from kiashok/updateRunhcsVersion 2023-09-01 14:00:28 -04:00
Derek McGowan
dc8b0d80b9
Merge pull request #9042 from dcantah/darwin-blockfile-copyfile
Blockfile: Enlighten blockfile copy on Darwin
2023-09-01 07:18:44 -07:00
Sebastiaan van Stijn
5d31e93787
pkg/systemd: use sync.Once for systemd detection
This brings over the enhancement from a506630e57.

We don't expect the systemd state to change while containerd is running,
so we can use a `sync.Once` for this, to prevent stat'ing each time.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-01 12:14:56 +02:00
Sebastiaan van Stijn
7d0ab4fc2c
remove uses of github.com/runc/libcontainer/cgroups
runc considers libcontainer to be "unstable" (not for external use),
so we try not to use it. Commit ed47d6ba76
brought back the dependency on other parts of libcontainer, but looks to
be only depending on a single utility, which in itself was borrowed from
github.com/coreos/go-systemd to not introduce CGO code in the same package.

This patch copies the version from github.com/coreos/go-systemd (adding
proper attribution, although the function is pretty trivial).

runc is in process of moving the libcontainer/user package to an external
module, which means we can remove the dependency on libcontainer entirely
in the near future. There is one more use of `libcontainer` in our vendor
tree; it looks like CDI is depending on one utility (devices.DeviceFromPath);
a943033a8b/vendor/github.com/container-orchestrated-devices/container-device-interface/pkg/cdi/container-edits_unix.go (L38)

We should remove the dependency on that utility, and add a CI check to
prevent bringing it back.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-01 12:10:55 +02:00
Sebastiaan van Stijn
9bc6441c21
vendor: github.com/google/uuid v1.3.1
Contains some performance improvements:

full diff: https://github.com/google/uuid/compare/v1.3.0...v1.3.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-01 11:49:50 +02:00
Danny Canter
13ff185ba0 Blockfile: Enlighten blockfile copy on Darwin
The Go stdlib does not seem to have an efficient os.File.ReadFrom
routine for other platforms like it does on Linux with
copy_file_range. For Darwin at least we can use clonefile
in its place, otherwise if we have a sparse file we'd have
a fun surprise with the io.Copy approach..

We should see if there's other platforms that we can enhance here.
I've forgotten what's the right route on Windows.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-31 20:18:48 -07:00
Wei Fu
a3e8503ed2 .github: enable fuzz build
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-01 10:36:54 +08:00
Kazuyoshi Kato
a943033a8b
Merge pull request #9013 from fish98/main
fuzzing: fix ossfuzz building error
2023-08-31 16:10:43 -07:00
Kazuyoshi Kato
a617005750
Merge pull request #9028 from hinshun/fix/import-unpack-wait
Add missing unpacker.Wait for image import
2023-08-31 16:09:42 -07:00
Derek McGowan
cd705af89b
metadata: add image delete events during garbage collection
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 15:10:13 -07:00
Derek McGowan
3f9756c184
gc: add support for image expiration
Update the garbage collector to support image expiration along with
support for image leasing. This allows making images collectible during
garbage collection and using a lease to prevent removal of an image.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 15:10:13 -07:00
Derek McGowan
b32638e21b
ctr: pull or fetch image metadata by default
The metadata is small and useful for viewing all platforms
for an image and enabling push back to the same registry.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:07:52 -07:00
Derek McGowan
20f79300cf
push: inherit distribution sources from parent
When a blob does not exist locally, rather than erroring on info
lookup, inherit the parent distribution sources. Push is able
to succeed even if the blob does not exist locally when a cross
repository mount is done. This is a common operation pushing a
multi-platform image to the same registry but different namespace.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:07:51 -07:00
Derek McGowan
24aca53fa0
Update use of content.Infoprovider
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:04:33 -07:00
Derek McGowan
f8c789f319
content: add InfoProvider interface
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-31 11:04:32 -07:00
Kirtana Ashok
02d519ad64 Update hcsshim tag in runhcs-version script
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-31 10:07:14 -07:00
Danny Canter
a2817ca16d CRI: Include sandbox ID in failed to load error
The failed to recover state message didn't include the ID making this
not as useful as it could be..

This additionally moves some of the other logs to include the id for
the sandbox/container as a field instead of part of a format string.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-31 10:07:07 -07:00
Derek McGowan
b2f46463b5
Merge pull request #9031 from thaJeztah/revert_log_var
Revert "log: define G() as a function instead of a variable"
2023-08-31 06:55:41 -07:00
Sebastiaan van Stijn
4923470902
replace reference/docker for github.com/distribution/reference v0.5.0
The reference/docker package was a fork of github.com/distribution/distribution,
which could not easily be used as a direct dependency, as it brought many other
dependencies with it.

The "reference' package has now moved to a separate repository, which means
we can replace the local fork, and use the upstream implementation again.

The new module was extracted from the distribution repository at commit:
b9b19409cf

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-31 15:54:50 +02:00
TTFISH
26dcae2f6b fix ossfuzz building error
Signed-off-by: TTFISH <jiongchiyu@gmail.com>
2023-08-31 20:07:05 +08:00
Derek McGowan
f9608c0027
Merge pull request #9030 from kiashok/updateShimTag-main
Update hcsshim tag to v0.12.0-rc.0
2023-08-30 16:13:15 -07:00
Sebastiaan van Stijn
19d6c37a3f
Revert "log: define G() as a function instead of a variable"
This reverts commit 778ac302b2.

(slightly modified, due to changes that were merged after that).

The reverted commit had two elements;

- Make `G` an actual function to improve the documentation
- Prevent `G` from being overwritten externally

From the commit that's reverted:

> The `G` variable is exported, and not expected to be overwritten
> externally. Defining it as a function also documents it as a function
> on https://pkg.go.dev, instead of a variable; https://pkg.go.dev/github.com/containerd/containerd@v1.6.22/log#pkg-variables

While it's unclear if the ability to replace the implementation was
_intentional_, it's this part that some external consumers were (ab)using.

We should look into that part in a follow-up, and design for this, for
example by providing a utility to replace the logger, and properly document
that.

In the meantime, let's revert the change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-30 21:46:21 +02:00
Kirtana Ashok
fd5d92a7f5 Update hcsshim tag versioning to v0.12.0-rc.0
hcsshim tags v0.10.* is deprecated, so using the new
v0.12.0-rc.* versioning for hcsshim tags on containerd/main

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-29 17:41:20 -07:00
Edgar Lee
779875a057 Add missing unpacker.Wait for image import
- For remote snapshotters, the unpack phase serves as an important step for
  preparing the remote snapshot. With the missing unpacker.Wait, the
  snapshotter `Prepare` context is always canceled.
- This patch allows remote snapshotter based archives to be imported via
  the transfer service or `ctr image import`

Signed-off-by: Edgar Lee <edgarhinshunlee@gmail.com>
2023-08-29 15:34:20 -07:00
Samuel Karp
b0a7f08aa7
Merge pull request #9021 from akhilerm/make-configurable-dependencies
make repositories of install dependencies configurable
2023-08-28 23:55:48 -07:00
Samuel Karp
cb532a87ef
Merge pull request #9019 from dcantah/hcsshim-version
Windows: Supply windows shim version via file
2023-08-28 23:48:32 -07:00
Derek McGowan
4f5db2bc03
metadata: format unit test output
Make it easier to see list differences in gc node test failure output.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-28 16:52:25 -07:00
Danny Canter
15b13fb3ea Windows: Supply windows shim version via file
Somewhat similar to how we supply the version of runc to grab for testing via
a file in script/, this change supplies the Windows shim version to build off
of via a file in the same directory. This seems like a decent home given it now
lives next to the script that pulls and builds the shim to include in our build
artifacts/locally.

The motivation behind this change is:

Cut down on unneccessary hcsshim vendorings if no library code for containerd
changed. It was some what clunky how the Windows builds work today. The Windows
shim is developed out of tree at github.com/microsoft/hcsshim. To let containerd know
what tag to build the shim off of we'd vendor hcsshim into containerd, and then
parse the version string from go.mod, fetch this tag, and then build the shim and
include it in our artifacts. As mentioned, often times the vendoring would bring in
no actual changes that would affect containerd's usage of hcsshim as a library, and
would just serve as a means to bump the version of the containerd shim we should build.

Now this process can be a one line change and we can avoid the possible headaches that come
with bumping go.mod (bumping other unrelated deps etc.)

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-28 11:55:55 -07:00
Derek McGowan
c0111909a7
Merge pull request #9009 from dcantah/block-file-recreate
Blockfile: Expose RecreateScratch option
2023-08-28 11:53:56 -07:00
Derek McGowan
2a806c710a
Merge pull request #9017 from Juneezee/refactor/redundant-nil-check
Remove redundant nil check
2023-08-28 06:55:10 -07:00
Akhil Mohan
7a0ad09a0d
make repositories of install dependencies configurable
make repositories of dependencies like runc, crun, cni and critools configurable

Signed-off-by: Akhil Mohan <makhil@vmware.com>
2023-08-28 18:43:41 +05:30
Eng Zer Jun
34def8b33b
Remove redundant nil check
From the Go docs:

  "For a nil slice, the number of iterations is 0." [1]

Both `info.RootFS` and `host.clientPairs` are slices. Therefore, an
additional nil check for before the loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-08-27 17:56:27 +08:00
Jin Dong
fc45365fa1 Remove most logrus
Signed-off-by: Jin Dong <jin.dong@databricks.com>
2023-08-26 14:31:53 -04:00
Derek McGowan
03e4f1e363
Merge pull request #9006 from bart0sh/PR010-update-LTS-doc
Update LTS description
2023-08-25 10:22:18 -07:00
Maksym Pavlenko
871a94a465
Merge pull request #8565 from samuelkarp/ctr-override-mounts
ctr: allow run to override mounts
2023-08-25 10:01:11 -07:00
Enrico Weigelt, metux IT consult
f9c35feb30 Makefile: allow overriding GO_BUILD_FLAGS via environment
Allow overriding GO_BUILD_FLAGS via environment, do distros can easily
inject additionally required build flags (eg. -buildvcs=false).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-25 16:26:13 +02:00
Phil Estes
adbc13c3e2
Merge pull request #9011 from AkihiroSuda/continuity-v0.4.2
go.mod: github.com/containerd/continuity v0.4.2
2023-08-25 09:25:55 -04:00
Akihiro Suda
490905be6f
go.mod: github.com/containerd/continuity v0.4.2
https://github.com/containerd/continuity/compare/1e0d26eb2381...v0.4.2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-25 16:39:55 +09:00
Ed Bartosh
03abceac56 Update LTS description
Explicitly mentioned a possibility to take feature backports
to support new Kubernetes releases.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2023-08-25 10:33:32 +03:00
Danny Canter
34f32043bc Blockfile: Expose RecreateScratch option
This was the only option not configurable from the toml for the plugin.
This is useful if you want to restart containerd and try a different
blockfile/size for the snapshotter.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-24 13:28:22 -07:00
Derek McGowan
db5fc4ab45
Merge pull request #9008 from mxpv/stale
Add stale bot
2023-08-24 13:21:59 -07:00
Phil Estes
ba56b1fb3b
Merge pull request #9007 from champtar/critools-1.28.0
Update critools to 1.28.0
2023-08-24 15:56:53 -04:00
Maksym Pavlenko
b4f487ce9d
Apply suggestions from code review
Co-authored-by: Samuel Karp <me@samuelkarp.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-24 09:56:17 -07:00
Maksym Pavlenko
1e3540e110 Add stale bot
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-24 09:28:40 -07:00
Etienne Champetier
4e236962fe Update critools to 1.28.0
https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.28.0

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2023-08-24 11:15:24 -04:00
Akihiro Suda
f48bbef193
Merge pull request #8994 from mxpv/cri
Use sandboxed CRI by default
2023-08-24 13:42:58 +09:00
Phil Estes
8e7a25856b
Merge pull request #8998 from dmcgowan/image-inspect
ctr: images inspect
2023-08-23 14:12:56 -04:00
Phil Estes
1ffe80c7f6
Merge pull request #8730 from thaJeztah/sprint_less
replace some fmt.Sprintfs with strconv
2023-08-23 12:02:09 -04:00
Maksym Pavlenko
c92f4a160e
Update RELEASES
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-23 08:50:42 -07:00
Maksym Pavlenko
c3f3cad287
Use sandboxed CRI by default
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-23 08:50:40 -07:00
Maksym Pavlenko
e7dee269d6
Merge pull request #8960 from dcantah/sandbox-annotations
Sandbox: Add annotations to CreateSandbox surface
2023-08-23 08:42:46 -07:00
Sebastiaan van Stijn
b76cd4d9fd
replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 16:43:02 +02:00
Derek McGowan
bbdbf7ab6c
Add inspect image commands
Outputs the image structure as a tree with an option to show content
and related labels for the image.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-23 06:52:35 -07:00
Derek McGowan
78308b4a44
Add manifest printer library
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-08-23 06:52:35 -07:00
Sebastiaan van Stijn
11a5dd8265
snapshots: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:59 +02:00
Sebastiaan van Stijn
06765c9ef5
oci: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:59 +02:00
Sebastiaan van Stijn
710d22366d
removes/docker: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:59 +02:00
Sebastiaan van Stijn
d7bc8694be
pkg/cri: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-23 10:10:56 +02:00
Fu Wei
738c153573
Merge pull request #8992 from djdongjin/remove-hashicorp-multierror
Remove hashicorp/go-multierror dependency
2023-08-23 13:13:51 +08:00
Maksym Pavlenko
36dcc294ee
Merge pull request #8995 from yankay/append-k8s-1.28-to-releases
Append k8s 1.28 to RELEASES.md
2023-08-22 19:23:46 -07:00
Derek McGowan
55c877297a
Merge pull request #8556 from Wang99998/main
Update default platform matcher when ctr import
2023-08-22 16:53:42 -07:00
Derek McGowan
1aa710d0fc
Merge pull request #8694 from yankay/fix-push-image-rate
Fix ctr push image can't show right rate
2023-08-22 16:39:35 -07:00
Derek McGowan
2bac6ffb79
Merge pull request #8663 from helen-frank/feature/MergeSortedStringSlices
MergeStringSlices use sets
2023-08-22 16:31:28 -07:00
Derek McGowan
7f029af018
Merge pull request #8938 from akhramov/freebsd/fix-tar-headers-2
archive/tarheader: fix FreeBSD hdr for regular files
2023-08-22 16:25:50 -07:00
Phil Estes
de066a37dc
Merge pull request #8935 from lengrongfu/feat/add-metrics-for-dropped-events
add metrics for discarding events
2023-08-22 09:09:31 -04:00
Kay Yan
73e9cfd1ce append k8s 1.28 to releases
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2023-08-22 10:52:00 +00:00
Fu Wei
f9dec2aeae
Merge pull request #8569 from fuweid/add-dmesg-for-unit-test
.github/workflows: add dmesg step for integration-linux
2023-08-22 18:36:29 +08:00
Fu Wei
3ffde050a4
Merge pull request #8988 from kinvolk/rata/userns-fix-platform
cri: Fix sandbox_mode "shim"
2023-08-22 16:40:34 +08:00
Jin Dong
6d8329d7f5 Remove unnecessary joinError unwrap
Signed-off-by: Jin Dong <jin.dong@databricks.com>
2023-08-21 19:03:41 -07:00
Derek McGowan
fb786b2f17
Merge pull request #8945 from pdtpartners/feature/make-overlay-snapshotter-embeddable
Add WithMetaStore to overlay snapshotter to allow bringing your own
2023-08-21 15:47:15 -07:00
Derek McGowan
b8f32e863c
Merge pull request #8951 from kiashok/exposeCommitMemWindows
Populate commit memory for windows memory usage stats
2023-08-21 15:42:34 -07:00
Derek McGowan
3ba8964e22
Merge pull request #8889 from wic006/wic006/update-rfc-link
archive/compression: update out of date RFC draft link
2023-08-21 15:15:18 -07:00
Derek McGowan
bc15df7231
Merge pull request #8894 from thaJeztah/log_improve
log: cleanups and improvements to decouple more from logrus
2023-08-21 15:08:18 -07:00
Maksym Pavlenko
90b8e6b711
Merge pull request #8915 from oss-qm/submit/bindir
Makefile: allow overriding the binary executable target dir
2023-08-21 11:38:20 -07:00
Maksym Pavlenko
579b257472
Merge pull request #8990 from jsturtevant/bump-go-fuzz
Remove temporary replace for fuzzer library
2023-08-21 10:55:07 -07:00
James Sturtevant
8399a4ee71 Remove temporary replace
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-08-21 16:29:18 +00:00
Derek McGowan
df1ddc46b0
Merge pull request #8991 from dcantah/remote-differ-docs
Docs: Document proxy plugins diff support
2023-08-21 09:27:56 -07:00
Derek McGowan
740097573a
Merge pull request #8993 from estesp/update-releases
Update to latest releases in RELEASES.md
2023-08-21 09:16:45 -07:00
Phil Estes
7ad0a6ccfa
Update to latest releases in RELEASES.md
Since a recent contributor edited the synced version of this in the website (containerd.io) repo, we should just update the main repo and let the auto-sync PR get these 2 files back in sync with the latest releases.

Signed-off-by: Phil Estes <estesp@amazon.com>
2023-08-21 09:19:34 -04:00
Jin Dong
cd8c8ae4bc Remove hashicorp/go-multierror
Signed-off-by: Jin Dong <jin.dong@databricks.com>
2023-08-20 17:59:45 -07:00
Phil Estes
89553637a7
Merge pull request #8936 from oss-qm/submit/install-doc
Makefile: add rule for installing documentation
2023-08-19 18:47:00 -04:00
Phil Estes
7c850bac2e
Merge pull request #8974 from oss-qm/submit/metrics_unused_retval
ctr: metrics: drop unused retval from printWindowsStats()
2023-08-19 18:45:19 -04:00
Enrico Weigelt, metux IT consult
1571a5aa07 ctr: metrics: drop unused retval from printWindowsStats()
The error return value is always nil, so we don't need it at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-19 15:33:40 +02:00
Enrico Weigelt, metux IT consult
7063ae1f6c Makefile: add rule for installing documentation
Distros usually like to install docs, so add a rule for that, so
dist maintainers don't need to care about the details.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-19 15:32:29 +02:00
Danny Canter
de4c338ab5 Docs: Document proxy plugin diff support
Document that differs can be proxy plugins now.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-18 17:55:54 -07:00
Derek McGowan
465c04c289
Merge pull request #8946 from lengrongfu/feat/bump-client-go
bump client-go v0.26.4
2023-08-18 16:35:24 -07:00
Akihiro Suda
4033add994
Merge pull request #8957 from AkihiroSuda/go-1.21
Go 1.21.0
2023-08-19 02:51:58 +09:00
Kazuyoshi Kato
3c8981a365
Merge pull request #8913 from oss-qm/submit/optional-systemd
cmd: containerd: allow building w/o systemd notify
2023-08-18 10:26:46 -07:00
Kazuyoshi Kato
bb1c855e62
Merge pull request #8964 from akhramov/feature/specify-default-freebsd-runtime
FreeBSD: set default runtime
2023-08-18 10:23:13 -07:00
Kazuyoshi Kato
742762b391
Merge pull request #8975 from oss-qm/submit/cri_unused_retvals
cri: spec_linux: drop unused retvals
2023-08-18 10:21:54 -07:00
Rodrigo Campos
d09f7cbe00 cri: Fix sandbox_mode "shim"
This is a partial revert of "cri/sbserver: Use platform instead of GOOS
for userns detection".

While what that commit did is 100% the right thing to do, when the
sandbox_mode is "shim" all controller.XXX() calls are RPCs and the
controller.Create() call initializes the controller. Therefore, things
like "getSandboxController()" don't work in the case of "shim"
sandbox_mode until after the controller.Create().

Due to this asymmetry and the lack of tests for shim mode, we didn't
catch it before.

This patch just reverts that commit so that the Create() and
getSandboxController() calls remain where they were, and just relies on
the config Linux section as a hack to detect if the pod sandbox will use
user namespaces or not.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-08-18 15:13:10 +02:00
Enrico Weigelt, metux IT consult
60b2cb143f cmd: containerd: allow building w/o systemd notify
Make the rather obscure systemd notification build-time optional by
setting 'no_systemd' tag and so skip dependencies on around 9kLoC
vendor code.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-18 13:24:08 +02:00
Fu Wei
0f5dea3cc0
Merge pull request #8734 from djdongjin/content-copy-dedup
Simplify `content.Copy` logic
2023-08-18 11:05:27 +08:00
Robbie Buxton
23c95359aa Add WithMetaStore to overlay snapshotter to allow bringing your own
Signed-off-by: Robbie Buxton <138501839+rbpdt@users.noreply.github.com>
2023-08-17 19:28:44 +01:00
Enrico Weigelt, metux IT consult
0c1ad52eac cri: spec_linux: drop unused retvals
cgroupv1HasHugetlb() and cgroupv2HasHugetlb() may return errors, but nobody
(there's just one call site anyways) ever cares. So drop the unnecessary code.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-17 18:52:37 +02:00
Samuel Karp
3b32d3c6f2
Merge pull request #8922 from lengrongfu/feat/sync-image-action
feat: replace mcr.microsoft.com registry to ghcr.io/containerd registry
2023-08-17 00:59:46 -07:00
Akihiro Suda
eacd74c2b0
Go 1.21.0
https://go.dev/doc/go1.21

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-17 16:54:01 +09:00
Akihiro Suda
5756cb00e7
CI: increase timeout for Binaries
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-17 16:54:01 +09:00
Nashwan Azhari
c883410c96
CI: Explicitly upgrade MinGW on Windows 2019 GitHub runners.
The default version of MinGW and GCC on the GitHub-hosted Windows 2019
runners compile fine but lead to linker errors during runtime.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2023-08-17 16:52:51 +09:00
Akihiro Suda
0f043ae434
seccomp, apparmor: add go:noinline
Tests in pkg/cri/[sb]server/container_create_linux_test.go depends on go:noinline
since Go 1.21.

e.g.,
> ```
> === FAIL: pkg/cri/sbserver TestGenerateSeccompSecurityProfileSpecOpts/should_set_default_seccomp_when_seccomp_is_runtime/default (0.00s)
>     container_create_linux_test.go:1013:
>         	Error Trace:	/home/runner/work/containerd/containerd/pkg/cri/sbserver/container_create_linux_test.go:1013
>         	Error:      	Not equal:
>         	            	expected: 0x263d880
>         	            	actual  : 0x263cbc0
>         	Test:       	TestGenerateSeccompSecurityProfileSpecOpts/should_set_default_seccomp_when_seccomp_is_runtime/default
> ```

See comments in PR 8957.

Thanks to Wei Fu for analyzing this.

Co-authored-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-17 16:52:51 +09:00
Akihiro Suda
5d9bf7d139
CI: temporarily disable ci_fuzz due to incompatibility with recent Go
> github.com/containerd/containerd/contrib/apparmor
> github.com/containerd/containerd/contrib/apparmor
> Running go-fuzz -tags gofuzz -func FuzzLoadDefaultProfile -o fuzz_FuzzLoadDefaultProfile.a github.com/containerd/containerd/contrib/apparmor
> /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
> fuzz_FuzzLoadDefaultProfile.a(000021.o): in function `_cgo_9c8efe9babca_C2func_res_search':
> cgo_unix_cgo_res.cgo2.c:(.text+0x32): undefined reference to `__res_search'
> /usr/bin/ld: fuzz_FuzzLoadDefaultProfile.a(000021.o): in function `_cgo_9c8efe9babca_Cfunc_res_search':
> cgo_unix_cgo_res.cgo2.c:(.text+0x81): undefined reference to `__res_search'
> clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
> 2023-08-11 14:25:45,433 - root - ERROR - Building fuzzers failed.
> 2023-08-11 14:25:45,433 - root - ERROR - Error building fuzzers for (commit: 432d86b87f75cc8ddf8f8101a5540eb206ffc894, pr_ref: refs/pull/8957/merge).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-17 16:52:48 +09:00
Fu Wei
ba852faf41
Merge pull request #8954 from fuweid/fix-shim-leak 2023-08-17 08:16:20 +08:00
Fu Wei
a3c68d161f
Merge pull request #8778 from kiashok/stableABI_WindowsMatcher
Invoke stable ABI compliant platform check in windows matcher
2023-08-16 19:14:22 +08:00
Kirtana Ashok
e2ce4f58f6 Populate commit memory for windows memory usage stats
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-15 16:48:22 -07:00
Kirtana Ashok
823e0420eb Fix transfer service dependencies:
- Fill OSVersion field of ocispec.Platform for windows OS in
transfer service plugin init()
- Do not return error from transfer service ReceiveStream if
stream.Recv() returned context.Canceled error

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-15 15:32:51 -07:00
Kirtana Ashok
cfb30a31a8 Invoke Stable ABI compatibility function in windows platform matcher
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-15 12:52:11 -07:00
Artem Khramov
0cea317a52
FreeBSD: set default runtime
@samuelkarp's https://github.com/samuelkarp/runj is a de facto default
FreeBSD runtime.

This change creates a set of defaults for FreeBSD setting
`wtf.sbk.runj.v1` as the default runtime.

Signed-off-by: Artem Khramov <akhramov@pm.me>
2023-08-14 22:44:21 +03:00
Fu Wei
36b871955c
Merge pull request #8930 from AkihiroSuda/rocky8.8 2023-08-14 20:44:20 +08:00
Akihiro Suda
5e051f5c6c
Merge pull request #8955 from AkihiroSuda/runc-1.1.9
update runc to v1.1.9
2023-08-14 20:30:23 +09:00
Danny Canter
def5ff3c4b Sandbox: Add annotations to controller CreateOptions
Following the addition of annotations to the grpc/ttrpc API surface,
follow suit with adding annotations to the controller api surface.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-12 01:39:31 -07:00
Danny Canter
939ccbed42 Sandbox: Add annotations to CreateSandbox surface
An oft employed scheme for a lot of our APIs is to include an
annotations field which is just a map of string to string. This
usually allows folks using the API to send over metadata or auxiliary
information without needing to get a new field added (especially where
the field might not make sense for it to be a standalone field). I think
having annotations for CreateSandbox make sense for this same use case.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-12 01:39:29 -07:00
Artem Khramov
1fd3a46526
archive/tarheader: fix FreeBSD hdr for regular files
This update addresses an issue where the stat call on FreeBSD could
return -1 for regular files. This led to incorrect Devmajor and
Devminor values, which should be zero in such cases. Refer to the
discussion on this bug in the following PR:
https://github.com/containerd/containerd/pull/5991.

The code change now handles this scenario appropriately.

Signed-off-by: Artem Khramov <akhramov@pm.me>
2023-08-11 23:50:08 +03:00
Akihiro Suda
f8edd5555f
update runc binary to v1.1.9
https://github.com/opencontainers/runc/releases/tag/v1.1.9

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-11 21:25:56 +09:00
Akihiro Suda
f35d1f08ec
go.mod: github.com/opencontainers/runc v1.1.9
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-11 21:25:29 +09:00
Wei Fu
00ef8ba99b Vagrantfile: add strace tool
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-11 18:22:44 +08:00
Wei Fu
601699a184 integration: add ShouldRetryShutdown case based on #7496
Since the moby/moby can't handle duplicate exit event well, it's hard
for containerd to retry shutdown if there is error, like context
canceled.

In order to prevent from regression like #4769, I add skipped
integration case as TODO item and we should rethink about how to handle
the task/shim lifecycle.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-11 17:43:51 +08:00
Wei Fu
8dcb2a6e6d pkg/cri/sbserver: fix leaked shim issue for podsandbox mode
Fixes: #7496 #8931

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-11 17:43:51 +08:00
Wei Fu
72bc63d83d pkg/cri/server: fix leaked shim issue
Fixes: #7496 #8931

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-11 17:43:51 +08:00
Wei Fu
5bdd9ca938 integration: add case to reproduce #7496
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-11 17:41:04 +08:00
rongfu.leng
b451fa96a6 bump client-go v0.26.4
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-08-11 00:30:03 +08:00
Akihiro Suda
70a2c95ae8
Merge pull request #8940 from kiashok/updateShimTag-main
Update hcsshim tag to v0.10.0
2023-08-10 10:38:25 +09:00
Kirtana Ashok
a645ff2e68 Update dependencies after protobuf update in hcsshim
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
(cherry picked from commit d129b6f890bceb56b050bbb23ad330bb5699f78c)
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-09 11:56:45 -07:00
Kirtana Ashok
e7e5619fed Update hcsshim tag to v0.10.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-08-09 11:55:54 -07:00
rongfu.leng
54baf766e5 add metrics for discarding events
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-08-09 09:56:26 +08:00
root
189a1599c0 archive/compression: update out of date RFC draft link
Signed-off-by: William Chen <willchen.005@gmail.com>
2023-08-08 13:08:02 -07:00
Enrico Weigelt, metux IT consult
cac8b6f4bd Makefile: allow overriding the binary executable target dir
Distros tend to change this to specific locations (eg. on MVCC installs),
therefore introduce a generic environment variable that's a common practise
since 30+ years and thus already well known and supported by distros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-08 14:11:03 +02:00
Akihiro Suda
90443f038d
CI: update Rocky Linux to 8.8
- UEFI now has to be enabled
- The root device is now `/dev/mapper/rocky-root`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-08 18:58:24 +09:00
Fu Wei
165f8e414e
Merge pull request #8928 from oss-qm/submit/makefile-fix-go-command 2023-08-08 05:31:48 +08:00
Derek McGowan
720e027a97
Merge pull request #8917 from amghazanfari/main
delete checkout branch in doc
2023-08-07 14:09:09 -07:00
Phil Estes
649f356656
Merge pull request #8427 from AkihiroSuda/fedora38
CI: update Fedora to 38
2023-08-07 15:41:49 -04:00
Akihiro Suda
0a57dc2a02
CI: update Fedora to 38
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-08 03:15:44 +09:00
Akihiro Suda
30dd0a17f2
CI: install Vagrant from Hashicorp
Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image:
https://bugs.launchpad.net/vagrant/+bug/2017828

So we have to install Vagrant >= 2.3.1 from the upstream:
https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-08 03:15:44 +09:00
Phil Estes
7688c4d008
Merge pull request #8929 from oss-qm/submit/makefile-override-revision
Makefile: allow REVISION be overwritten by environment
2023-08-07 14:07:43 -04:00
Akihiro Suda
ce22387b8f
Merge pull request #8919 from AkihiroSuda/vagrant-on-gha-larger
CI: move Vagrant tests to GitHub Actions (larger runners)
2023-08-08 01:07:12 +09:00
Enrico Weigelt, metux IT consult
965641dbc1 Makefile: allow REVISION be overwritten by environment
Required for distros that wanna use their local version and
can't have some (possibly failing) git commands being run here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-07 17:23:00 +02:00
Enrico Weigelt, metux IT consult
fc32197d43 Makefile: fix overriding go command
There still was one place that's calling the `go` command directly
instead of using the $(GO) variable.

Fixes: 9ea25634bd
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2023-08-07 17:21:47 +02:00
Akihiro Suda
2d3360ec71
CI: move Vagrant tests to GitHub Actions (larger runners)
We have been using Cirrus CI for running vagrant workloads
as the standard runners of GHA lacks nested virtualization,
but it looks like GHA with the "larger" runners support nested
virtualization.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-08-07 01:24:55 +09:00
rongfu.leng
4f3c8c4687 replace mcr.microsoft.com registry to ghcr.io/containerd registry
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-08-06 21:14:07 +08:00
Wei Fu
d41c62a556 .github/workflows: add dmesg step for integration-linux
It will be easy to debug flaky testcase if we can provide kernel log by
`dmesg -T -f kern`.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-06 18:13:17 +08:00
Amir M. Ghazanfari
fd8778fba3
delete checkout branch in doc
branch "pr/proto/draft" in NRI doesn't exist anymore it's better to delete this line 

Signed-off-by: Amir M. Ghazanfari <a.m.ghazanfari76@gmail.com>
2023-08-04 22:46:33 +03:30
Fu Wei
2b2195c36b
Merge pull request #8722 from marquiz/devel/cgroup-driver-autoconfig
cri: implement RuntimeConfig rpc
2023-08-04 16:09:34 +08:00
Markus Lehtonen
c62abcb146 docs: document CRI cgroup driver auto detection
Document the user visible changes related to the new RuntimeConfig RPC.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-08-04 09:48:29 +03:00
Phil Estes
40c85d6c09
Merge pull request #8897 from kinvolk/rata/userns-use-platform
cri/sbserver: Use platform instead of GOOS for userns detection
2023-08-02 16:12:02 -04:00
Maksym Pavlenko
e12128cebc
Merge pull request #8899 from tonistiigi/arm64-norm-docs
platforms: clarify docs for amd64/arm64 variant normalization
2023-08-02 12:02:43 -07:00
Rodrigo Campos
c80a3ecafd cri/sbserver: Use platform instead of GOOS for userns detection
In the sbserver we should not use the GOOS, as windows hosts can run
linux containers. On the sbserver we should use the platform param.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-08-02 12:32:05 +02:00
Phil Estes
e0912c068b
Merge pull request #8904 from thaJeztah/update_go1.20.7
update to go1.20.7, go1.19.12
2023-08-01 21:38:09 -04:00
Sebastiaan van Stijn
157dff2812
update to go1.20.7, go1.19.12
Includes a fix for CVE-2023-29409

go1.20.7 (released 2023-08-01) includes a security fix to the crypto/tls
package, as well as bug fixes to the assembler and the compiler. See the
Go 1.20.7 milestone on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.20.7+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.20.6...go1.20.7

go1.19.12 (released 2023-08-01) includes a security fix to the crypto/tls
package, as well as bug fixes to the assembler and the compiler. See the
Go 1.19.12 milestone on our issue tracker for details.

- https://github.com/golang/go/issues?q=milestone%3AGo1.19.12+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.19.11...go1.19.12

From the mailing list announcement:

[security] Go 1.20.7 and Go 1.19.12 are released

Hello gophers,

We have just released Go versions 1.20.7 and 1.19.12, minor point releases.

These minor releases include 1 security fixes following the security policy:

- crypto/tls: restrict RSA keys in certificates to <= 8192 bits

  Extremely large RSA keys in certificate chains can cause a client/server
  to expend significant CPU time verifying signatures. Limit this by
  restricting the size of RSA keys transmitted during handshakes to <=
  8192 bits.

  Based on a survey of publicly trusted RSA keys, there are currently only
  three certificates in circulation with keys larger than this, and all
  three appear to be test certificates that are not actively deployed. It
  is possible there are larger keys in use in private PKIs, but we target
  the web PKI, so causing breakage here in the interests of increasing the
  default safety of users of crypto/tls seems reasonable.

  Thanks to Mateusz Poliwczak for reporting this issue.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.20.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-01 23:57:32 +02:00
Phil Estes
9214c6403e
Merge pull request #8316 from davidhsingyuchen/partial-attach
fix: allow attaching to any combination of stdin/stdout/stderr
2023-08-01 14:47:53 -04:00
Hsing-Yu (David) Chen
687a5f51a8 fix: allow attaching to any combination of stdin/stdout/stderr
Before this PR, if a stdin/stdout/stderr stream is nil,
and the corresponding FIFO is not an empty string,
a panic will occur when Read/Write of the nil stream is invoked in io.CopyBuffer.

Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
2023-08-01 09:56:04 -07:00
Tonis Tiigi
aa8b094ab1
platforms: clarify docs for amd64/arm64 variant normalization
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-08-01 11:25:58 +03:00
Wang Xinwen
710d987d29
Fix default platform matcher when ctr import
Signed-off-by: Wang Xinwen <wxw0504@outlook.com>
2023-07-31 22:17:25 +08:00
Fu Wei
40f26543bd
Merge pull request #8885 from kinvolk/rata/runc-abs-path
cri: Don't use rel path for image volumes
2023-07-31 21:10:20 +08:00
Rodrigo Campos
2d64ab8d79 cri: Don't use rel path for image volumes
Runc 1.1 throws a warning when using rel destination paths, and runc 1.2
is planning to thow an error (i.e. won't start the container).

Let's just make this an abs path in the only place it might not be: the
mounts created due to `VOLUME` directives in the Dockerfile.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-31 12:33:54 +02:00
Sebastiaan van Stijn
85a2c9a01b
log: swap logrus functions with their equivalent on default logger
[`logrus.SetLevel()`][1], [`logrus.GetLevel()`][2] and [`logrus.SetFormatter()`][3]
are all convenience functions to configure logrus' standardlogger, which is the
logger to which we hold a reference in the Entry configured on [`log.L`][4].

This patch:

- swaps calls to `logrus.SetLevel`, `logrus.GetLevel` and `logrus.SetFormatter`
  for their equivalents on `log.L`. This makes it clearer what `SetLevel` does,
  and makes sure that we set the log-level of the logger / entry we define in
  our package (even if that would be swapped with a different instance).
- removes the use of `logrus.NewEntry` with directly constructing a `Entry`,
  using the local `Entry` alias (anticipating we can swap that type in future).

[1]: dd1b4c2e81/exported.go (L34C1-L37)
[2]: dd1b4c2e81/exported.go (L39-L42)
[3]: dd1b4c2e81/exported.go (L23-L26)
[4]: dd1b4c2e81/exported.go (L9-L16)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 23:21:33 +02:00
Sebastiaan van Stijn
6baff1694f
log: add package documentation and summary of package's purpose
Add a package doc to (try to) describe the purpose of this package, and
to describe the purpose (and expectations) of aliases provided by the
package.

> Package log provides types and functions related to logging, passing
> loggers through a context, and attaching context to the logger.
>
> # Transitional types
>
> This package contains various types that are aliases for types in [logrus].
> These aliases are intended for transitioning away from hard-coding logrus
> as logging implementation. Consumers of this package are encouraged to use
> the type-aliases from this package instead of directly using their logrus
> equivalent.
>
> The intent is to replace these aliases with locally defined types and
> interfaces once all consumers are no longer directly importing logrus
> types.
>
> IMPORTANT: due to the transitional purpose of this package, it is not
> guaranteed for the full logrus API to be provided in the future. As
> outlined, these aliases are provided as a step to transition away from
> a specific implementation which, as a result, exposes the full logrus API.
> While no decisions have been made on the ultimate design and interface
> provided by this package, we do not expect carrying "less common" features.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:55:37 +02:00
Sebastiaan van Stijn
238da2c525
log: make Fields type a generic map[string]any
Decouple it from logrus, but with the same type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:55:37 +02:00
Sebastiaan van Stijn
634a4a1bbf
log: add log.Entry type
Don't return logrus types from exported functions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:55:30 +02:00
Sebastiaan van Stijn
dd67240f1b
log: define OutputFormat type
Strong-type the format.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:36:00 +02:00
Sebastiaan van Stijn
778ac302b2
log: define G() as a function instead of a variable
The `G` variable is exported, and not expected to be overwritten
externally. Defining it as a function also documents it as a function
on https://pkg.go.dev, instead of a variable; https://pkg.go.dev/github.com/containerd/containerd@v1.6.22/log#pkg-variables

Note that (while the godoc suggests otherwise) I made `GetLogger` an alias
for `G`, as `G` is the most commonly used function (not the other way round),
although I don't think there's a performance gain in doing so.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
81ac648d91
log: add all log-levels that are accepted
While other log-levels are not currently used in containerd itself,
they can be returned by `GetLevel()`, and are accepted (no error) by
`SetLevel()`. We should either accept those values, or produce an
error (in `SetLevel()`), but given that there's other ways to set the
log-level, we should probably acknowledge that this package is a transitional
package, and still closely tied to logrus (for the time being).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
0b6333a412
log: group "enum" consts and touch-up docs
Also updated the level descriptions with their documentation from
logrus.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
4a36022e20
log: WithLogger: remove redundant intermediate var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
40ee5fb11b
log: SetFormat: include returns in switch
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
6fe7e03b80
log: remove testify dependency
Testify was only used for a basic assertion. Remove the dependency,
in preparation of (potentially) moving this package to a separate
module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:59 +02:00
Sebastiaan van Stijn
e2ad5a985e
removes/docker: remove unnecessary conversion (unconvert)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-30 22:35:31 +02:00
Markus Lehtonen
ed47d6ba76 cri: implement RuntimeConfig rpc
The rpc only reports one field, i.e. the cgroup driver, to kubelet.
Containerd determines the effective cgroup driver by looking at all
runtime handlers, starting from the default runtime handler (the rest in
alphabetical order), and returning the cgroup driver setting of the
first runtime handler that supports one. If no runtime handler supports
cgroup driver (i.e. has a config option for it) containerd falls back to
auto-detection, returning systemd if systemd is running and cgroupfs
otherwise.

This patch implements the CRI server side of Kubernetes KEP-4033:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/4033-group-driver-detection-over-cri

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-07-28 13:50:43 +03:00
Phil Estes
81895d22c9
Merge pull request #8867 from Iceber/pinned_image_label
cri: fix using the labels to pin image
2023-07-27 09:51:23 -04:00
Justin Chadwell
a1cdf60cb6 docker: add test to ensure not found error is returned by resolve
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-07-26 11:33:50 +01:00
Justin Chadwell
b4814a29d4 docker: return most relevant error from docker resolution
Previously, we would return the first non-404 error from a host.

This is logical, however, it can result in confusing errors to the
user:

- e.g. we have an HTTP host, and an HTTPS host.

  If the image does not exist, we return "http: server gave HTTP
  response to HTTPS client". This is technically correct, however, the
  user is easily confused - the most relevant error in this case is the
  404 error.

- e.g. we have a broken HTTP host that returns 5XX errors, and a HTTP
  host with authentication.

  On the request for an image, we return the 5XX error directly.
  However, we have a host later on which returned an authentication
  error which is now hidden from the user.

Note: this *can* be resolved by changing the order of hosts passed in,
however this requires 1. knowing ahead of time which hosts are going to
return certain errors and 2. this is often not desirable, we'd prefer
to use HTTPS if it's available, and only then fallback to HTTP.

To resolve this, we assign each possible error during resolution a
"priority" that marks how far through the image resolution process a
host/path combo got. Then we return the error with the highest priority,
which is much more likely to be the most relevant error to the user.

The ranking of priority then is (from lowest to highest):
- Underlying transport errors (TLS, TCP, etc)
- 404 errors
- Other 4XX/5XX errors
- Manifest rejection (due to max size exceeded)

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-07-26 11:33:50 +01:00
Fu Wei
bdbcf96267
Merge pull request #8868 from AkihiroSuda/epoch-y2038
pkg/epoch: fix Y2038 on 32-bit hosts
2023-07-26 13:43:53 +08:00
Iceber Gu
7f7ba31b64 cri: fix using the pinned label to pin image
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-07-26 12:26:00 +08:00
Akihiro Suda
4807571352
pkg/epoch: fix Y2038 on 32-bit hosts
`strconv.Itoa(int(tm.Unix()))` rounds the time to 32-bit int on 32-bit hosts

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-26 13:17:39 +09:00
Fu Wei
8348a8cecb
Merge pull request #8862 from borg-land/change-buckets
Migrate to community bucket for node e2e tests
2023-07-26 12:15:57 +08:00
Mahamed Ali
98974117b3 migrate to community owned bucket
Signed-off-by: Mahamed Ali <cy@borg.dev>
2023-07-25 12:09:54 +03:00
Justin Chadwell
a3404ac422 docker: add missing info log for 4XX/5XX responses
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-07-24 15:28:37 +01:00
Markus Lehtonen
850b2e1bf3 go.mod: update cri-api to v1.28.0-beta.0
Required to support upcoming Kubernetes (v1.28) features.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-07-24 14:49:14 +03:00
Fu Wei
6eb90a63e0
Merge pull request #8837 from anmaxvl/fix-ctr-images-check-quiet
fix: `ctr images check -q` outputs not unpacked images
2023-07-24 10:39:43 +08:00
Fu Wei
e587e45044
Merge pull request #8857 from mqasimsarfraz/qasim/fix-swap-limit
cri: memory.memsw.limit_in_bytes: no such file or directory
2023-07-24 09:54:52 +08:00
Fu Wei
7061cae60f
Merge pull request #8858 from AkihiroSuda/go-mod-20230723
go.mod: bump up
2023-07-24 09:52:05 +08:00
Fu Wei
5bab55c3f3
Merge pull request #8859 from AkihiroSuda/ci-ubuntu-22.04
.github/workflows/ci.yml: upgrade Ubuntu from 20.04 to 22.04
2023-07-24 09:51:42 +08:00
Akihiro Suda
480bc8a2be
.github/workflows/ci.yml: upgrade Ubuntu from 20.04 to 22.04
- `release.yml` continues to use Ubuntu 20.04 for glibc compatibility
- cgroup v1 is no longer tested with Ubuntu, but still tested with Rocky 8

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 18:49:02 +09:00
Akihiro Suda
bc96b9039a
go.mod: github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0
5330a85ea6...8075edf89b

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:01 +09:00
Akihiro Suda
da27408854
go.mod: google.golang.org/genproto v0.0.0-20230720185612-659f7aaaa771
ccb25ca9f1...659f7aaaa7

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:01 +09:00
Akihiro Suda
73dc13ad62
go.mod: github.com/urfave/cli/compare v1.22.14
https://github.com/urfave/cli/compare/v1.22.13...v1.22.14

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
1c4fc568b1
go.mod: github.com/prometheus/client_golang/compare v1.16.0
https://github.com/prometheus/client_golang/compare/v1.14.0...v1.16.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
68abb525a5
go.mod: github.com/minio/sha256-simd v1.0.1
https://github.com/minio/sha256-simd/compare/v1.0.0...v1.0.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
1f2216cc78
go.mod: github.com/klauspost/compress v1.16.7
https://github.com/imdario/mergo/compare/v0.3.13...v1.0.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
3c6ab04203
go.mod: dario.cat/mergo v1.0.0
https://github.com/imdario/mergo/compare/v0.3.13...v1.0.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:08:00 +09:00
Akihiro Suda
4bda0a69e2
go.mod: github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
https://github.com/grpc-ecosystem/go-grpc-middleware/compare/v1.3.0...v1.4.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
0f033b6125
go.mod: github.com/emicklei/go-restful/v3 v3.10.2
https://github.com/emicklei/go-restful/compare/v3.10.1...v3.10.2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
90e050298c
go.mod: github.com/containernetworking/plugin v1.3.0
https://github.com/containernetworking/plugins/compare/v1.2.0...v1.3.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
0498acefb9
go.mod: github.com/.../container-device-interface v0.6.0
https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.5.4...v0.6.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
74b8cb850a
go.mod: github.com/opencontainers/runc v1.1.8
https://github.com/opencontainers/runc/compare/v1.1.7...v1.1.8

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:59 +09:00
Akihiro Suda
895dd2e93b
go.mod: github.com/opencontainers/image-spec v1.1.0-rc4
https://github.com/opencontainers/image-spec/compare/v1.1.0-rc3...v1.1.0-rc4

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:58 +09:00
Akihiro Suda
235a4452df
go.mod: github.com/opencontainers/runtime-spec v1.1.0
https://github.com/opencontainers/runtime-spec/compare/v1.1.0-rc.2...v1.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-23 03:07:58 +09:00
Fu Wei
59959b31ff
Merge pull request #8852 from bpfoster/issue-8851
Fix ro mount option being passed
2023-07-21 21:14:48 +08:00
Qasim Sarfraz
06f18c69d2 cri: memory.memsw.limit_in_bytes: no such file or directory
If kubelet passes the swap limit (default memory limit = swap limit ),
it is configured for container irrespective if the node supports swap.

Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
2023-07-21 14:43:33 +02:00
Ben Foster
f3daf32c73 Fix ro mount option being passed
"ro" was not parsed out of the string, so it was passed as part of data
to mount().
This would lead to mount() returning an invalid argument code.
Separate out the "ro" option, much like "userxattr", which will allow
the MS-RDONLY mountflag to get set.

Signed-off-by: Ben Foster <bpfoster@gmail.com>
2023-07-20 17:08:01 -04:00
Maksym Pavlenko
4d2c887990
Merge pull request #8841 from thaJeztah/bump_runc_binary_1.1.8
update runc binary to v1.1.8
2023-07-19 12:53:55 -07:00
Sebastiaan van Stijn
b2967a8d64
update runc binary to v1.1.8
release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.8
full diff: https://github.com/opencontainers/runc/compare/v1.1.7...v1.1.9

This is the eighth patch release of the 1.1.z release branch of runc.
The most notable change is the addition of RISC-V support, along with a
few bug fixes.

- Support riscv64.
- init: do not print environment variable value.
- libct: fix a race with systemd removal.
- tests/int: increase num retries for oom tests.
- man/runc: fixes.
- Fix tmpfs mode opts when dir already exists.
- docs/systemd: fix a broken link.
- ci/cirrus: enable some rootless tests on cs9.
- runc delete: call systemd's reset-failed.
- libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed.
- CI: bump Fedora, Vagrant, bats.
- .codespellrc: update for 2.2.5.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 18:16:06 +02:00
Maksym Pavlenko
8dcc06d14a
Merge pull request #8747 from Iceber/shim_ttrpc_service
shim: change ttrpcService and ttrpcServerOptioner to exported interfaces
2023-07-18 17:12:22 -07:00
Akihiro Suda
e26b669ba9
Merge pull request #8838 from AkihiroSuda/revert-8789
Revert "Add support for bind-mounts on Darwin (a.k.a. "make native snapshotter work")" (#8789)
2023-07-19 05:24:20 +09:00
Kazuyoshi Kato
ef1c9f0a63
Merge pull request #8766 from lengrongfu/fix/ci-Integration-fail
fix ci Linux Integration test fail
2023-07-18 10:18:12 -07:00
Maksim An
90ecb8104e fix: ctr images check outputs not unpacked images in quite mode
`ctr images check -q` shouldn't output images which were not
unpacked.

Signed-off-by: Maksim An <maksiman@microsoft.com>
2023-07-18 10:16:54 -07:00
Kazuyoshi Kato
e5a49e6ceb
Merge pull request #8789 from slonopotamus/macos-bind-mount
Add support for bind-mounts on Darwin (a.k.a. "make native snapshotter work")
2023-07-18 10:16:10 -07:00
Akihiro Suda
98f27e1d9c
Revert "Add support for mounts on Darwin"
This reverts commit 2799b28e61.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-19 00:22:20 +09:00
Akihiro Suda
e939d13195
Revert "Revert 416899fc8e81a80a4b09b59c801f98d36ddc0e74"
This reverts commit 6c9c711120.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-07-19 00:22:05 +09:00
Phil Estes
f86d585ce6
Merge pull request #8811 from kiashok/updateHcsshimTag
Update hcsshim tag to v0.10.0-rc.9
2023-07-17 20:33:16 -04:00
Marat Radchenko
6c9c711120 Revert 416899fc8e
That commit neither helps without a working bind-mount implementation nor is needed when such implementation exists.

Testing shows that containerd can properly download and unpack image using bindfs mounts (see previous commit) even without Darwin-specific applier code.

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-17 23:27:04 +03:00
Marat Radchenko
2799b28e61 Add support for mounts on Darwin
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-17 23:27:04 +03:00
Kirtana Ashok
56d80f81a2 Update hcsshim tag to v0.10.0-rc.9
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-07-17 10:28:47 -07:00
Phil Estes
a94918b591
Merge pull request #8803 from kinvolk/rata/userns-sbserver
cri/sbserver: Add support for user namespaces (KEP-127)
2023-07-17 10:57:01 -04:00
Phil Estes
4c538164e6
Merge pull request #8818 from thaJeztah/use_registry.k8s.io
pkg/cri/server: TestImageGetLabels: use registry.k8s.io
2023-07-14 09:45:54 -04:00
Sebastiaan van Stijn
9c673f9673
pkg/cri/server: TestImageGetLabels: use registry.k8s.io
These are not actually being pulled, just removing the deprecated k8s.gcr.io
from the code-base. While at it, also renamed / removed vars that shadowed
with package-level definitions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-14 11:22:39 +02:00
Mike Brown
3ed1bc108f
Merge pull request #8671 from jsturtevant/fix-windows-edge-cases
[cri] Handle pod transition states gracefully while listing pod stats
2023-07-12 15:43:21 -05:00
James Sturtevant
f914edf4f6
[cri] Handle Windows pod transitions gracefully
When the pods are transitioning there are several
cases where containers might not be in valid state.
There were several cases where the stats where
failing hard but we should just continue on as
they are transient and will be picked up again
when kubelet queries for the stats again.

Signed-off-by: James Sturtevant <jstur@microsoft.com>

Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2023-07-12 09:57:14 -07:00
Phil Estes
0098eacf93
Merge pull request #8804 from dcantah/go-bump-1.20.6
Update Go to 1.20.6,1.19.11
2023-07-12 09:56:53 -04:00
Fu Wei
8f89bd7be3
Merge pull request #8723 from djdongjin/dedup-WithNewSnapshot 2023-07-12 09:36:36 +08:00
Danny Canter
52ef3468bc Update Go to 1.20.6,1.19.11
go1.20.6 (released 2023-07-11) includes a security fix to the net/http
package, as well as bug fixes to the compiler, cgo, the cover tool, the
go command, the runtime, and the crypto/ecdsa, go/build, go/printer,
net/mail, and text/template packages. See the Go 1.20.6 milestone on
our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.20.6+label%3ACherryPickApproved

Full diff: https://github.com/golang/go/compare/go1.20.5...go1.20.6

These minor releases include 1 security fixes following the security policy:

- net/http: insufficient sanitization of Host header

The HTTP/1 client did not fully validate the contents of the Host header.
A maliciously crafted Host header could inject additional headers or
entire requests. The HTTP/1 client now refuses to send requests containing
an invalid Request.Host or Request.URL.Host value.

Thanks to Bartek Nowotarski for reporting this issue.

Includes security fixes for CVE-2023-29406 and Go issue https://go.dev/issue/60374

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-07-11 14:34:23 -07:00
Phil Estes
0789790f07
Merge pull request #8418 from sxllwx/fix/k8s-issue-74551
bugfix(port-forward): Correctly handle known errors
2023-07-11 10:02:56 -04:00
Phil Estes
34b1653e95
Merge pull request #8780 from slonopotamus/uncopypaste-read-spec
Uncopypaste parsing of OCI Bundle spec file
2023-07-11 09:53:00 -04:00
Rodrigo Campos
48cdf1fe2c integration: Enable userns tests for sbserver
Now we ported support to sbserver, let's enable the e2e tests there too.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:25 +02:00
Rodrigo Campos
9160386ecc cri/sbserver: Test net.ipv4.ping_group_range works with userns
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:25 +02:00
Rodrigo Campos
1c6e268447 cri/sbserver: Fix net.ipv4.ping_group_range with userns
This commit just updates the sbserver with the same fix we did on main:
	9bf5aeca77 ("cri: Fix net.ipv4.ping_group_range with userns ")

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:25 +02:00
Rodrigo Campos
36a96d7f32 cri/sbserver: Remap snapshots for sbserver too
This is a port of 31a6449734 ("Add capability for snapshotters to
declare support for UID remapping") to sbserver.

This patch remaps the rootfs in the platform-specific if user namespaces
are in use, so the pod can read/write to the rootfs.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:15:22 +02:00
Rodrigo Campos
508e6f6e03 cri/sbserver: Add userns tests to TestLinuxSandboxContainerSpec()
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:42 +02:00
Rodrigo Campos
fb9ce5d482 cri/sbserver: Support pods with user namespaces
This patch requests the OCI runtime to create a userns when the CRI
message includes such request.

This is an adaptation of a7adeb6976 ("cri: Support pods with user
namespaces") to sbserver, although the container_create.go parts were
already ported as part of 40be96efa9 ("Have separate spec builder for
each platform"),

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:42 +02:00
Rodrigo Campos
c99cb95f07 cri/sbserver: Let OCI runtime create netns when userns is used
This commit just ports 36f520dc04 ("Let OCI runtime create netns when
userns is used") to sbserver.

The CNI network setup is done after OCI start, as it didn't seem simple
to get the sandbox PID we need for the netns otherwise.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:42 +02:00
Rodrigo Campos
73c75e2c73 cri/sbserver: Copy userns helpers to podsandbox
Currently there is a big c&p of the helpers between these two folders
and a TODO in the platform agnostic file to organize them in the future,
when some other things settle.

So, let's just copy them for now.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 15:14:12 +02:00
Rodrigo Campos
0b6a0fe773 cri/sbserver: Move runtimeStart to match position with cri/server
Commit c085fac1e5 ("Move sandbox start behind controller") moved the
runtimeStart to only account for time _after_ the netns has been
created.

To match what we currently do in cri/server, let's move it to just after
the get the sandbox runtime.

This come up when porting userns to sbserver, as the CNI network setup
needs to be done at a later stage and runtimeStart was accounting for
the CNI network setup time only when userns is enabled.

To avoid that discrepancy, let's just move it earlier, that also matches
what we do in cri/server.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 13:58:45 +02:00
Rodrigo Campos
90087ac44f WithRemapperLabels: Update doc to mention overlay supports it
Since we merged support for userns in:
	https://github.com/containerd/containerd/pull/7679

overlay has been doing a chown for the rootfs using WithRemapperLabels.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 13:58:45 +02:00
Rodrigo Campos
9d9903565a cri: Fix comment typos
Beside the "in future the when" typo, we take the chance to reflect that
user namespaces are already merged.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-11 13:58:45 +02:00
Marat Radchenko
9e34b8b441 Uncopypaste parsing of OCI Bundle spec file
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-11 14:41:15 +03:00
wangxiang
232538b768 bugfix(port-forward): Correctly handle known errors
These two errors can occur in the following scenarios:

ECONNRESET: the target process reset connection between CRI and itself.
see: #111825 for detail

EPIPE: the target process did not read the received data, causing the
buffer in the kernel to be full, resulting in the occurrence of Zero Window,
then closing the connection (FIN, RESET)
see: #74551 for detail

In both cases, we should RESET the httpStream.

Signed-off-by: wangxiang <scottwangsxll@gmail.com>
2023-07-11 11:06:13 +08:00
Kazuyoshi Kato
f1d2868785
Merge pull request #8798 from Jenkins-J/blockfile-test-fix-rebase
Modify loopback size
2023-07-10 13:46:38 -07:00
Phil Estes
97f2e3bc03
Merge pull request #8748 from djdongjin/cri-header-race
Resolve docker.NewResolver race condition
2023-07-10 11:12:05 -04:00
James Jenkins
5c480d9c88 Modify loopback size
Modify the loopback size in the blockfile snapshotter test setup.
Set the loopback size to 16MB when the page size is greater than 4096.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2023-07-10 11:06:24 -04:00
Phil Estes
2c73bce378
Merge pull request #8795 from dcantah/retried-typo
Fix mount pkg typo
2023-07-10 09:16:14 -04:00
Danny Canter
7ef133ad47 Fix mount pkg typo
retired -> retried

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-07-10 01:45:17 -07:00
Fu Wei
9afa2256f1
Merge pull request #8776 from thaJeztah/vagrant_locking
Cirrus CI: configure apt-get to wait for locks
2023-07-09 17:17:56 +08:00
Jin Dong
83ff030e4f Change http.Header copy to builtin Clone
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-07-08 05:25:47 -07:00
Jin Dong
cdb153ec92 Resolve docker.NewResolver race condition
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-07-08 05:25:47 -07:00
Jin Dong
01a6e1c730 Dedup WithNewSnapshotView
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-07-08 05:24:04 -07:00
Sebastiaan van Stijn
6a913ac82e
Cirrus CI: configure apt-get to wait for locks
I saw Cirrus CI / Vagrant BOX:rockylinux/8@5.0.0 failing during setting
up Vagrant, which may be due to other scripts provisioning the machine;

    Reading package lists...
    apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
    E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 2496 (apt-get)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Configure dpkg to wait for locks to be released instead of failing. I used
60 second as timeout, which is relatively long, but given that the Vagrant
checks are known to take some time to run, is probably fine.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-07 09:06:03 +02:00
rongfu.leng
38f9bc3e0a fix ci Linux Integration test fail
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-07-07 14:51:04 +08:00
Phil Estes
3c250cb508
Merge pull request #8779 from kinvolk/rata/userns-fixes
Fix net.ipv4.ping_group_range with userns
2023-07-06 15:17:12 -04:00
Maksym Pavlenko
8c857748d9
Merge pull request #8775 from dcantah/sb-change-mount
Sandbox: Change to mount.Mount for CreateOptions
2023-07-06 09:30:06 -07:00
Phil Estes
466d884518
Merge pull request #8777 from yankay/fix-restart-with-tty
Fix the automatically restart issue when using LogURI and Terminal together
2023-07-06 10:51:11 -04:00
Fu Wei
6d8248b6e6
Merge pull request #8581 from thaJeztah/bump_zfs
vendor: github.com/containerd/zfs v1.1.0
2023-07-06 22:12:14 +08:00
Rodrigo Campos
c17d3bdb54 pkg/cri/server: Test net.ipv4.ping_group_range works with userns
Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-06 14:20:26 +02:00
Rodrigo Campos
9bf5aeca77 pkg/cri/server: Fix net.ipv4.ping_group_range with userns
userns.RunningInUserNS() checks if the code calling that function is
running inside a user namespace. But we need to check if the container
we will create will use a user namespace, in that case we need to
disable the sysctl too (or we would need to take the userns mapping into
account to set the IDs).

This was added in PR:
        https://github.com/containerd/containerd/pull/6170/

And the param documentation says it is not enabled when user namespaces
are in use:
        https://github.com/containerd/containerd/pull/6170/files#diff-91d0a4c61f6d3523b5a19717d1b40b5fffd7e392d8fe22aed7c905fe195b8902R118

I'm not sure if the intention was to disable this if containerd is
running inside a userns (rootless, if that is even supported) or just
when the pod has user namespaces.

Out of an abundance of caution, I'm keeping the userns.RunningInUserNS()
so it is still not used if containerd runs inside a user namespace.

With this patch and "enable_unprivileged_icmp = true" in the config,
running containerd as root on the host, pods with user namespaces start
just fine. Without this patch they fail with:
        ... failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: w
 /proc/sys/net/ipv4/ping_group_range: invalid argument: unknown

Thanks a lot to Andy on the k8s slack for reporting the issue. He also
mentions he hits this with k3s on a default installation (the param
is off by default on containerd, but k3s turns that on by default it
seems). He also debugged which part of the stack was setting that
sysctl, found the PR that added this code in containerd and a workaround
(to turn the bool off).

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-07-06 14:20:26 +02:00
Sebastiaan van Stijn
05fef52b68
vendor: github.com/containerd/zfs v1.1.0
- update github.com/mistifyio/go-zfs dependency to github.com/mistifyio/go-zfs/v3,
  which contains various bugfixes, and adds go module support (which required a major
  version update): https://github.com/mistifyio/go-zfs/compare/f784269be439...v3.0.1
- remove github.com/pkg/errors dependency
- various minor cleanups/fixes

Full diff: https://github.com/containerd/zfs/compare/v1.0.0...v1.1.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-06 11:56:07 +02:00
Kay Yan
073de93086 Fix the auto restart fail when using LogURI and TTY together
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2023-07-06 04:58:56 +00:00
Iceber Gu
00e5ae2118 shim: change ttrpcService and ttrpcServerOptioner to exported interfaces
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-07-06 00:36:43 +08:00
Kazuyoshi Kato
d5ec7286ae
Merge pull request #8714 from thaJeztah/update_go_1.20.5
update go to go1.20.5, go1.19.10
2023-07-05 06:39:54 -07:00
Kazuyoshi Kato
6c041c69f8
Merge pull request #8746 from slonopotamus/fix-example-shim
Fix example shim to actually use its task service
2023-07-05 06:38:59 -07:00
Fu Wei
e7276fe35a
Merge pull request #8744 from cardyok/bugfix_remote_fetch_mediatype 2023-07-04 21:58:35 +08:00
Sebastiaan van Stijn
e9f63f64f5
update go to go1.20.5, go1.19.10
go1.20.5 (released 2023-06-06) includes four security fixes to the cmd/go and
runtime packages, as well as bug fixes to the compiler, the go command, the
runtime, and the crypto/rsa, net, and os packages. See the Go 1.20.5 milestone
on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.20.5+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.20.4...go1.20.5

These minor releases include 3 security fixes following the security policy:

- cmd/go: cgo code injection
  The go command may generate unexpected code at build time when using cgo. This
  may result in unexpected behavior when running a go program which uses cgo.

  This may occur when running an untrusted module which contains directories with
  newline characters in their names. Modules which are retrieved using the go command,
  i.e. via "go get", are not affected (modules retrieved using GOPATH-mode, i.e.
  GO111MODULE=off, may be affected).

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2023-29402 and Go issue https://go.dev/issue/60167.

- runtime: unexpected behavior of setuid/setgid binaries

  The Go runtime didn't act any differently when a binary had the setuid/setgid
  bit set. On Unix platforms, if a setuid/setgid binary was executed with standard
  I/O file descriptors closed, opening any files could result in unexpected
  content being read/written with elevated prilieges. Similarly if a setuid/setgid
  program was terminated, either via panic or signal, it could leak the contents
  of its registers.

  Thanks to Vincent Dehors from Synacktiv for reporting this issue.

  This is CVE-2023-29403 and Go issue https://go.dev/issue/60272.

- cmd/go: improper sanitization of LDFLAGS

  The go command may execute arbitrary code at build time when using cgo. This may
  occur when running "go get" on a malicious module, or when running any other
  command which builds untrusted code. This is can by triggered by linker flags,
  specified via a "#cgo LDFLAGS" directive.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2023-29404 and CVE-2023-29405 and Go issues https://go.dev/issue/60305 and https://go.dev/issue/60306.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-04 11:03:38 +02:00
Fu Wei
fec3191abc
Merge pull request #8755 from dcantah/withbytesbuffers-chg
integration/client: Rework withBytesBuffers
2023-07-04 10:04:10 +08:00
Danny Canter
22a7c63c07 Sandbox: Change to mount.Mount for CreateOptions
We'd wanted to swap to mount.Mount after target was introduced. That
time is now :)

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-07-03 11:14:19 -07:00
Kazuyoshi Kato
099d2e7c76
Merge pull request #8757 from dcantah/proto-api-conversions
Add From/ToProto helpers
2023-07-03 10:59:08 -07:00
Marat Radchenko
51a1e7f0b2 Fix example shim to actually use its task service
In commit 4b35c3829d, example shim erroneously started to depend on runc, fix that back.

Also, build example shim on all supported platforms to prevent such situations in the future.

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-07-03 20:40:20 +03:00
Phil Estes
330273d236
Merge pull request #8763 from slonopotamus/GetTopic
Move GetTopic function out of runc shim
2023-07-03 09:39:00 -04:00
Derek McGowan
d89882ae92
Merge pull request #8768 from akhilerm/fix-nightly 2023-07-03 00:19:43 -07:00
Akhil Mohan
a9cb6090e2
ci: remove libseccomp-dev installation for nightly
since libseccomp is required only for building runc and we are only
building containerd binaries in nightly, the libseccomp-dev dependency
is removed. Foreign arch repositories are now removed since
crossbuild-essential-* packages are {arm64, ppc64el,..} cross compiler
packages for amd64 and arch specific repositories are not required.

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-07-01 09:43:09 +05:30
Marat Radchenko
0607e73263 Move GetTopic function out of runc shim
Every shim implementation needs to select a correct publisher topic when posting events, so move it out of Linux-only runc code to the place where other shims can also use it

Otherwise, shims have to copy-paste this code. For example, see runj: 8158e558a3/containerd/shim.go (L144-L172)

Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
2023-06-30 10:29:21 +03:00
Derek McGowan
5d1ab0129e
Merge pull request #8764 from AkihiroSuda/zero-whiteout-timestamp 2023-06-29 21:51:26 -07:00
Akihiro Suda
5dedb6d0d2
archive: use 1970-01-01 as the whiteout timestamp
The whiteout timestamps are no longer set to the source date epoch.
The source date epoch still applies to non-whiteout files.

Discussion happened in moby/buildkit PR 3560.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-06-30 11:30:01 +09:00
Akihiro Suda
a542a57b2e
Merge pull request #8762 from dcantah/upgrade-cgroups-3.0.2
go.mod: Update cgroups to 3.0.2
2023-06-30 09:26:45 +09:00
Danny Canter
d6dbc4040b go.mod: Update cgroups to 3.0.2
This brings in a ton of great improvements, most notably for the containerd
daemon is performance improvements for cgroups1 and 2 for gathering stats,
as well as some fixes for enabling controllers and deleting v1 cgroups.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-29 12:14:59 -07:00
Danny Canter
f3b7436b61 Platforms: Add From/ToProto helpers for types
Helpers to convert from a slice of platforms to our protobuf representation
and vice-versa appear a couple times. It seems sane to just expose this facility
in the platforms pkg.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-28 19:54:56 -07:00
Danny Canter
b3ab1f26c4 Snapshots: Add From/ToProto helpers for types
Helpers to convert from snapshot types to their protobuf structures and
vice-versa appear three times. It seems sane to just expose this facility
in the snapshots pkg. From/ToKind weren't used anywhere but doesn't hurt to
round out the types by exposing them.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-28 12:17:52 -07:00
Danny Canter
0a6b8f0ee0 OCI: Add From/ToProto helpers for Descriptor
Helpers to convert from the OCI image specs [Descriptor] to its protobuf
structure for Descriptor and vice-versa appear three times. It seems sane
to just expose this facility in /oci.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-28 12:16:20 -07:00
Kazuyoshi Kato
81bc6ce6e9
Merge pull request #8740 from djdongjin/platform-parseall
Add a platform.ParseAll helper
2023-06-28 08:01:12 -07:00
Kazuyoshi Kato
5d4504c196
Merge pull request #8758 from djdongjin/ginkgo
Update ginkgo to match cri-tools' version
2023-06-28 07:58:34 -07:00
Kazuyoshi Kato
a3c9ed7092
Merge pull request #8752 from neersighted/name_to_handle_at
seccomp: always allow name_to_handle_at
2023-06-28 07:58:07 -07:00
Jin Dong
4df27fd774 Update ginkgo to match cri-tools' version
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-28 13:14:22 +00:00
Bjorn Neergaard
9a202e342b
seccomp: always allow name_to_handle_at
This syscall is used by systemd to request unique internal names for
paths in the cgroup hierarchy from the kernel, and is overall innocuous.

Due to [previous][1] [mistakes][2] in moby/moby, it ended up attached to
`CAP_SYS_ADMIN`; however, it should not be filtered at all.

An in-depth analysis is available [at moby/moby][3].

  [1]: a01c4dc8f8 (diff-6c0d906dbef148d2060ed71a7461907e5601fea78866e4183835c60e5d2ff01aR1627-R1639)
  [2]: c1ca124682
  [3]: https://github.com/moby/moby/pull/45766#pullrequestreview-1493908145

Co-authored-by: Vitor Anjos <bartier@users.noreply.github.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-28 05:50:24 -06:00
Danny Canter
55a8102ec1 mount: Add From/ToProto helpers
Helpers to convert from containerd's [Mount] to its protobuf structure for
[Mount] and vice-versa appear three times. It seems sane to just expose
this facility in /mount.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-28 04:03:18 -07:00
Danny Canter
e85352183e integration/client: Rework withBytesBuffers
All of the tests using this didn't need stdin/err (one of them not even
stdout), so we can just leave them "empty" and change to a withStdout
naming to make it more obvious.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-27 23:47:14 -07:00
Jin Dong
54a93c6c52 Make ptypes.Empty a var in contentserver
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-27 11:32:59 +00:00
Jin Dong
cdc90c8381 Remove duplicated code in content Copy
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-27 11:32:59 +00:00
Cardy.Tang
50376ec9ff remotes: allow FetchByDigest client to pass mediatype as header
accept mediatype header is required for some layers, add additional field for client.

Signed-off-by: Cardy.Tang <zuniorone@gmail.com>
2023-06-27 16:36:01 +08:00
Jin Dong
0a92661e69 Add a platform.ParseAll helper
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-26 20:34:37 +00:00
Kazuyoshi Kato
9b4ed8acc2
Merge pull request #8696 from fuweid/deflaky-blockfile
chore: deflake the blockfile testsuite
2023-06-26 09:54:33 -07:00
Fu Wei
b6abda73b8
Merge pull request #8728 from dcantah/rm-hcsshim-todo
Makefile: Remove hcsshim related TODO
2023-06-25 15:18:36 +08:00
Fu Wei
43ae9c26b8
Merge pull request #8729 from dcantah/integration-empty-windows
Integration: Align empty IO func on Windows
2023-06-25 15:17:23 +08:00
Fu Wei
e350c8ca94
Merge pull request #8711 from djdongjin/sb-metadata
Minor changes to sandbox metadata
2023-06-25 15:16:43 +08:00
Fu Wei
ef61125871
Merge pull request #8719 from alexcb/log-expired-leases
log when a lease expires
2023-06-25 14:09:04 +08:00
Phil Estes
1a5eaa9ad0
Merge pull request #8732 from thaJeztah/epoch_export_parse
pkg/epoch: extract parsing SOURCE_DATE_EPOCH to a function
2023-06-23 17:06:21 -04:00
Phil Estes
753e6d2f8e
Merge pull request #8731 from dcantah/rm-windows-file-todo
Reword Windows file related TODO
2023-06-23 16:59:27 -04:00
helen
e89d7204eb MergeStringSlices use sets
Signed-off-by: helen <haitao.zhang@daocloud.io>
2023-06-24 03:04:24 +08:00
Sebastiaan van Stijn
8760b87174
pkg/epoch: extract parsing SOURCE_DATE_EPOCH to a function
This introduces a ParseSourceDateEpoch function, which can be used
to parse "SOURCE_DATE_EPOCH" values for situations where those
values are not passed through an env-var (or the env-var has been
read through other means).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-23 17:32:02 +02:00
Sebastiaan van Stijn
9924e56f42
pkg/epoch: fix tests on macOS
These tests were failing on my macOS; could be the precision issue (like on
Windows), or just because they're "too fast".

    === RUN   TestSourceDateEpoch/WithoutSourceDateEpoch
        epoch_test.go:51:
                Error Trace:	/Users/thajeztah/go/src/github.com/containerd/containerd/pkg/epoch/epoch_test.go:51
                Error:      	Should be true
                Test:       	TestSourceDateEpoch/WithoutSourceDateEpoch
                Messages:   	now: 2023-06-23 11:47:09.93118 +0000 UTC, v: 2023-06-23 11:47:09.93118 +0000 UTC

This patch:

- updates the rightAfter utility to allow the timestamps to be "equal"
- updates the asserts to provide some details about the timestamps
- uses UTC for the value we're comparing to, to match the timestamps
  that are generated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-23 17:29:55 +02:00
Danny Canter
dfd7ad8b37 Reword Windows file related TODO
https://github.com/golang/go/issues/32088 was never accepted or implemented
in 1.14.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-23 05:42:44 -07:00
Sebastiaan van Stijn
44e2b26a87
pkg/epoch: replace some fmt.Sprintfs with strconv
Teeny-tiny optimizations:

    BenchmarkSprintf-10       37735996    32.31  ns/op  0 B/op  0 allocs/op
    BenchmarkItoa-10         591945836     2.031 ns/op  0 B/op  0 allocs/op
    BenchmarkFormatUint-10   593701444     2.014 ns/op  0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-23 13:10:58 +02:00
Danny Canter
f82d9b7991 Integration: Align empty IO func on Windows
I think NullIO is fine on Windows now. We have it as an option in ctr
and it's used for the pod sandbox container in CRI. Lets see if CI agrees..

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-22 20:05:34 -07:00
Phil Estes
13498a3258
Merge pull request #8726 from djdongjin/write-content
Remove duplicated `writeIndex` func
2023-06-22 21:33:22 -04:00
Danny Canter
f3124d5693 Makefile: Remove hcsshim related TODO
There was a todo for the windows variant of dependency installation that
hinted at making an install-hcsshim.sh script, however Windows today doesn't
rely on a standalone OCI runtime binary that gets invoked by the shim. Rather,
container creation/management is all handled by the shim itself in-proc. Due to
this, `make` or `make binaries` basically fulfills that purpose as it
clones hcsshim and builds the shim along with containerd.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-22 17:53:09 -07:00
Jin Dong
2aeac9a8f6 Remove duplicated writeIndex func
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-22 22:48:24 +00:00
Phil Estes
2353574aa9
Merge pull request #8708 from marquiz/devel/cri-cleanup
cri: drop unused arg from generateRuntimeOptions
2023-06-22 15:12:48 -04:00
Phil Estes
733070b96a
Merge pull request #8717 from djdongjin/dedup-manifest-platform
Dedup config platform helper
2023-06-22 15:12:22 -04:00
Jin Dong
7601dd9a9e Dedup manifest config platform helper
It also removes a duplicated digest validate call

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-22 01:36:58 +00:00
Alex Couture-Beil
f3df7f7391
log when a lease expires
This makes it easier to debug GC-related issues, where a reference is
unexpectedly released.

Signed-off-by: Alex Couture-Beil <alex@mofo.ca>
2023-06-21 16:00:02 -07:00
Jin Dong
a01118bbed Minor changes to sandbox metadata
1. Reduce one bucket.Bucket call.
2. Use update helper instead of db.Update as in other functions.

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-20 20:41:17 +00:00
Kazuyoshi Kato
ad9d1a82f1
Merge pull request #8701 from djdongjin/gc
Remove unnecessary label bucket loop
2023-06-20 11:20:20 -07:00
Markus Lehtonen
f60a4a2718 cri: drop unused arg from generateRuntimeOptions
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-06-19 16:11:36 +03:00
Jin Dong
1fb835f042 Remove unnecessary label bucket loop
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-17 19:26:29 +00:00
Wei Fu
a207b430e3 snapshots/blockfile: fix lint issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-17 08:42:02 +08:00
Wei Fu
59b0b39af0 vendor: update github.com/containerd/continuity
Pin it with 1e0d26eb2381594984ee80989c9c229dbd930d9f

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-17 08:36:45 +08:00
Phil Estes
96de54db43
Merge pull request #8667 from djdongjin/premarshal-empty-resp
Save marshalled empty response in streaming service
2023-06-16 17:05:24 -04:00
Phil Estes
b8bd27a14e
Merge pull request #8697 from upodroid/fix-unbound-variable
Fix unbound variable used by Prow
2023-06-16 10:46:18 -04:00
upodroid
d358f1680f fix unbound variable
Signed-off-by: upodroid <cy@borg.dev>
2023-06-15 21:18:20 +01:00
Kay Yan
f4ad68d5f2 fix-push-image-rate
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2023-06-15 19:08:03 +00:00
Wei Fu
7de95cbc4c snapshots/blockfile: deflaky the testsuite
* Use direct-io mode to reduce IO.

* Add testViewHook helper to recovery the backing file since the ext4
  might need writable permission to handle recovery. If the backing file
  needs recovery and it's for View snapshot, the readonly mount will
  cause error.

* Use 8 MiB as capacity to reduce the IO.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-15 23:54:06 +08:00
Wei Fu
6dfb16f99a snapshots|pkg: umount without DETACH and nosync after umount
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-15 23:53:47 +08:00
Wei Fu
72b7d16505 mount: support direct-io for loopback device
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-15 23:51:46 +08:00
Kazuyoshi Kato
ded713010c
Merge pull request #8617 from corhere/reduce-exec-lock-contention
runtime/v2/runc: handle early exits w/o big locks
2023-06-14 15:55:07 -07:00
Derek McGowan
0ae64ebd4e
Merge pull request #8680 from dcantah/sb-metrics
Sandbox: Add SandboxMetrics rpc
2023-06-14 18:11:18 +00:00
Derek McGowan
70f30b2e09
Merge pull request #8692 from mxpv/merge-queues
Don't run CI on push
2023-06-14 18:11:04 +00:00
Maksym Pavlenko
437f134107 Don't run CI on push
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-06-14 11:04:07 -07:00
Jin Dong
e26c97cb8b Save marshalled empty response in streaming service
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-14 18:02:58 +00:00
Maksym Pavlenko
3065aa2aae
Merge pull request #8684 from djdongjin/nsmap-rwmutex
Use RWMutex in NSMap and reduce lock area
2023-06-14 17:52:39 +00:00
Jin Dong
9e09bfb590 Use RWMutex in NSMap and reduce lock area
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-14 17:50:54 +00:00
Derek McGowan
78b4af74a4
Merge pull request #8685 from estesp/no-nondistributable-layers
No more nondistributable layers in MS registry
2023-06-14 17:46:21 +00:00
Phil Estes
38b0f970f0
No more nondistributable layers in MS registry
Microsoft announced the removal of nondistributable layers from their
images today. This makes the convert test fail since it assumes the
first layer is nondistributable on Windows during the test.

Signed-off-by: Phil Estes <estesp@amazon.com>
2023-06-13 16:34:44 -04:00
Kazuyoshi Kato
0f6a70d970
Merge pull request #8676 from dmcgowan/overlay-options
[overlay] add configurable mount options to overlay snapshotter
2023-06-13 09:55:24 -07:00
Danny Canter
d278d37caa Sandbox: Add Metrics rpc for controller
As a follow up change to adding a SandboxMetrics rpc to the core
sandbox service, the controller needed a corresponding rpc for CRI
and others to eventually implement.

This leaves the CRI (non-shim mode) controller unimplemented just to
have a change with the API addition to start.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-13 00:24:09 -07:00
Derek McGowan
d115129d1e
Add configurable mount options to overlay
Allows default mount options to be provided through configuration.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-06-12 09:17:07 -07:00
Danny Canter
d56722ef2a Sandbox: Add SandboxMetrics rpc
To gather metrics/stats about a specific sandbox instance, it'd be nice to
have a dedicated rpc for this. Due to the same "what kind of stats are going
to be returned" dilemma exists for sandboxes as well, I've re-used the metrics
type we have as the data field is just an `any`, leaving the metrics returned
entirely up to the shim author. For CRI usecases this will just be cgroup and
windows stats as that's all that's supported right now.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-12 03:30:48 -07:00
Derek McGowan
dd5e9f6538
Merge pull request #7944 from adisky/new-pinned-image
CRI Pinned image support
2023-06-10 22:29:34 -07:00
Derek McGowan
98b7dfb870
Merge pull request #8673 from thaJeztah/no_any
avoid "any" as variable name
2023-06-10 20:44:30 -07:00
Kazuyoshi Kato
cf52175301
Merge pull request #8672 from thaJeztah/save_some_trees
replace some basic uses of fmt.Sprintf()
2023-06-10 17:46:03 -07:00
Sebastiaan van Stijn
4bb709c018
avoid "any" as variable name
Avoid shadowing / confusion with Go's "any" built-in type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-10 13:49:06 +02:00
Sebastiaan van Stijn
577696f608
replace some basic uses of fmt.Sprintf()
Really tiny gains here, and doesn't significantly impact readability:

    BenchmarkSprintf
    BenchmarkSprintf-10    11528700     91.59 ns/op   32 B/op  1 allocs/op
    BenchmarkConcat
    BenchmarkConcat-10    100000000     11.76 ns/op    0 B/op  0 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-10 13:24:43 +02:00
Cory Snider
5cd6210ad0 runtime/v2/runc: handle early exits w/o big locks
eventSendMu is causing severe lock contention when multiple processes
start and exit concurrently. Replace it with a different scheme for
maintaining causality w.r.t. start and exit events for a process which
does not rely on big locks for synchronization.

Keep track of all processes for which a Task(Exec)Start event has been
published and have not yet exited in a map, keyed by their PID.
Processing exits then is as simple as looking up which process
corresponds to the PID. If there are no started processes known with
that PID, the PID must either belong to a process which was started by
s.Start() and before the s.Start() call has added the process to the map
of running processes, or a reparented process which we don't care about.
Handle the former case by having each s.Start() call subscribe to exit
events before starting the process. It checks if the PID has exited in
the time between it starting the process and publishing the TaskStart
event, handling the exit if it has. Exit events for reparented processes
received when no s.Start() calls are in flight are immediately
discarded, and events received during an s.Start() call are discarded
when the s.Start() call returns.

Co-authored-by: Laura Brehm <laurabrehm@hey.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-06-09 16:53:43 -04:00
Derek McGowan
ee2c8b79bf
Merge pull request #8664 from laurazard/timeout-integration-test-shim-oomscore
integration/client: add timeout to `TestShimOOMScore`
2023-06-09 11:49:48 -07:00
Laura Brehm
df280942a7
integration/client: add timeout to TestShimOOMScore
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-06-09 10:10:42 +01:00
Kazuyoshi Kato
326cd0623e
Merge pull request #8362 from gabriel-samfira/fix-non-c-volume
Fix non C volumes on Windows
2023-06-08 21:07:23 -07:00
Gabriel Adrian Samfira
6dd529e400
Pass in imagespec.Platform to WithVolumes()
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-06-08 12:31:04 +03:00
Derek McGowan
67349c1141
Merge pull request #8643 from laurazard/io-close-before-cancel
task: don't `close()` io before `cancel()`
2023-06-07 12:29:36 -07:00
Derek McGowan
b03103152a
Merge pull request #8652 from hangscer8/release_ticker_correctly
fix release `ticker` correctly in `HandleProgress`
2023-06-07 10:47:00 -07:00
Phil Estes
0a821b968c
Merge pull request #8633 from jsturtevant/fix-for-init-containers-windows-pod-stats
[CRI] Windows Pod Stats: Add a check to skip stats for containers that are not running.
2023-06-07 13:29:27 -04:00
Samuel Karp
d9ff3236bd
Merge pull request #8645 from cpuguy83/otlp_from_env 2023-06-07 02:05:23 -07:00
hang.jiang
d18026592f release ticker correctly
Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
2023-06-07 11:45:38 +08:00
James Sturtevant
28a5199ff6
Add a check to skip stats for containers that are not running
When a container is just created, exited state the container will not have stats. A common case for this in k8s is the init containers for a pod. The will be present in the listed containers but will not have a running task and there for no stats.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-06-06 12:59:56 -07:00
Derek McGowan
87dbdd2ca1
Merge pull request #8572 from Jenkins-J/proto-docs
Document Protocol Buffer Setup
2023-06-06 10:36:34 -07:00
Laura Brehm
34a93a0c2c task: don't close() io before cancel()
The contract for `cio/io.go/IO` states that a call to `Close()`
will always be preceded by a call to `Cancel()` -
f3a07934b4/cio/io.go (L59)
which isn't being held up here.

Furthermore, the call to `Close()` here makes the subsequent `Wait()`
moot, and causes issues to consumers (see: https://github.com/moby/moby/issues/45689)

It seems from
f3a07934b4/task.go (L338)
that the `Close()` should be called there, the call removed in this
commit is unnecessary/erroneous.

We leave the `Close()` call on Windows only since this was introduced
in https://github.com/containerd/containerd/pull/5974 to address
https://github.com/containerd/containerd/issues/5621.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2023-06-06 11:03:35 +01:00
Akihiro Suda
1f54e8fb21
Merge pull request #8637 from AkihiroSuda/followup-8606
RELEASES.md: de-deprecation of CNI conf_template will be v1.7.3
2023-06-06 17:19:41 +09:00
Samuel Karp
f92e576f6b
Merge pull request #8609 from samuelkarp/issue-8607 2023-06-05 10:31:45 -07:00
Brian Goff
007c5b6e35 Setup otlp from env
This allows standard OTLP env vars to be used for configuring tracing
exporters.

Note: This does mean that, as written now, if no env var is set the
trace exporter will try to connect to the default OTLP address
(`localhost:4318`).
I've left this alone for now, but we could detect the OTLP vars
ourselves and if not set don't configure the exporter.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-06-05 16:42:39 +00:00
Phil Estes
4281a9550e
Merge pull request #8641 from cpuguy83/update_x_sys
Update x/sys to 0.8.0
2023-06-05 09:32:12 -04:00
Brian Goff
104b9ef9eb Update x/sys to 0.8.0
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-06-03 16:14:38 +00:00
Akihiro Suda
69b451af5a
RELEASES.md: de-deprecation of CNI conf_template will be v1.7.3
Cherry-pick of PR 8606 missed the v1.7.2 milestone

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-06-03 17:04:14 +09:00
Samuel Karp
f3a07934b4
Merge pull request #8628 from hangscer8/clean_atomicBool 2023-06-02 17:07:10 -07:00
Samuel Karp
ab53652228
ctr: update WritePidFile to use atomicfile
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-06-02 16:56:34 -07:00
Samuel Karp
c409c631ca
shim: WritePidFile & WriteAddress use atomicfile
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-06-02 16:56:34 -07:00
Samuel Karp
3c4a1ab1cb
cri: write generated CNI config atomically on Unix
The 10-containerd-net.conflist file generated from the conf_template
should be written atomically so that partial writes are not visible to
CNI plugins. Use the new consistentfile package to ensure this on
Unix-like platforms such as Linux, FreeBSD, and Darwin.

Fixes https://github.com/containerd/containerd/issues/8607

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-06-02 16:56:34 -07:00
Samuel Karp
f3ba7c8a35
atomicfile: new package for atomic file writes
Certain files may need to be written atomically so that partial writes
are not visible to other processes. On Unix-like platforms such as
Linux, FreeBSD, and Darwin, this is accomplished by writing a temporary
file, syncing, and renaming over the destination file name. On Windows,
the same operations are performed, but Windows does not guarantee that a
rename operation is atomic.

Partial/inconsistent reads can occur due to:
1. A process attempting to read the file while containerd is writing it
   (both in the case of a new file with a short/incomplete write or in
   the case of an existing, updated file where new bytes may be written
   at the beginning but old bytes may still be present after).
2. Concurrent goroutines in containerd leading to multiple active
   writers of the same file.

The above mechanism explicitly protects against (1) as all writes are to
a file with a temporary name.

There is no explicit protection against multiple, concurrent goroutines
attempting to write the same file. However, atomically writing the file
should mean only one writer will "win" and a consistent file will be
visible.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-06-02 16:56:33 -07:00
hang.jiang
28d8c79de7 Replace atomicBool with the standard library atomic.Bool
Signed-off-by: hang.jiang <hang.jiang@daocloud.io>
2023-06-02 14:02:55 +08:00
Aditi Sharma
fe4f8bd884 Pinned image support
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2023-06-02 09:57:22 +05:30
Kazuyoshi Kato
8a6c8a96c0
Merge pull request #8626 from jsturtevant/fix-windows-podstats-for-hpc
Fix issue for HPC pod metrics
2023-06-01 19:25:08 -07:00
Derek McGowan
023128bd35
Merge pull request #8627 from davidhsingyuchen/cherry-pick-no-merge 2023-06-01 18:08:25 -07:00
Hsing-Yu (David) Chen
a85b12d4d0 docs: cherry-pick individual commits instead of merge commit
Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
2023-06-01 17:05:06 -07:00
James Sturtevant
738c4c6fa5
Fix issue for HPC pod metrics
The initial PR had a check for nil metrics but after some refactoring in the PR the test case that was suppose cover HPC was missing a scenario where the metric was not nil but didn't contain any metrics. This fixes that case and adds a testcase to cover it.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
2023-06-01 15:12:36 -07:00
Phil Estes
139146ade8
Merge pull request #8619 from thaJeztah/fix_deprecation_comments
remotes/docker: ResolverOptions: fix deprecation comments
2023-06-01 12:42:17 -04:00
Sebastiaan van Stijn
52997ea983
remotes/docker: ResolverOptions: fix deprecation comments
Go deprecation comments must be formatted to have an empty comment line before
them. Fix the formatting to make sure linters and editors detect that these
are deprecated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-01 09:28:12 +02:00
Fu Wei
83371c4bef
Merge pull request #8535 from cardyok/metrics_enrich_memory_cgroups
bugfix: add nil pointer check for cgroup v1 mem usage
2023-06-01 13:07:17 +08:00
Cardy.Tang
a35ead5b9d bugfix: add nil pointer check for cgroup v1 mem usage
Signed-off-by: Cardy.Tang <zuniorone@gmail.com>
2023-06-01 09:57:39 +08:00
Kazuyoshi Kato
73645b1dfe
Merge pull request #8588 from lengrongfu/feat/cleanup_config_tls
Cleanup DEPRECATED TLS config
2023-05-31 18:50:54 -07:00
Kazuyoshi Kato
45d78fb1f1
Merge pull request #8582 from chschumacher1994/patch-1
fix(docs): minor fix on the windows installation steps
2023-05-31 17:42:53 -07:00
Phil Estes
2da38b1939
Merge pull request #8605 from dmcgowan/events-cleanup-deprecated
Remove events from init context
2023-05-31 16:09:27 -04:00
Kazuyoshi Kato
659a41fd85
Merge pull request #8174 from Iceber/fix_ctr_run
ctr: fix the cleanup of task
2023-05-31 10:01:12 -07:00
Kazuyoshi Kato
9e834e761a
Merge pull request #8334 from davidhsingyuchen/fix-io-cancel
fix: cio.Cancel() should close the pipes
2023-05-31 09:58:36 -07:00
Kazuyoshi Kato
3ad032e9d0
Merge pull request #8606 from adisky/remove-conf-template-deprecation
Remove cni conf_template deprecation
2023-05-31 09:47:21 -07:00
Kazuyoshi Kato
a81f3fb817
Merge pull request #8525 from elezar/ctr-add-cdi-devices
Add support for CDI devices to ctr run command
2023-05-31 09:36:25 -07:00
Derek McGowan
2a60fe5a60
Remove events from init context
Events from the init context have been replaced by the events plugin

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-31 09:35:03 -07:00
Kazuyoshi Kato
30354134d4
Merge pull request #8553 from aznashwan/windows-workflow-2019-base-sku
Windows Integration: Switch Azure-based CI to vanilla 2019 image.
2023-05-31 09:29:14 -07:00
Evan Lezar
d3887b2e62 Support CDI devices in ctr --device flag
This change adds support for CDI devices to the ctr --device flag.
If a fully-qualified CDI device name is specified, this is injected
into the OCI specification before creating the container.

Note that the CDI specifications and the devices that they represent
are local and mirror the behaviour of linux devices in the ctr command.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2023-05-31 16:14:01 +02:00
Phil Estes
80eb76332e
Merge pull request #8602 from mxpv/sbevents
Publish sandbox events
2023-05-31 09:14:08 -04:00
Akihiro Suda
65bca439a9
Merge pull request #8599 from lengrongfu/doc/update-auths-code-comment
update auths code comment
2023-05-31 22:13:54 +09:00
Phil Estes
bd7f543869
Merge pull request #8601 from rye-stripe/add-ctr-run-flags
Add cpuset flags to 'ctr run'
2023-05-31 09:11:26 -04:00
Aditi Sharma
3ca5b4437e Remove cni conf_template deprecation
As discussed in the issue
https://github.com/containerd/containerd/issues/8596
It is a helpful feature at many places and no replacement
readily available

Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2023-05-31 17:34:33 +05:30
Samuel Karp
8454b23ead
Merge pull request #8597 from thaJeztah/unpack_nits
Image: fix some minor nits
2023-05-31 02:06:48 -07:00
Sebastiaan van Stijn
94f0af3ece
Image.IsUnpacked(): make error-handling more iodiomatic
Check for "err != nil" instead of "err == nil".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-31 09:47:48 +02:00
Sebastiaan van Stijn
54658a1152
Image: rename variable that shadowed import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-31 09:47:27 +02:00
rongfu.leng
d2b7a1e293 cleanup DEPRECATED TLS config
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-05-31 09:37:41 +08:00
Samuel Karp
8b66a752c9
Merge pull request #7376 from tianon/oci-platform 2023-05-30 18:14:31 -07:00
Maksym Pavlenko
f857626d64 Move PLEG event back to CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 16:40:58 -07:00
Maksym Pavlenko
fc50334ca9 Generate sandbox exit events from CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 16:40:58 -07:00
Derek McGowan
c7b9a95bdc
Merge pull request #8603 from cji/cji-mount
Add handling of a '.' commondir and bounds checking to mount_linux
2023-05-30 16:27:54 -07:00
Craig Ingram
d2605de734 add handling of a '.' commondir and bounds checking to mount_linux
Signed-off-by: Craig Ingram <Cjingram@google.com>
2023-05-30 21:13:16 +00:00
Maksym Pavlenko
cf56054594 Move pod sandbox recovery to podsandbox/ package
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Maksym Pavlenko
45dbb4e542 Publish sandbox events
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Maksym Pavlenko
65906335bf Add sandbox events protos
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Tianon Gravi
21b3318ebe Fix several conversions of "ocispec.Image" to "ocispec.Platform"
Several bits of code unmarshal image config JSON into an `ocispec.Image`, and then immediately create an `ocispec.Platform` out of it, but then discard the original image *and* miss several potential platform fields (most notably, `variant`).

Because `ocispec.Platform` is a strict subset of `ocispec.Image`, most of these can be updated to simply unmarshal the image config directly to `ocispec.Platform` instead, which allows these additional fields to be picked up appropriately.

We can use `tianon/raspbian` as a concrete reproducer to demonstrate.

Before:

```console
$ ctr content fetch docker.io/tianon/raspbian:bullseye-slim
...

$ ctr image ls
REF                                     TYPE                                                 DIGEST                                                                  SIZE     PLATFORMS    LABELS
docker.io/tianon/raspbian:bullseye-slim application/vnd.docker.distribution.manifest.v2+json sha256:66e96f8af40691b335acc54e5f69711584ef7f926597b339e7d12ab90cc394ce 28.6 MiB linux/arm/v7 -
```

(Note that the `PLATFORMS` column lists `linux/arm/v7` -- the image itself is actually `linux/arm/v6`, but one of these bits of code leads to only `linux/arm` being extracted from the image config, which `platforms.Normalize` then updates to an explicit `v7`.)

After:

```console
$ ctr image ls
REF                                     TYPE                                                 DIGEST                                                                  SIZE     PLATFORMS    LABELS
docker.io/tianon/raspbian:bullseye-slim application/vnd.docker.distribution.manifest.v2+json sha256:66e96f8af40691b335acc54e5f69711584ef7f926597b339e7d12ab90cc394ce 28.6 MiB linux/arm/v6 -
```

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-30 13:13:02 -07:00
Derek McGowan
6d7060099b
Merge pull request #8552 from dcantah/cross-plat-stats
CRI: Make stats respect sandbox's platform
2023-05-30 09:58:50 -07:00
Derek McGowan
197b27bd02
Merge pull request #8586 from mcdonagj/fix-spelling-of-repository-in-nri-docs
Fix: Correct the spelling of repository within the NRI plugin documentation.
2023-05-30 09:27:44 -07:00
Peteris Rudzusiks
f2bc737825 Add cpuset-mems flag to 'ctr run' command
This flag allows cpuset.mems to be specified when running a container. If
provided, the container will use only the defined memory nodes.

Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
2023-05-30 17:56:18 +02:00
Peteris Rudzusiks
f642c0a5f5 ctr: add cpuset-cpus flag to 'ctr run' command
This flag allows cpuset.cpus to be specified when starting a container. If
provided, the container will use only the defined CPU cores.

Signed-off-by: Peteris Rudzusiks <rye@stripe.com>
2023-05-30 17:50:33 +02:00
Derek McGowan
f49789fd54
Merge pull request #8594 from fuweid/fix-blockfile-mount
snapshots/blockfile: use loop if options is empty
2023-05-30 08:33:09 -07:00
Derek McGowan
8e90799d1c
Merge pull request #8595 from cardyok/scratch_generator_use_dst
snapshots/blockfile: use passed in dst in scratchGenerator
2023-05-30 08:32:27 -07:00
rongfu.leng
314d758fa1 update auths code comment
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-05-30 23:05:48 +08:00
Cardy.Tang
9702d4aeec snapshots/blockfile: use passed in dst in scratchGenerator
Signed-off-by: Cardy.Tang <zuniorone@gmail.com>
2023-05-30 11:42:19 +08:00
Wei Fu
bb82f3683e snapshots/blockfile: use loop if options is empty
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-29 23:26:39 +08:00
Samuel Karp
4b7145cfd3
Merge pull request #8587 from lengrongfu/feat/upgrade_pause_version 2023-05-29 00:55:22 -07:00
rongfu.leng
9287711b7a upgrade registry.k8s.io/pause version
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
2023-05-28 07:59:10 +08:00
Gary McDonald
fbb38ab6b8
Fix the spelling of repository within the NRI plugin documentation.
Signed-off-by: Gary McDonald <mcdonagj@dukes.jmu.edu>
2023-05-27 13:18:46 -04:00
chschumacher1994
752e13d9a9
fix(docs): minor fix on the windows installation steps
If this command is used without "-Container:$false" and the "containerd" directory does not already exist all files will be merged into a single "containerd" file instead of a new directory.

Signed-off-by: chschumacher1994 <115921143+chschumacher1994@users.noreply.github.com>
2023-05-27 01:35:42 +02:00
Samuel Karp
d0dba8e163
Merge pull request #8576 from henry118/ready 2023-05-26 14:41:57 -07:00
Nashwan Azhari
c1b9268007 Windows Integration: Switch Azure-based CI to vanilla 2019 image.
This patch switches the Azure-based Windows workflows to using the
vanilla `2019-Datacenter` Azure SKU following the deprecation of the
old specialized `2019-Datacenter-with-Containers-smalldisk` SKU which
was previously used.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2023-05-26 21:26:05 +03:00
Gabriel Adrian Samfira
b9dfd29b73 Update tests to use volume-copy-up:2.2
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-26 07:33:06 +00:00
Henry Wang
4bfcac85fa notify readiness when registered plugins are ready
Signed-off-by: Henry Wang <henwang@amazon.com>
2023-05-26 03:07:40 +00:00
Kazuyoshi Kato
ed7c0ebe28
Merge pull request #8573 from estesp/fix-test-image-index-static-content
Update volume-ownership image with latest hashes
2023-05-25 11:23:52 -07:00
James Jenkins
7819da843b Document Protocol Buffer Setup
Document the protocol buffer setup script and make note of external
proto files that must be added for successful generation.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2023-05-25 12:14:07 -04:00
Phil Estes
579b5596c5 Update volume-ownership image with latest hashes
Fixes test which requires static content to match a GHCR-located image which was recently updated.

Signed-off-by: Phil Estes <estesp@amazon.com>
2023-05-25 11:13:57 -04:00
Gabriel Adrian Samfira
88a3e25b3d Add targetOS to WithVolumes()
Windows systems are capable of running both Windows Containers and Linux
containers. For windows containers we need to sanitize the volume path
and skip non-C volumes from the copy existing contents code path. Linux
containers running on Windows and Linux must not have the path sanitized
in any way.

Supplying the targetOS of the container allows us to proprely decide
when to activate that code path.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-25 09:38:34 +00:00
Gabriel Adrian Samfira
c7ec95caf4 Reword comment and make slight change to code
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-25 09:38:34 +00:00
Gabriel Adrian Samfira
ec2bec6481 Fix non C volumes on Windows
Images may be created with a VOLUME stanza pointed to drive letters that
are not C:. Currently, an image that has such VOLUMEs defined, will
cause containerd to error out when starting a container.

This change skips copying existing contents to volumes that are not C:.
as an image can only hold files that are destined for the C: drive of a
container.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-25 09:38:34 +00:00
Samuel Karp
b16b0c872d
Merge pull request #8559 from dmcgowan/blockfile-add-mount-options 2023-05-24 14:46:48 -07:00
Samuel Karp
3d7522b7f2
ctr: allow run to override mounts
If a mount destination is specified both in the default spec and in a
--mount option, remove the default mount before adding new mounts.  This
allows overriding the default sysfs mount, for example.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-05-24 13:54:40 -07:00
Derek McGowan
5997a65896
Merge pull request #8554 from ktock/remote-snapshotter-docs
docs/remote-snapshotter.md: update links and description
2023-05-23 12:18:21 -07:00
Derek McGowan
7beaa5e859
Add mount options to blockfile snapshotter
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-23 10:56:20 -07:00
Kohei Tokunaga
261d45efe1
docs/remote-snapshotter.md: update links and description
This commit fixes a broken link. This commit also updates the description about
the image handler. It now mentions about
`github.com/containerd/containerd/pkg/snapshotters` package.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-05-23 22:55:57 +09:00
Danny Canter
7274e33e38 CRI: Make stats respect sandbox's platform
To further some ongoing work in containerd to make as much code as possible
able to be used on any platform (to handle runtimes that can virtualize/emulate
a variety of different OSes), this change makes stats able to be handled on
any of the supported stat types (just linux and windows). To accomplish this,
we use the platform the sandbox returns from its `Platform` rpc to decide
what format the containers in a given sandbox are returning metrics in, then
we can typecast/marshal accordingly.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-23 01:32:36 -07:00
Fu Wei
773874caea
Merge pull request #8547 from zhaojizhuang/bolt
[sandbox] Optimize metadata Schema notes to correctly match metadata structures
2023-05-23 15:32:47 +08:00
Derek McGowan
65c7c92792
Merge pull request #8534 from gabriel-samfira/fix-image-workflow
Fix image workflow
2023-05-22 19:20:36 -07:00
Derek McGowan
44df496d75
Merge pull request #8542 from cardyok/feat_overlay_sync_remove
feat: make overlay sync removal configurable
2023-05-22 17:29:45 -07:00
Derek McGowan
ca5d6b6bad
Merge pull request #8531 from cardyok/bugfix_mount_path_symlink
bugfix: resolve symlink when looking up mountpoint
2023-05-22 17:06:16 -07:00
zhaojizhuang
82deabf9db Optimize metadata Schema notes to correctly match metadata structures
1. Add sandboxes object
2. Optimize indentation of parent and child objects

Signed-off-by: zhaojizhuang <571130360@qq.com>
2023-05-22 16:18:58 +08:00
Cardy.Tang
a6cd5e3f4f bugfix: resolve symlink when looking up mountpoint
Signed-off-by: Cardy.Tang <zuniorone@gmail.com>
2023-05-22 11:03:51 +08:00
Cardy.Tang
b9f2e48e37 feat: make overlay sync removal configurable
Signed-off-by: Cardy.Tang <zuniorone@gmail.com>
2023-05-19 16:32:10 +08:00
Gabriel Adrian Samfira
becf04a59a Update to docker/login-action V2
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-19 00:13:08 +03:00
Gabriel Adrian Samfira
79709a2058 disable provenance
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-19 00:01:05 +03:00
Akihiro Suda
878132923d
Merge pull request #8511 from dmcgowan/blockfile-snapshotter
Add blockfile snapshotter
2023-05-18 11:52:37 +09:00
Derek McGowan
1be571b14f
Add sync before unmount on snapshotter layer test
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-17 14:25:27 -07:00
Derek McGowan
b729962e3e
Add blockfile snapshotter to snapshotters doc
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-17 14:25:27 -07:00
Derek McGowan
798dba9faa
Add blockfile as a builtin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-17 14:25:27 -07:00
Derek McGowan
0c386e2ebd
Add blockfile snapshotter
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-17 14:25:27 -07:00
Phil Estes
1498a6dde9
Merge pull request #8526 from fuweid/fuweid/chore-update-comment
chore: update comment for NetworkPluginSetupSerially
2023-05-17 13:11:14 -04:00
Derek McGowan
44eb8f3466
Merge pull request #8524 from gabriel-samfira/update-volume-copy-up
Update volume-copy-up
2023-05-17 09:28:40 -07:00
Fu Wei
8b6889b8e2
Merge pull request #8522 from AkihiroSuda/continuity-v0.4.0 2023-05-17 23:07:10 +08:00
Wei Fu
d280cb83b6 chore: update comment for NetworkPluginSetupSerially
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-17 22:39:10 +08:00
Gabriel Adrian Samfira
f8907ab872
Update volume-copy-up
Add new test cases for volumes on both Linux and Windows. These new
volumes will be used to test that we don't accidentally mangle volume
paths on Linux and that non-C volume mounts work properly when defined
in an image on Windows.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-05-17 14:20:37 +03:00
Akihiro Suda
f35a105cf0
Merge pull request #8521 from AkihiroSuda/go-runc-v1.1.0
go.mod: github.com/containerd/go-runc v1.1.0
2023-05-17 20:02:36 +09:00
Akihiro Suda
811456b314
go.mod: github.com/containerd/continuity v0.4.0
https://github.com/containerd/continuity/compare/72c70feb3081...v0.4.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-17 19:50:20 +09:00
Akihiro Suda
6f715ab101
go.mod: github.com/containerd/go-runc v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-17 13:45:37 +09:00
Fu Wei
8c21759d7c
Merge pull request #8401 from Iceber/fix_checkpoint_config_content 2023-05-17 10:04:49 +08:00
Phil Estes
7a5a4ecfed
Merge pull request #8518 from dims/bump-seccomp-version-to-be-the-same-as-one-in-runc-repo
Bump seccomp version to be the same as one in runc repo
2023-05-16 09:04:31 -07:00
Samuel Karp
c60ba138b6
Merge pull request #8502 from mstmdev/fix-typos 2023-05-16 08:41:02 -07:00
Davanum Srinivas
85cf9a09e8
Bump seccomp version to be the same as one in runc repo
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-05-16 09:33:26 -04:00
mstmdev
cdaa4025e9 Fix some typos
Signed-off-by: Pan Yibo <mstmdev@gmail.com>
2023-05-16 10:12:50 +08:00
Akihiro Suda
8eea15f891
Merge pull request #8464 from dcantah/user-nonlinux
CRI: Support Linux username for !linux platforms
2023-05-14 22:28:51 +09:00
Iceber Gu
3d9dd2022d ctr: fix the cleanup of task
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-05-12 18:28:47 +08:00
Fu Wei
e52fbfd5c1
Merge pull request #8507 from AkihiroSuda/test-rename-fuse-overlayfs
snapshots/testsuite: Rename: fix fuse-overlayfs incompatibility
2023-05-12 07:33:19 +08:00
Danny Canter
66307d0b4e CRI: Support Linux usernames for !linux platforms
The oci.WithUser option was being applied in container_create_linux.go
instead of the cross plat buildLinuxSpec method. There's been recent
work to try and make every spec option that can be applied on any platform
able to do so, and this falls under that. However, WithUser on linux platforms
relies on the containers SnapshotKey being filled out, which means the spec
option needs to be applied during container creation.

To make this a little more generic, I've created a new platformSpecOpts
method that handles any spec opts that rely on runtime state (rootfs mounted
for example) for some platforms, or just platform options that we still don't
have workarounds for to be able to specify them for other platforms
(apparmor, seccomp etc.) by internally calling the already existing
containerSpecOpts method.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-11 12:32:24 -07:00
Akihiro Suda
2eeb4b6238
Merge pull request #8373 from Iceber/shim_run
runtime/shim: rename RunManager to Run and remove `runc/v2/services` package
2023-05-12 00:46:46 +09:00
Akihiro Suda
5dbae38191
snapshots/testsuite: Rename: fix fuse-overlayfs incompatibility
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-11 16:59:53 +09:00
Phil Estes
f84b2b47b0
Merge pull request #8488 from helen-frank/feature/cacheDiffIDs
cache image diffIDs
2023-05-10 15:23:09 -07:00
Derek McGowan
14d22efccc
Merge pull request #8254 from gabriel-samfira/fix-access-denied-on-vhdx-mount
Fix access denied on mounted vhdx root
2023-05-10 08:39:36 -07:00
Fu Wei
dc60137467
Merge pull request #8252 from bart0sh/PR008-CDI-use-CRI-field
CDI: Use CRI Config.CDIDevices field for CDI injection
2023-05-10 21:16:49 +08:00
Akihiro Suda
18eb99029b
Merge pull request #8498 from AkihiroSuda/image-spec-v1.1.0-rc.3
go.mod: github.com/opencontainers/image-spec v1.1.0-rc3
2023-05-10 20:44:00 +09:00
Derek McGowan
49029b75ba
Merge pull request #7316 from thaJeztah/plugin_less_restrictive
plugin: remove go < 1.8 stub, enable on windows and arm64
2023-05-09 22:29:44 -07:00
Fu Wei
bd185813ac
Merge pull request #8504 from dcantah/close-f-early
Simplify closing bundle dir fd
2023-05-10 10:09:01 +08:00
Derek McGowan
b0f587d65d
Merge pull request #8487 from samuelkarp/setup-go-v4-disable-cache
.github: disable cache for actions/setup-go@v4
2023-05-09 17:30:30 -07:00
Danny Canter
df65e321ee Simplify closing bundle dir fd
Follow-up to #8489. We don't need to call Close in the err and success
cases, we can just do it after Readdirnames returns.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-09 17:22:04 -07:00
Derek McGowan
a28606ec1b
Merge pull request #8503 from fahedouch/improve-Task-comment
improve container Task comment
2023-05-09 16:49:55 -07:00
Phil Estes
25ae976de3
Merge pull request #8497 from dmcgowan/update-ttrpc-1.2.2 2023-05-09 16:44:57 -07:00
Derek McGowan
718250b6ba
Update ttrpc to v1.2.2
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-05-09 13:08:46 -07:00
Phil Estes
c6d7e45c14
Merge pull request #8496 from ktock/golangci-lint-1.52.2
Bump up golangci-lint to v1.52.2
2023-05-09 13:03:06 -07:00
fahed dorgaa
7e42dc34d4
improve container Task comment
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
2023-05-09 20:15:53 +02:00
Phil Estes
43bbffba37
Merge pull request #8500 from AkihiroSuda/runtime-spec-v1.1.0-rc.2
go.mod: github.com/opencontainers/runtime-spec v1.1.0-rc.2
2023-05-09 10:42:53 -07:00
Akihiro Suda
4347fc8bc2
go.mod: github.com/opencontainers/image-spec v1.1.0-rc3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-09 23:35:58 +09:00
Akihiro Suda
5e054ee631
go.mod: github.com/opencontainers/runtime-spec v1.1.0-rc.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-05-09 22:26:37 +09:00
helen
bb61a6d4ba cache diffIDs
Signed-off-by: helen <haitao.zhang@daocloud.io>
2023-05-09 16:32:51 +08:00
Fu Wei
465c804d22
Merge pull request #8489 from dcantah/readdirnames-fun
Change to Readdirnames for some cases
2023-05-09 15:43:36 +08:00
Fu Wei
82a251f92b
Merge pull request #8494 from Iceber/bump_typeurl
bump typeurl to v2.1.1
2023-05-09 15:41:07 +08:00
Kohei Tokunaga
6e2c915a44
Bump up golangci-lint to v1.52.2
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-05-09 15:07:55 +09:00
Iceber Gu
ecb693ec74 bump typeurl to v2.1.1
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-05-09 13:23:02 +08:00
Danny Canter
f5211ee3fc Change to Readdirnames for some cases
There was a couple uses of Readdir/ReadDir here where the only thing the return
value was used for was the Name of the entry. This is exactly what Readdirnames
returns, so we can avoid the overhead of making/returning a bunch of interfaces
and calling lstat everytime in the case of Readdir(-1).

https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/os/dir_unix.go;l=114-137

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-05-08 00:41:13 -07:00
Samuel Karp
e60a179255
.github: disable cache for actions/setup-go@v4
https://github.com/actions/setup-go/issues/368 and
https://github.com/opencontainers/runc/pull/3820#issuecomment-1501426479
discuss issues with the cache key for actions/setup-go@v4.  Rather than
reverting the upgrade to v4 (per discussion in
https://github.com/containerd/containerd/pull/8372), disable caching
explicitly.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-05-07 17:24:18 -07:00
Sebastiaan van Stijn
717169bb88
plugin: remove go < 1.8 stub, enable on windows and arm64
- we don't support go < 1.8. this restriction as added because plugin support
  requires go 1.8 or up, but with such old versions being EOL, this check was
  rather redundant
- add back arm64 support; in 6bd0710831, non-amd64
  was disabled, pending golang/go#17138, which was tracking arm64 support, and
  is now resolved. It's unclear if architectures other than amd64 and arm64 are
  supported, so keeping it restricted to amd64 and arm64.
- enable plugin support on Windows; it was disabled in 0b44e24c07
  but the code looks to take windows into account.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-05 18:12:46 +02:00
Iceber Gu
8ba285f6b2 fix unable to checkpoint the container more than once
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-25 14:36:25 +08:00
Ed Bartosh
cd16b31cd2 Get CDI devices from CRI Config.CDIDevices field
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2023-04-14 13:41:08 +03:00
Iceber Gu
4b35c3829d update shim example
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 11:42:21 +08:00
Iceber Gu
71ababe30a runtime/shim: remove runc/v2/services
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 11:42:21 +08:00
Iceber Gu
b71f4b7518 runtime/shim: rename RunManager to Run
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-04-14 11:42:21 +08:00
Paweł Gronowski
dfc7590d5a
remotes/docker: Add MountedFrom and Exists push status
This makes it possible to check whether content didn't actually need to
be pushed to the remote registry and was cross-repo mounted or already
existed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-04-07 10:38:37 +02:00
Gabriel Adrian Samfira
6f0714efcb Use RunWithPrivileges
RunWithPrivileges() will enable privileges will lock a thread, change
privileges, and run the function passed in, within that thread. This
allows us to limit the scope in which we enable privileges and avoids
accidentally enabling privileges in threads that should never have them.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-04-06 17:06:50 -07:00
Gabriel Adrian Samfira
b41ca11598 Fix access denied on mounted vhdx root
It seems that in certain situations, like having the containerd root
and state on a file system hosted on a mounted VHDX, we need
SeSecurityPrivilege when opening a file with winio.ACCESS_SYSTEM_SECURITY.
This happens in the base layer writer in hcsshim when adding a new file.

Enabling SeSecurityPrivilege allows the containerd root to be hosted on
a vhdx.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2023-04-06 17:06:50 -07:00
Derek McGowan
d0527e2283
Support for dropping inheritable capabilities
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-04-05 17:45:32 -07:00
Hsing-Yu (David) Chen
82ec62b865 fix: cio.Cancel() should close the pipes
PR fixes #8326.

Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
2023-03-30 18:39:21 -07:00
6787 changed files with 936998 additions and 268279 deletions

View File

@ -1,80 +0,0 @@
# Cirrus CI gives open-source projects free 16.0 CPUs,
# we use 4 CPUs x 3 tasks = 12 CPUs.
# https://cirrus-ci.org/faq/#are-there-any-limits
#
# Undocumented constraints;
# - The maximum memory limit is 4G times the number of CPUs.
# - The number of CPUs should be multiple of 2.
task:
name: Vagrant
compute_engine_instance:
image_project: cirrus-images
image: family/docker-kvm
platform: linux
nested_virtualization: true
cpu: 4
memory: 16G
env:
GOTEST: gotestsum --
# By default, Cirrus CI doesn't have HOME defined
HOME: /root
matrix:
BOX: fedora/37-cloud-base
# v7.0.0 does not boot. v6.0.0 was not released.
BOX: rockylinux/8@5.0.0
install_libvirt_vagrant_script: |
apt-get update
apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
systemctl enable --now libvirtd
vagrant_cache:
folder: /root/.vagrant.d
fingerprint_script: uname --kernel-release --kernel-version && cat Vagrantfile
vagrant_up_script: |
vagrant up --no-tty
integration_script: |
vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-integration
cri_integration_script: |
vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-cri-integration
cri_test_script: |
vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-cri
task:
name: CGroupsV2 - rootless CRI test
env:
HOME: /root
compute_engine_instance:
image_project: cirrus-images
image: family/docker-kvm
platform: linux
nested_virtualization: true
cpu: 4
memory: 16G
install_libvirt_vagrant_script: |
apt-get update
apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
systemctl enable --now libvirtd
vagrant_cache:
folder: /root/.vagrant.d
fingerprint_script: uname -a; cat Vagrantfile
vagrant_up_script: |
vagrant up --provision-with=install-rootless-podman --no-tty
podman_build_script: |
# Execute rootless podman to create the UserNS env
vagrant ssh -- podman build --target cri-in-userns -t cri-in-userns -f /vagrant/contrib/Dockerfile.test /vagrant
test_script: |
vagrant ssh -- podman run --rm --privileged cri-in-userns

View File

@ -12,7 +12,7 @@
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.20"
"version": "1.23.8"
}
},

16
.github/actions/install-go/action.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: "Setup Go"
description: "Reusable action to install Go, so there is one place to bump Go versions"
inputs:
go-version:
required: true
default: "1.23.8"
description: "Go version to install"
runs:
using: composite
steps:
- name: "Setup Go"
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
cache: false # see actions/setup-go#368

25
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
golang-x:
patterns:
- "golang.org/x/*"
k8s:
patterns:
- "k8s.io/*"
moby-sys:
patterns:
- "github.com/moby/sys/*"
otel:
patterns:
- "go.opentelemetry.io/*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

80
.github/workflows/api-release.yml vendored Normal file
View File

@ -0,0 +1,80 @@
on:
push:
tags:
- "api/v*" # Push events to matching api/v*, i.e. api/v1.0, api/v20.15.10
name: API Release
env:
GO_VERSION: "1.23.8"
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
check:
name: Check Signed Tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/api/v')
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
stringver: ${{ steps.contentrel.outputs.stringver }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref }}
path: src/github.com/containerd/containerd
- name: Check signature
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
TAGCHECK=$(git tag -v ${releasever} 2>&1 >/dev/null) ||
echo "${TAGCHECK}" | grep -q "error" && {
echo "::error::tag ${releasever} is not a signed tag. Failing release process."
exit 1
} || {
echo "Tag ${releasever} is signed."
exit 0
}
working-directory: src/github.com/containerd/containerd
- name: Release content
id: contentrel
run: |
RELEASEVER=${{ github.ref }}
echo "stringver=${RELEASEVER#refs/tags/api/v}" >> $GITHUB_OUTPUT
git tag -l ${RELEASEVER#refs/tags/} -n20000 | tail -n +3 | cut -c 5- >release-notes.md
working-directory: src/github.com/containerd/containerd
- name: Save release notes
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: containerd-release-notes
path: src/github.com/containerd/containerd/release-notes.md
release:
name: Create containerd Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/api/v')
permissions:
contents: write
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: [check]
steps:
- name: Download release notes
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: builds
- name: Create Release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
name: containerd API ${{ needs.check.outputs.stringver }}
draft: false
make_latest: false
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
body_path: ./builds/containerd-release-notes/release-notes.md

View File

@ -9,7 +9,7 @@ on:
azure_windows_image_id:
description: Windows image URN to deploy
required: true
default: MicrosoftWindowsServer:WindowsServer:2022-datacenter:20348.350.2111030009
default: MicrosoftWindowsServer:WindowsServer:2022-datacenter:latest
azure_vm_size:
description: Windows image builder VM size
required: true
@ -41,14 +41,12 @@ jobs:
working-directory: src/github.com/containerd/containerd
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20.4"
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- name: Set env
shell: bash
run: |
@ -74,18 +72,18 @@ jobs:
echo "SSH_PUB_KEY=$(cat ~/.ssh/id_rsa.pub)" >> $GITHUB_ENV
- name: Azure Login
uses: azure/login@v1
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
creds: ${{ secrets.AZURE_CREDS }}
- name: Create Azure Resource Group
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az group create -n ${{ env.AZURE_RESOURCE_GROUP }} -l ${{ github.event.inputs.azure_location }} --tags creationTimestamp=$(date +%Y-%m-%dT%T%z)
- name: Create Windows Helper VM
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
PASSWORD="$(/usr/bin/tr -dc "a-zA-Z0-9@#$%^&*()_+?><~\`;" < /dev/urandom | /usr/bin/head -c 24; echo '')"
@ -100,7 +98,7 @@ jobs:
az vm open-port --resource-group ${{ env.AZURE_RESOURCE_GROUP }} --name WinDockerHelper --port 2376 --priority 102
- name: Prepare Windows image helper
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
# Installs Windows features, opens SSH and Docker port
@ -122,7 +120,7 @@ jobs:
--parameters 'SSHPublicKey=${{ env.SSH_PUB_KEY }}'
- name: Get Windows Helper IPs
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
VM_DETAILS=$(az vm show -d -g ${{ env.AZURE_RESOURCE_GROUP }} -n WinDockerHelper -o json)
@ -144,7 +142,7 @@ jobs:
scp -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.PUBLIC_IP }}:/Users/azureuser/.docker/key.pem $HOME/.docker/key.pem
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
@ -163,7 +161,7 @@ jobs:
- name: Cleanup resources
if: always()
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az group delete -g ${{ env.AZURE_RESOURCE_GROUP }} --yes

View File

@ -3,19 +3,8 @@ on:
# When added to a merge queue.
# See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions
merge_group:
push:
branches:
- main
- "release/**"
pull_request:
branches:
- main
- "release/**"
env:
# Go version we currently use to build containerd across all CI.
# Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions.
GO_VERSION: "1.20.4"
branches: ['main', 'release/**']
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
@ -34,17 +23,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2019]
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-13, windows-2019]
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
- uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.51.1
version: v1.60.3
skip-cache: true
args: --timeout=8m
@ -53,21 +40,19 @@ jobs:
#
project:
name: Project Checks
if: github.repository == 'containerd/containerd'
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
fetch-depth: 100
- uses: containerd/project-checks@v1.1.0
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- uses: containerd/project-checks@800740a80e93c309f9a40903ce26d749ad0909ec # v1.2.1
if: github.repository == 'containerd/containerd'
with:
working-directory: src/github.com/containerd/containerd
repo-access-token: ${{ secrets.GITHUB_TOKEN }}
@ -83,7 +68,7 @@ jobs:
#
protos:
name: Protobuf
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 5
defaults:
@ -91,14 +76,12 @@ jobs:
working-directory: src/github.com/containerd/containerd
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- name: Set env
shell: bash
run: |
@ -119,14 +102,12 @@ jobs:
man:
name: Manpages
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
- run: go install github.com/cpuguy83/go-md2man/v2@v2.0.2
- run: make man
@ -135,7 +116,7 @@ jobs:
crossbuild:
name: Crossbuild Binaries
needs: [project, linters, protos, man]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
fail-fast: false
@ -156,10 +137,8 @@ jobs:
goarm: "7"
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
- run: |
set -e -x
@ -204,20 +183,18 @@ jobs:
binaries:
name: Binaries
runs-on: ${{ matrix.os }}
timeout-minutes: 10
timeout-minutes: 20
needs: [project, linters, protos, man]
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2019, windows-2022]
go-version: ["1.20.4", "1.19.9"]
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-13, windows-2019, windows-2022]
go-version: ["1.24.2", "1.23.8"]
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- name: Make
run: |
make build
@ -237,8 +214,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
enable_cri_sandboxes: ["", "sandboxed"]
os: [windows-2022, windows-2019]
cgroup_driver: [cgroupfs]
defaults:
run:
@ -246,18 +223,17 @@ jobs:
working-directory: src/github.com/containerd/containerd
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
- uses: actions/checkout@v3
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: kubernetes-sigs/cri-tools
path: src/github.com/kubernetes-sigs/cri-tools
fetch-depth: 0
- name: Set env
run: |
@ -268,13 +244,27 @@ jobs:
- run: script/setup/install-dev-tools
# needs to be a separate step since terminal reload is required to bring in new env variables and PATH
- name: Upgrade Chocolaty on Windows 2019
if: matrix.os == 'windows-2019'
shell: powershell
run: .\script\setup\upgrade_chocolaty_windows_2019.ps1
- name: Upgrade MinGW on Windows 2019
if: matrix.os == 'windows-2019'
shell: powershell
run: .\script\setup\upgrade_mingw_windows_2019.ps1
- name: Binaries
shell: bash
env:
CGO_ENABLED: 1
run: |
set -o xtrace
mingw32-make.exe binaries
CRITEST_VERSION=$(cat script/setup/critools-version)
cd ../../kubernetes-sigs/cri-tools
git checkout "${CRITEST_VERSION}"
make critest
- run: script/setup/install-cni-windows
@ -322,7 +312,6 @@ jobs:
- name: Integration 1
env:
CGO_ENABLED: 1
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-serial-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-integration-serial-gotest.json
EXTRA_TESTFLAGS: "-timeout=20m"
@ -340,7 +329,6 @@ jobs:
TESTFLAGS_PARALLEL: 1
EXTRA_TESTFLAGS: "-short"
CGO_ENABLED: 1
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-parallel-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-integration-parallel-gotest.json
run: mingw32-make.exe integration
@ -353,15 +341,15 @@ jobs:
- name: CRI Integration Test
env:
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
TEST_IMAGE_LIST: ${{github.workspace}}/repolist.toml
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
run: |
make cri-integration
- name: cri-tools critest
env:
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
CRI_TEST_IMAGES: ${{github.workspace}}/cri-test-images.yaml
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
shell: powershell
run: |
Start-Process -FilePath containerd.exe -NoNewWindow -RedirectStandardError true -PassThru
@ -375,10 +363,10 @@ jobs:
}
critest.exe --runtime-endpoint=npipe://.//pipe//containerd-containerd --test-images-file='${{env.CRI_TEST_IMAGES}}' --report-dir='${{github.workspace}}/critestreport' $skip
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: TestResults ${{ matrix.os }}
name: TestResults ${{ matrix.os }} ${{ matrix.cgroup_driver }}
path: |
${{github.workspace}}/*-junit.xml
${{github.workspace}}/*-gotest.json
@ -386,7 +374,7 @@ jobs:
integration-linux:
name: Linux Integration
runs-on: ubuntu-20.04
runs-on: ${{ matrix.os }}
timeout-minutes: 40
needs: [project, linters, protos, man]
@ -395,31 +383,31 @@ jobs:
matrix:
runtime:
- io.containerd.runc.v2
runc: [runc, crun]
enable_cri_sandboxes: ["", "sandboxed"]
runc: [runc] # crun can be added here to debug crun issues
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm]
cgroup_driver: [cgroupfs, systemd]
env:
GOTEST: gotestsum --
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
- name: Install containerd dependencies
env:
RUNC_FLAVOR: ${{ matrix.runc }}
run: |
sudo apt-get update
sudo apt-get install -y gperf
sudo apt-get install -y gperf dmsetup strace xfsprogs
script/setup/install-seccomp
script/setup/install-runc
script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')
script/setup/install-critools
script/setup/install-failpoint-binaries
- name: Install criu
# Disable criu testing on arm64 until we can solve the consistent failures of restore testing
- if: matrix.os != 'ubuntu-24.04-arm'
name: Install criu
run: |
sudo add-apt-repository -y ppa:criu/ppa
sudo apt-get update
@ -450,7 +438,6 @@ jobs:
env:
TEST_RUNTIME: ${{ matrix.runtime }}
RUNC_FLAVOR: ${{ matrix.runc }}
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-serial-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-integration-serial-gotest.json
run: |
@ -469,7 +456,6 @@ jobs:
env:
TEST_RUNTIME: ${{ matrix.runtime }}
RUNC_FLAVOR: ${{ matrix.runc }}
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-parallel-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-integration-parallel-gotest.json
run: |
@ -486,16 +472,28 @@ jobs:
- name: CRI Integration Test
env:
TEST_RUNTIME: ${{ matrix.runtime }}
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
RUNC_FLAVOR: ${{ matrix.runc }}
run: |
cat /sys/fs/cgroup/cgroup.controllers
systemctl status
[ "${RUNC_FLAVOR}" == "crun" ] && {
export XDG_RUNTIME_DIR=/run/user/$(id -u)
}
runc --version
CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration
- name: cri-tools critest
env:
TEST_RUNTIME: ${{ matrix.runtime }}
ENABLE_CRI_SANDBOXES: ${{ matrix.enable_cri_sandboxes }}
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
run: |
sudo -E PATH=$PATH ./script/critest.sh "${{github.workspace}}/report"
# skipping the ipv6 test till https://github.com/actions/runner-images/issues/11985 is fixed
if [[ ${{matrix.os}} == "ubuntu-22.04" ]]; then
skip_test="runtime should support port mapping with host port and container port"
fi
env
sudo -E PATH=$PATH SKIP_TEST="$skip_test" ./script/critest.sh "${{github.workspace}}/report"
# Log the status of this VM to investigate issues like
# https://github.com/containerd/containerd/issues/4969
@ -506,29 +504,173 @@ jobs:
mount
df
losetup -l
- uses: actions/upload-artifact@v3
- name: Kernel Message
if: failure()
run: |
sudo lsmod
sudo dmesg -T -f kern
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: TestResults ${{ matrix.runtime }} ${{matrix.runc}}
name: TestResults ${{ matrix.runtime }} ${{matrix.runc}} ${{ matrix.os }} ${{ matrix.cgroup_driver }}
path: |
*-junit.xml
*-gotest.json
${{github.workspace}}/report/*.xml
${{github.workspace}}/report/*.log
integration-vagrant:
name: Vagrant integration
runs-on: ubuntu-24.04
timeout-minutes: 60
needs: [project, linters, protos, man]
strategy:
fail-fast: false
matrix:
include:
- box: fedora/41-cloud-base
cgroup_driver: cgroupfs
runc: runc
- box: fedora/41-cloud-base
cgroup_driver: systemd
runc: runc
- box: fedora/41-cloud-base
cgroup_driver: cgroupfs
runc: crun
- box: fedora/41-cloud-base
cgroup_driver: systemd
runc: crun
# We have to keep EL8 to test old glibc, cgroup, kernel, etc.
# The image was changed from rockylinux/8 to almalinux/8,
# as the former one no longer works:
# https://github.com/containerd/containerd/pull/10297
- box: almalinux/8
cgroup_driver: cgroupfs
runc: runc
- box: almalinux/8
cgroup_driver: systemd
runc: runc
- box: almalinux/9
cgroup_driver: cgroupfs
runc: runc
- box: almalinux/9
cgroup_driver: systemd
runc: runc
env:
BOX: ${{ matrix.box }}
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
RUNC_FLAVOR: ${{ matrix.runc }}
steps:
- name: Show the host info
run: |
set -x
uname -a
cat /etc/os-release
cat /proc/cpuinfo
free -mt
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: /root/.vagrant.d
key: vagrant-${{ matrix.box }}
- name: Set up vagrant
run: |
# Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image: https://bugs.launchpad.net/vagrant/+bug/2017828
# So we have to install Vagrant >= 2.3.1 from the upstream: https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
sudo apt-get update
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant ovmf
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/
sudo systemctl enable --now libvirtd
sudo apt-get build-dep -y ruby-libvirt
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
sudo vagrant plugin install vagrant-libvirt
- name: Boot VM
run: |
sudo BOX=$BOX RUNC_FLAVOR=$RUNC_FLAVOR vagrant up --no-tty
if [ "$BOX" = "fedora/41-cloud-base" ]; then
# Install the kernel update for Fedora 41 to fix an error "Extension MARK revision 0 not supported, missing kernel module"
# https://bugzilla.redhat.com/show_bug.cgi?id=2321325
sudo BOX=$BOX RUNC_FLAVOR=$RUNC_FLAVOR vagrant up --provision-with=upgrade-packages
sudo BOX=$BOX RUNC_FLAVOR=$RUNC_FLAVOR vagrant halt
sudo BOX=$BOX RUNC_FLAVOR=$RUNC_FLAVOR vagrant up
fi
- name: test-integration
run: sudo BOX=$BOX RUNC_FLAVOR=$RUNC_FLAVOR vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-integration
- name: test-cri-integration
run: sudo BOX=$BOX CGROUP_DRIVER=$CGROUP_DRIVER RUNC_FLAVOR=$RUNC_FLAVOR vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-cri-integration
- name: test-cri
run: sudo BOX=$BOX CGROUP_DRIVER=$CGROUP_DRIVER RUNC_FLAVOR=$RUNC_FLAVOR vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-cri
tests-cri-in-userns:
name: "CRI-in-UserNS"
runs-on: ubuntu-24.04
timeout-minutes: 40
needs: [project, linters, protos, man]
strategy:
fail-fast: false
matrix:
cgroup_driver: [cgroupfs, systemd]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up cgroup v2 delegation
run: |
sudo mkdir -p /etc/systemd/system/user@.service.d
cat <<EOF | sudo tee /etc/systemd/system/user@.service.d/delegate.conf
[Service]
Delegate=cpu cpuset io memory pids
EOF
sudo systemctl daemon-reload
- name: Build cri-in-userns image
env:
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
run: |
if [ "$CGROUP_DRIVER" = "systemd" ];then
podman build --target cri-in-userns-systemd -t cri-in-userns-systemd -f ./contrib/Dockerfile.test .
else
podman build --target cri-in-userns -t cri-in-userns -f ./contrib/Dockerfile.test .
fi
- name: Run cri-in-userns image
env:
CGROUP_DRIVER: ${{ matrix.cgroup_driver }}
# Rootless Podman is used for testing CRI-in-UserNS
# (We could use rootless Docker or rootless nerdctl, but we are using Podman here because it is preinstalled)
run: |
if [ "$CGROUP_DRIVER" = "systemd" ];then
set +e
touch ./critest_exit_code.txt
podman run --rm --privileged --group-add keep-groups -v ./critest_exit_code.txt:/tmp/critest_exit_code.txt cri-in-userns-systemd
exit_code=`cat ./critest_exit_code.txt`
echo "exit_code:"$exit_code
if [ "$exit_code" -gt 0 ]; then
exit 1
else
exit 0
fi
else
podman run --rm --privileged cri-in-userns
fi
tests-mac-os:
name: MacOS unit tests
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 10
needs: [project, linters, protos, man]
env:
GOTEST: gotestsum --
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
- run: script/setup/install-gotestsum
- run: script/setup/install-teststat
- name: Tests
@ -540,10 +682,27 @@ jobs:
if: always()
- run: script/test/test2annotation.sh *-gotest.json
if: always()
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: TestResults MacOS
path: |
*-junit.xml
*-gotest.json
# Currently Github actions UI supports no masks to mark matrix jobs as required to pass status checks.
# This means that every time version of Go, containerd, or OS is changed, a corresponding job should
# be added to the list of required checks. Which is not very convenient.
# To workaround this, a special job is added to report statuses of all other jobs, with fixed title.
# So it needs to be added to the list of required checks only once.
#
# See https://github.com/orgs/community/discussions/26822
results:
name: Report required job statuses
runs-on: ubuntu-latest
# List job dependencies which are required to pass status checks in order to be merged via merge queue.
needs: [linters, project, protos, binaries, integration-linux, integration-windows, tests-cri-in-userns, tests-mac-os]
if: ${{ always() }}
steps:
- run: exit 1
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}

View File

@ -30,15 +30,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@v3
with:
go-version: 1.20.4
- uses: ./.github/actions/install-go
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
@ -48,4 +46,4 @@ jobs:
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0

View File

@ -14,19 +14,19 @@ jobs:
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@abe2c06d0e162320403dd10e8268adbb0b8923f8 # master
with:
oss-fuzz-project-name: 'containerd'
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@abe2c06d0e162320403dd10e8268adbb0b8923f8 # master
with:
oss-fuzz-project-name: 'containerd'
fuzz-seconds: 300
language: go
continue-on-error: true
- name: Upload Crash
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
@ -40,10 +40,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/setup-go@v3
with:
# FIXME: go-fuzz fails with Go 1.20: `cgo_unix_cgo_res.cgo2.c:(.text+0x32): undefined reference to `__res_search'`
# https://github.com/containerd/containerd/pull/8103#issuecomment-1429256152
go-version: 1.18
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/install-go
- run: script/go-test-fuzz.sh

View File

@ -26,14 +26,12 @@ jobs:
working-directory: src/github.com/containerd/containerd
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20.4"
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- name: Set env
shell: bash
run: |

30
.github/workflows/links.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Links
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Every day at midnight
pull_request:
paths:
- ".github/workflows/links.yml"
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
if: github.repository == 'containerd/containerd'
name: lychee
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: lycheeverse/lychee-action@7cd0af4c74a61395d455af97419279d86aafaede # v2.0.2
with:
# Fail action on broken links
fail: true
args: --exclude-path vendor --exclude-path releases --timeout 30 --no-progress './**/*.md'
format: markdown
# Write GitHub job summary
jobSummary: true

View File

@ -6,9 +6,6 @@ on:
paths:
- ".github/workflows/nightly.yml"
env:
GO_VERSION: "1.20.4"
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
@ -23,14 +20,12 @@ jobs:
working-directory: src/github.com/containerd/containerd
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- name: Set env
shell: bash
run: |
@ -43,14 +38,6 @@ jobs:
- name: Install dependencies
run: |
sudo add-apt-repository -y "deb [arch=arm64,s390x,ppc64el,riscv64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) main" || true
sudo add-apt-repository -y "deb [arch=arm64,s390x,ppc64el,riscv64] http://ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-updates main" || true
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture s390x
sudo dpkg --add-architecture ppc64el
sudo dpkg --add-architecture riscv64
sudo apt-get update || true
sudo apt-get install -y \
@ -58,11 +45,6 @@ jobs:
crossbuild-essential-s390x \
crossbuild-essential-ppc64el \
crossbuild-essential-riscv64 \
libseccomp-dev:amd64 \
libseccomp-dev:arm64 \
libseccomp-dev:s390x \
libseccomp-dev:ppc64el \
libseccomp-dev:riscv64
- name: Build amd64
env:
@ -117,31 +99,31 @@ jobs:
#
- name: Upload artifacts (linux_amd64)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: linux_amd64
path: src/github.com/containerd/containerd/bin_amd64
- name: Upload artifacts (linux_arm64)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: linux_arm64
path: src/github.com/containerd/containerd/bin_arm64
- name: Upload artifacts (linux_s390x)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: linux_s390x
path: src/github.com/containerd/containerd/bin_s390x
- name: Upload artifacts (linux_ppc64le)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: linux_ppc64le
path: src/github.com/containerd/containerd/bin_ppc64le
- name: Upload artifacts (linux_riscv64)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: linux_riscv64
path: src/github.com/containerd/containerd/bin_riscv64
@ -156,14 +138,12 @@ jobs:
working-directory: src/github.com/containerd/containerd
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: src/github.com/containerd/containerd
- uses: ./src/github.com/containerd/containerd/.github/actions/install-go
- name: Set env
shell: bash
run: |
@ -178,7 +158,7 @@ jobs:
make binaries
- name: Upload artifacts (windows_amd64)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: windows_amd64
path: src/github.com/containerd/containerd/bin/

View File

@ -13,7 +13,7 @@ on:
name: Release
env:
GO_VERSION: "1.20.4"
GO_VERSION: "1.23.8"
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
@ -22,14 +22,14 @@ jobs:
check:
name: Check Signed Tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
stringver: ${{ steps.contentrel.outputs.stringver }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref }}
path: src/github.com/containerd/containerd
@ -57,14 +57,14 @@ jobs:
working-directory: src/github.com/containerd/containerd
- name: Save release notes
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: containerd-release-notes
path: src/github.com/containerd/containerd/release-notes.md
build:
name: Build Release Binaries
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
matrix:
@ -93,7 +93,7 @@ jobs:
releasever="${releasever#refs/tags/}"
echo "RELEASE_VER=${releasever}" >> $GITHUB_ENV
- name: Checkout containerd
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Intentionally use github.repository instead of containerd/containerd to
# make this action runnable on forks.
@ -103,10 +103,10 @@ jobs:
path: src/github.com/containerd/containerd
- name: Setup buildx instance
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
use: true
- uses: crazy-max/ghaction-github-runtime@v2 # sets up needed vars for caching to github
- uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0
- name: Make
shell: bash
run: |
@ -121,13 +121,13 @@ jobs:
docker buildx build ${cache} --build-arg RELEASE_VER --build-arg UBUNTU_VERSION=${{ matrix.dockerfile-ubuntu }} --build-arg GO_VERSION ${BUILD_ARGS} -f .github/workflows/release/Dockerfile --platform=${PLATFORM} -o releases/ .
echo PLATFORM_CLEAN=${PLATFORM/\//-} >> $GITHUB_ENV
# Remove symlinks since we don't want these in the release Artifacts
find ./releases/ -maxdepth 1 -type l | xargs rm
# Remove symlinks since we don't want these in the release Artifacts (if any)
find ./releases/ -maxdepth 1 -type l | xargs rm -f
working-directory: src/github.com/containerd/containerd
env:
PLATFORM: ${{ matrix.dockerfile-platform }}
- name: Save Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: release-tars-${{env.PLATFORM_CLEAN}}
path: src/github.com/containerd/containerd/releases/*.tar.gz*
@ -137,16 +137,25 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
runs-on: ubuntu-20.04
id-token: write
attestations: write
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: [build, check]
steps:
- name: Download builds and release notes
uses: actions/download-artifact@v3
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: builds
- name: Attest Artifacts
id: attest
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
with:
subject-path: ./builds/release-tars-**/*.tar.gz
- name: Rename attestation artifact
run: mv ${{ steps.attest.outputs.bundle-path }} containerd-${{ needs.check.outputs.stringver }}-attestation.intoto.jsonl
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8 # v2.0.9
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
@ -156,3 +165,5 @@ jobs:
body_path: ./builds/containerd-release-notes/release-notes.md
files: |
builds/release-tars-**/*
containerd-*-attestation.intoto.jsonl
make_latest: true

View File

@ -18,7 +18,7 @@ ARG BASE_IMAGE=ubuntu:${UBUNTU_VERSION}
ARG GO_VERSION
ARG GO_IMAGE=golang:${GO_VERSION}
FROM --platform=$BUILDPLATFORM $GO_IMAGE AS go
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.2.1@sha256:8879a398dedf0aadaacfbd332b29ff2f84bc39ae6d4e9c0a1109db27ac5ba012 AS xx
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.6.1@sha256:923441d7c25f1e2eb5789f82d987693c47b8ed987c4ab3b075d6ed2b5d6779a3 AS xx
FROM --platform=$BUILDPLATFORM ${BASE_IMAGE} AS base
COPY --from=xx / /
@ -27,7 +27,8 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y dpkg-dev git make pkg-config
ARG TARGETPLATFORM
RUN xx-apt-get install -y libseccomp-dev btrfs-progs gcc
# gcc is needed for github.com/containerd/btrfs/v2
RUN xx-apt-get install -y gcc
ENV PATH=/usr/local/go/bin:$PATH
ENV GOPATH=/go
ENV CGO_ENABLED=1
@ -49,13 +50,13 @@ RUN \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
export CC=$(xx-info)-gcc && xx-go --wrap && \
make release static-release cri-release cri-cni-release && \
make release static-release && \
for f in $(find bin -executable -type f); do xx-verify $f; done
# check git working tree after build
RUN \
export GIT_STATUS_OUTPUT=$(git status --porcelain) && \
test -z $GIT_STATUS_OUTPUT || (echo $GIT_STATUS_OUTPUT && exit 1)
test -z $GIT_STATUS_OUTPUT || (echo "repository contains uncommitted changes" && exit 1)
FROM scratch AS release
COPY --from=target /go/src/github.com/containerd/containerd/releases/ /

View File

@ -0,0 +1,19 @@
# Exclude files that may cause cache-busts. These are generally expected
# to be in a global .gitignore, but still can cause the build-cache to
# be invalidated.
**/.DS_Store
# exclusions below are copied from .gitignore at the root of the repository
# when updating, consider updating .gitignore accordingly.
/bin/
/man/
coverage.txt
profile.out
containerd.test
_site/
# Allow repeated builds without copying back previous builds
releases/*.tar.gz
releases/*.tar.gz.sha256sum
_output/
.vagrant/

View File

@ -22,12 +22,12 @@ jobs:
steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@865b4092859256271290c77adbd10a43f4779972 # tag=v2.0.3
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # tag=v2.4.0
with:
results_file: results.sarif
results_format: sarif
@ -41,7 +41,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # tag=v4.4.3
with:
name: SARIF file
path: results.sarif
@ -49,6 +49,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@cc7986c02bac29104a72998e67239bb5ee2ee110 # tag=v2.1.28
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # tag=v3.27.0
with:
sarif_file: results.sarif

38
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: "0 0 * * *" # Every day at midnight
pull_request:
paths:
- '.github/workflows/stale.yml'
permissions: read-all
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
# All stale bot options: https://github.com/actions/stale#all-options
with:
# Idle number of days before marking issues/PRs stale
days-before-stale: 90
# Idle number of days before closing stale issues/PRs
days-before-close: 7
# Only issues/PRs with ANY of these labels are checked
any-of-labels: 'status/more-info-needed,status/needs-update,needs-rebase'
# Comment on the staled issues
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. This issue will be closed in 7 days unless new comments are made or the stale label is removed.'
# Comment on the staled PRs
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed.'
# Comment on the staled issues while closed
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
# Comment on the staled PRs while closed
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
# Enable dry-run when changing this file from a PR.
debug-only: github.event_name == 'pull_request'

View File

@ -46,16 +46,16 @@ jobs:
win_ver: [ltsc2019, ltsc2022]
include:
- win_ver: ltsc2019
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter-with-Containers-smalldisk:17763.4131.230311"
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest"
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2019-${{ github.run_id }}
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2019-hyperv/"
- win_ver: ltsc2022
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:20348.1607.230310"
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest"
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2022-${{ github.run_id }}
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2022-hyperv/"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install required packages
run: |
@ -81,18 +81,18 @@ jobs:
echo "SSH_PUB_KEY=$(cat ~/.ssh/id_rsa.pub)" >> $GITHUB_ENV
- name: AZLogin
uses: azure/login@v1
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
creds: ${{ secrets.AZURE_CREDS }}
- name: AZResourceGroupCreate
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az group create -n ${{ matrix.AZURE_RESOURCE_GROUP }} -l ${{ env.AZURE_DEFAULT_LOCATION }} --tags creationTimestamp=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
- name: AZTestVMCreate
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
DETAILS=$(az vm create -n winTestVM --admin-username ${{ env.DEFAULT_ADMIN_USERNAME }} --admin-password ${{ env.PASSWORD }} --image ${{ matrix.AZURE_IMG }} -g ${{ matrix.AZURE_RESOURCE_GROUP }} --nsg-rule SSH --size ${{ env.AZURE_DEFAULT_VM_SIZE }} --public-ip-sku Standard -o json)
@ -116,7 +116,7 @@ jobs:
echo "VM_PUB_IP=$PUB_IP" >> $GITHUB_ENV
- name: EnableAZVMSSH
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az vm run-command invoke --command-id RunPowerShellScript -n winTestVM -g ${{ matrix.AZURE_RESOURCE_GROUP }} --scripts @$GITHUB_WORKSPACE/script/setup/enable_ssh_windows.ps1 --parameters 'SSHPublicKey=${{ env.SSH_PUB_KEY }}'
@ -128,17 +128,14 @@ jobs:
exit 1
fi
- name: InstallAdditionalFeaturesWS2022
if: ${{ matrix.win_ver == 'ltsc2022' }}
- name: InstallAdditionalFeaturesWS
run: |
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { Install-WindowsFeature -Name 'Containers' }"
# NOTE(aznashwan): the 2022 image needs Hyper-V to be explicitly enabled:
# NOTE(aznashwan): the images need Hyper-V to be explicitly enabled:
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -IncludeManagementTools }"
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "shutdown.exe /r /t 0"
- name: WaitForVMToRestart
if: ${{ matrix.win_ver == 'ltsc2022' }}
timeout-minutes: 5
run: |
# give the vm 30 seconds to actually stop. SSH server might actually respond while server is shutting down.
@ -149,12 +146,17 @@ jobs:
done
echo "Connection reestablished. VM restarted succesfully."
- name: CreateNatNetworkWS2022
if: ${{ matrix.win_ver == 'ltsc2022' }}
- name: CreateNatNetwork
# NOTE: creating the NAT network leads to temporary network outage on 2019 with Hyper-V.
continue-on-error: true
run: |
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { curl.exe -L 'https://raw.githubusercontent.com/microsoft/SDN/master/Kubernetes/windows/hns.psm1' -o hns.psm1 }"
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { Import-Module .\hns.psm1 ; New-HnsNetwork -Type NAT -Name nat -AddressPrefix 172.19.208.0/20 -Gateway 172.19.208.1 }"
- name: EnsureNatNetworkExists
run: |
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} 'powershell.exe -command { Import-Module .\hns.psm1; if ([string]::IsNullOrWhiteSpace($(Get-HnsNetwork -Detailed))) { echo "No HNS network named nat!"; exit 1 } }'
- name: PrepareTestingEnv
run: |
scp -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} $GITHUB_WORKSPACE/script/setup/prepare_env_windows.ps1 azureuser@${{ env.VM_PUB_IP }}:/prepare_env_windows.ps1
@ -304,14 +306,14 @@ jobs:
echo 'GCP_WORKLOAD_IDENTITY_PROVIDER=${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' >> $GITHUB_OUTPUT
- name: AuthGcp
uses: google-github-actions/auth@v0
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
with:
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
- name: UploadJobReport
uses: google-github-actions/upload-cloud-storage@v0.10.4
uses: google-github-actions/upload-cloud-storage@386ab77f37fdf51c0e38b3d229fad286861cc0d0 # v2.2.1
if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
with:
path: ${{ github.workspace }}/latest-build.txt
@ -319,7 +321,7 @@ jobs:
parent: false
- name: UploadLogsDir
uses: google-github-actions/upload-cloud-storage@v0.10.4
uses: google-github-actions/upload-cloud-storage@386ab77f37fdf51c0e38b3d229fad286861cc0d0 # v2.2.1
if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
with:
path: ${{ env.LOGS_DIR }}
@ -327,7 +329,7 @@ jobs:
parent: false
- name: Check all CI stages succeeded
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const stepResults = {
@ -347,7 +349,7 @@ jobs:
- name: ResourceCleanup
if: always()
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az group delete -g ${{ matrix.AZURE_RESOURCE_GROUP }} --yes

View File

@ -45,17 +45,17 @@ jobs:
win_ver: [ltsc2019, ltsc2022]
include:
- win_ver: ltsc2019
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter-with-Containers-smalldisk:17763.4131.230311"
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest"
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2019-${{ github.run_id }}
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2019/"
- win_ver: ltsc2022
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:20348.1607.230310"
AZURE_IMG: "MicrosoftWindowsServer:WindowsServer:2022-datacenter-smalldisk-g2:latest"
AZURE_RESOURCE_GROUP: ctrd-integration-ltsc2022-${{ github.run_id }}
GOOGLE_BUCKET: "containerd-integration/logs/windows-ltsc2022/"
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install required packages
run: |
@ -81,18 +81,18 @@ jobs:
echo "SSH_PUB_KEY=$(cat ~/.ssh/id_rsa.pub)" >> $GITHUB_ENV
- name: AZLogin
uses: azure/login@v1
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
with:
creds: ${{ secrets.AZURE_CREDS }}
- name: AZResourceGroupCreate
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az group create -n ${{ matrix.AZURE_RESOURCE_GROUP }} -l ${{ env.AZURE_DEFAULT_LOCATION }} --tags creationTimestamp=$(date -u '+%Y-%m-%dT%H:%M:%SZ')
- name: AZTestVMCreate
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
DETAILS=$(az vm create -n winTestVM --admin-username ${{ env.DEFAULT_ADMIN_USERNAME }} --admin-password ${{ env.PASSWORD }} --image ${{ matrix.AZURE_IMG }} -g ${{ matrix.AZURE_RESOURCE_GROUP }} --nsg-rule SSH --size ${{ env.AZURE_DEFAULT_VM_SIZE }} --public-ip-sku Standard -o json)
@ -116,7 +116,7 @@ jobs:
echo "VM_PUB_IP=$PUB_IP" >> $GITHUB_ENV
- name: EnableAZVMSSH
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az vm run-command invoke --command-id RunPowerShellScript -n winTestVM -g ${{ matrix.AZURE_RESOURCE_GROUP }} --scripts @$GITHUB_WORKSPACE/script/setup/enable_ssh_windows.ps1 --parameters 'SSHPublicKey=${{ env.SSH_PUB_KEY }}'
@ -128,13 +128,11 @@ jobs:
exit 1
fi
- name: InstallContainerFeatureWS2022
if: ${{ matrix.win_ver == 'ltsc2022' }}
- name: InstallContainerFeature
run: |
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { Install-WindowsFeature -Name 'Containers' -Restart }"
- name: WaitForVMToRestart
if: ${{ matrix.win_ver == 'ltsc2022' }}
timeout-minutes: 5
run: |
# give the vm 30 seconds to actually stop. SSH server might actually respond while server is shutting down.
@ -145,8 +143,7 @@ jobs:
done
echo "Connection reestablished. VM restarted succesfully."
- name: CreateNatNetworkWS2022
if: ${{ matrix.win_ver == 'ltsc2022' }}
- name: CreateNatNetwork
run: |
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { curl.exe -L 'https://raw.githubusercontent.com/microsoft/SDN/master/Kubernetes/windows/hns.psm1' -o hns.psm1 }"
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "powershell.exe -command { Import-Module .\hns.psm1 ; New-HnsNetwork -Type NAT -Name nat -AddressPrefix 172.19.208.0/20 -Gateway 172.19.208.1 }"
@ -259,14 +256,14 @@ jobs:
echo 'GCP_WORKLOAD_IDENTITY_PROVIDER=${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}' >> $GITHUB_OUTPUT
- name: AuthGcp
uses: google-github-actions/auth@v0
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
with:
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
- name: UploadJobReport
uses: google-github-actions/upload-cloud-storage@v0.10.4
uses: google-github-actions/upload-cloud-storage@386ab77f37fdf51c0e38b3d229fad286861cc0d0 # v2.2.1
if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
with:
path: ${{ github.workspace }}/latest-build.txt
@ -274,7 +271,7 @@ jobs:
parent: false
- name: UploadLogsDir
uses: google-github-actions/upload-cloud-storage@v0.10.4
uses: google-github-actions/upload-cloud-storage@386ab77f37fdf51c0e38b3d229fad286861cc0d0 # v2.2.1
if: steps.AssignGcpCreds.outputs.GCP_SERVICE_ACCOUNT && steps.AssignGcpCreds.outputs.GCP_WORKLOAD_IDENTITY_PROVIDER
with:
path: ${{ env.LOGS_DIR }}
@ -282,7 +279,7 @@ jobs:
parent: false
- name: Check all CI stages succeeded
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const stepResults = {
@ -304,7 +301,7 @@ jobs:
- name: ResourceCleanup
if: always()
uses: azure/CLI@v1
uses: azure/CLI@089eac9d8cc39f5d003e94f8b65efc51076c9cbd # v2.1.0
with:
inlinescript: |
az group delete -g ${{ matrix.AZURE_RESOURCE_GROUP }} --yes

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
# If you want to ignore files created by your editor/tools, please consider a
# [global .gitignore](https://help.github.com/articles/ignoring-files).
/bin/
/man/
coverage.txt

View File

@ -1,6 +1,7 @@
linters:
enable:
- exportloopref # Checks for pointers to enclosing loop variables
- depguard # Checks for dependencies that should not be (re)introduced. See "linter-settings" for further details.
# - copyloopvar # Checks for loop variable copies in Go 1.22+
- gofmt
- goimports
- gosec
@ -12,7 +13,7 @@ linters:
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17
- unconvert
- unused
- vet
- govet
- dupword # Checks for duplicate words in the source code
disable:
- errcheck
@ -32,8 +33,35 @@ issues:
- path: 'archive[\\/]tarheader[\\/]'
# conversion is necessary on Linux, unnecessary on macOS
text: "unnecessary conversion"
- path: 'integration[\\/]client'
text: "dot-imports:"
- linters:
- revive
text: "if-return"
- linters:
- revive
text: "empty-block"
- linters:
- revive
text: "superfluous-else"
- linters:
- revive
text: "unused-parameter"
- linters:
- revive
text: "unreachable-code"
- linters:
- revive
text: "redefines-builtin-id"
linters-settings:
depguard:
rules:
main:
deny:
- pkg: github.com/opencontainers/runc
desc: We don't want to depend on runc (libcontainer), unless there is no other option; see https://github.com/opencontainers/runc/issues/3028.
gosec:
# The following issues surfaced when `gosec` linter
# was enabled. They are temporarily excluded to unblock
@ -45,15 +73,17 @@ linters-settings:
- G306
- G402
- G404
- G115
nolintlint:
allow-unused: true
run:
timeout: 8m
skip-dirs:
exclude-dirs:
- api
- cluster
- design
- docs
- docs/man
- releases
- reports
- test # e2e scripts
run:
timeout: 8m

8
.lycheeignore Normal file
View File

@ -0,0 +1,8 @@
# This file accompanies links verification nightly CI job. Add links to ignore here.
# These fail often due its popularity
https://packages.debian.org/buster-backports/libseccomp2
https://packages.ubuntu.com/trusty-backports/libseccomp2
# Fails often with 'Too Many Requests', easy to scare
https://tanzu.vmware.com/kubernetes-grid

View File

@ -3,12 +3,15 @@ Abhinandan Prativadi <abhi@docker.com> <aprativadi@gmail.com>
Ace-Tang <aceapril@126.com>
Adam Korcz <adam@adalogics.com> <Adam@adalogics.com>
Aditi Sharma <adi.sky17@gmail.com> <sharmaad@vmware.com>
Akhil Mohan <akhilerm@gmail.com> <makhil@vmware.com>
Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> <suda.akihiro@lab.ntt.co.jp>
Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp> <suda.kyoto@gmail.com>
Allen Sun <shlallen1990@gmail.com> <allensun@AllenSundeMacBook-Pro.local>
Alex Ellis <alexellis2@gmail.com>
Alexander Morozov <lk4d4math@gmail.com> <lk4d4@docker.com>
Antonio Ojea <antonio.ojea.garcia@gmail.com> <aojea@google.com>
Antonio Ojea <antonio.ojea.garcia@gmail.com> <aojea@redhat.com>
Amir M. Ghazanfari <a.m.ghazanfari76@gmail.com>
Amit Krishnan <krish.amit@gmail.com> <amit.krishnan@oracle.com>
Andrei Vagin <avagin@virtuozzo.com> <avagin@openvz.org>
Andrey Kolomentsev <andrey.kolomentsev@gmail.com>
@ -26,8 +29,10 @@ Cory Bennett <cbennett@netflix.com>
Cristian Staretu <cristian.staretu@gmail.com>
Cristian Staretu <cristian.staretu@gmail.com> <unclejack@users.noreply.github.com>
Daniel Dao <dqminh89@gmail.com>
Danny Canter <danny@dcantah.dev> <danny_canter@apple.com>
Derek McGowan <derek@mcg.dev> <derek@mcgstyle.net>
Edgar Lee <edgarl@netflix.com> <edgar.lee@docker.com>
Enrico Weigelt <info@metux.net>
Eric Ernst <eric@amperecomputing.com> <eric.ernst@intel.com>
Eric Lin <linxiulei@gmail.com> <exlin@google.com>
Eric Ren <renzhen.rz@linux.alibaba.com> <renzhen@linux.alibaba.com>
@ -50,7 +55,8 @@ haoyun <yun.hao@daocloud.io>
Harry Zhang <harryz@hyper.sh> <harryzhang@zju.edu.cn>
Hu Shuai <hus.fnst@cn.fujitsu.com>
Hu Shuai <hus.fnst@cn.fujitsu.com> <hushuaiia@qq.com>
Iceber Gu <wei.cai-nat@daocloud.io>
Iceber Gu <caiwei95@hotmail.com>
Iceber Gu <caiwei95@hotmail.com> <wei.cai-nat@daocloud.io>
Jaana Burcu Dogan <burcujdogan@gmail.com> <jbd@golang.org>
Jess Valarezo <valarezo.jessica@gmail.com>
Jess Valarezo <valarezo.jessica@gmail.com> <jessica.valarezo@docker.com>
@ -69,17 +75,22 @@ Lorenz Brun <lorenz@brun.one> <lorenz@nexantic.com>
Luc Perkins <lucperkins@gmail.com>
James Sturtevant <jsturtevant@gmail.com> <jstur@microsoft.com>
Jiajun Jiang <levinxo@gmail.com>
Jin Dong <djdongjin95@gmail.com> <jin.dong@databricks.com>
Julien Balestra <julien.balestra@datadoghq.com>
Jun Lin Chen <webmaster@mc256.com> <1913688+mc256@users.noreply.github.com>
Justin Cormack <justin.cormack@docker.com> <justin@specialbusservice.com>
Justin Terry <juterry@microsoft.com>
Justin Terry <juterry@microsoft.com> <jterry75@users.noreply.github.com>
Kante <kerthcet@gmail.com>
Kazuyoshi Kato <kato.kazuyoshi@gmail.com>
Kazuyoshi Kato <kato.kazuyoshi@gmail.com> <kaz@fly.io>
Kazuyoshi Kato <kato.kazuyoshi@gmail.com> <katokazu@amazon.com>
Kenfe-Mickaël Laventure <mickael.laventure@gmail.com>
Kevin Kern <kaiwentan@harmonycloud.cn>
Kevin Parsons <kevpar@microsoft.com> <kevpar@users.noreply.github.com>
Kevin Xu <cming.xu@gmail.com>
Kirtana Ashok <kiashok@microsoft.com>
Kirtana Ashok <kiashok@microsoft.com> <Kirtana.Ashok@microsoft.com>
Kitt Hsu <kitt.hsu@gmail.com>
Kohei Tokunaga <ktokunaga.mail@gmail.com>
Krasi Georgiev <krasi.root@gmail.com> <krasi@vip-consult.solutions>
@ -89,17 +100,23 @@ lengrongfu <1275177125@qq.com>
Li Yuxuan <liyuxuan04@baidu.com> <darfux@163.com>
Lifubang <lifubang@aliyun.com> <lifubang@acmcoder.com>
Lu Jingxiao <lujingxiao@huawei.com>
Lucas Rattz <lucasrattz999@gmail.com> <lucas.rattz@syself.com>
Mahamed Ali <cy@borg.dev>
Maksym Pavlenko <pavlenko.maksym@gmail.com> <865334+mxpv@users.noreply.github.com>
Maksym Pavlenko <pavlenko.maksym@gmail.com> <makpav@amazon.com>
Maksym Pavlenko <pavlenko.maksym@gmail.com> <maksym.pavlenko@databricks.com>
Maksym Pavlenko <pavlenko.maksym@gmail.com> <mxpv@apple.com>
Mario Hros <spam@k3a.me>
Mario Hros <spam@k3a.me> <root@k3a.me>
Mario Macias <mariomac@gmail.com> <mmacias@newrelic.com>
Mark Gordon <msg555@gmail.com>
Markus Lehtonen <markus.lehtonen@intel.com> <markus.lehtonen@linux.intel.com>
Marvin Giessing <marvin.giessing@gmail.com>
Mathis Michel <mathis.michel@outlook.de>
Michael Crosby <crosbymichael@gmail.com> <michael@thepasture.io>
Michael Katsoulis <michaelkatsoulis88@gmail.com>
Michael Zappa <michael.zappa@gmail.com> <michaelzappa@microsoft.com>
Michael Zappa <michael.zappa@gmail.com> <michaelzappa@Michaels-MacBook-Pro-8.local>
Mike Brown <brownwm@us.ibm.com> <mikebrow@users.noreply.github.com>
Mohammad Asif Siddiqui <mohammad.asif.siddiqui1@huawei.com>
Nabeel Rana <nabeelnrana@gmail.com>
@ -108,11 +125,13 @@ Ning Li <ning.a.li@transwarp.io>
ningmingxiao <ning.mingxiao@zte.com.cn>
Nishchay Kumar <mrawesomenix@gmail.com>
Oliver Stenbom <oliver@stenbom.eu> <ostenbom@pivotal.io>
Pan Yibo <mstmdev@gmail.com>
Phil Estes <estesp@gmail.com> <estesp@linux.vnet.ibm.com>
Phil Estes <estesp@gmail.com> <estesp@amazon.com>
Qian Zhang <cosmoer@qq.com>
Reid Li <reid.li@utexas.edu>
Robin Winkelewski <w9ncontact@gmail.com>
roman-kiselenko <roman.kiselenko.dev@gmail.com> <shindu666@gmail.com>
Ross Boucher <rboucher@gmail.com>
Ruediger Maass <ruediger.maass@de.ibm.com>
Rui Cao <ruicao@alauda.io> <ruicao@alauda.io>
@ -147,6 +166,7 @@ wangzhan <wang.zhan@smartx.com>
Wei Fu <fuweid89@gmail.com>
Wei Fu <fuweid89@gmail.com> <fhfuwei@163.com>
wen chen <wen.chen@daocloud.io>
William Chen <willchen.005@gmail.com> <root@DESKTOP-HIQTJ3R.localdomain>
Xiaodong Zhang <a4012017@sina.com>
Xuean Yan <yan.xuean@zte.com.cn>
Yang Yang <yang8518296@163.com>
@ -155,6 +175,7 @@ Yuxing Liu <starnop@163.com>
Zechun Chen <zechun.chen@daocloud.io>
zhang he <zhanghe9702@163.com>
Zhang Wei <zhangwei555@huawei.com>
zhangpeng <zhangpeng63@baidu.com>
zhangyadong <zhangyadong.0808@bytedance.com>
Zhenguang Zhu <zhengguang.zhu@daocloud.io>
Zhiyu Li <payall4u@qq.com>
@ -162,5 +183,7 @@ Zhiyu Li <payall4u@qq.com> <404977848@qq.com>
Zhongming Chang<zhongming.chang@daocloud.io>
Zhoulin Xie <zhoulin.xie@daocloud.io>
Zhoulin Xie <zhoulin.xie@daocloud.io> <42261994+JoeWrightss@users.noreply.github.com>
zounengren <zouyee1989@gmail.com>
zounengren <zouyee1989@gmail.com> <zounengren@cmss.chinamobile.com>
张潇 <xiaozhang0210@hotmail.com>
张钰 <zhang.yu58@zte.com.cn>

View File

@ -32,8 +32,6 @@ including the Balena project listed below.
**_Rancher's Rio project_** - Rancher Labs [Rio](https://github.com/rancher/rio) project uses containerd as the runtime for a combined Kubernetes, Istio, and container "Cloud Native Container Distribution" platform.
**_Eliot_** - The [Eliot](https://github.com/ernoaapa/eliot) container project for IoT device container management uses containerd as the runtime.
**_Balena_** - Resin's [Balena](https://github.com/resin-os/balena) container engine, based on moby/moby but for edge, embedded, and IoT use cases, uses the containerd and runc stack in the same way that the Docker engine uses containerd.
**_LinuxKit_** - the Moby project's [LinuxKit](https://github.com/linuxkit/linuxkit) for building secure, minimal Linux OS images in a container-native model uses containerd as the core runtime for system and service containers.
@ -58,7 +56,9 @@ including the Balena project listed below.
**_Deckhouse_** - [Deckhouse Kubernetes Platform](https://deckhouse.io/) from Flant allows you to manage Kubernetes clusters anywhere in a fully automatic and uniform fashion. It uses containerd as the default CRI runtime.
**_[Actuated](https://actuated.dev)** - Actuated is a platform for running self-hosted CI in securely-isolated Firecracker VMs. Actuated uses containerd's image pulling facility to distribute and update the root filesystem for VMs for CI agents.
**_[Actuated](https://actuated.dev)_** - Actuated is a platform for running self-hosted CI in securely-isolated Firecracker VMs. Actuated uses containerd's image pulling facility to distribute and update the root filesystem for VMs for CI agents.
**_[Syself Autopilot](https://syself.com)** - Syself Autopilot is a simplified Kubernetes platform based on Cluster API that can run on various providers. Syself Autopilot uses containerd as the default CRI runtime.
**_Other Projects_** - While the above list provides a cross-section of well known uses of containerd, the simplicity and clear API layer for containerd has inspired many smaller projects around providing simple container management platforms. Several examples of building higher layer functionality on top of the containerd base have come from various containerd community participants:
- Michael Crosby's [boss](https://github.com/crosbymichael/boss) project,

View File

@ -25,7 +25,7 @@ A codespace will open in a web-based version of Visual Studio Code. The [dev con
To build the `containerd` daemon, and the `ctr` simple test client, the following build system dependencies are required:
* Go 1.19.x or above
* Go 1.22.x or above
* Protoc 3.x compiler and headers (download at the [Google protobuf releases page](https://github.com/protocolbuffers/protobuf/releases))
* Btrfs headers and libraries for your distribution. Note that building the btrfs driver can be disabled via the build tag `no_btrfs`, removing this dependency.
@ -43,12 +43,7 @@ You need `git` to checkout the source code:
git clone https://github.com/containerd/containerd
```
For proper results, install the `protoc` release into `/usr/local` on your build system. For example, the following commands will download and install the 3.11.4 release for a 64-bit Linux host:
```sh
wget -c https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
sudo unzip protoc-3.11.4-linux-x86_64.zip -d /usr/local
```
For proper results, install the `protoc` release into `/usr/local` on your build system. When generating source code from `.proto` files, containerd may rely on some external protocol buffer files. These external dependencies should be added to the `/usr/local/include` directory. To install the appropriate version of `protoc` and download any necessary external protocol buffer files on a Linux host, run the install script located at `script/setup/install-protobuf`.
To enable optional [Btrfs](https://en.wikipedia.org/wiki/Btrfs) snapshotter, you should have the headers from the Linux kernel 4.12 or later.
The dependency on the kernel headers only affects users building containerd from source.
@ -125,6 +120,9 @@ make generate
> * `no_btrfs`: A build tag disables building the Btrfs snapshot driver.
> * `no_devmapper`: A build tag disables building the device mapper snapshot driver.
> * `no_zfs`: A build tag disables building the ZFS snapshot driver.
> * platform
> * `no_systemd`: disables any systemd specific code
> * `no_dynamic_plugins`: A build tag disables dynamic plugins.
>
> For example, adding `BUILDTAGS=no_btrfs` to your environment before calling the **binaries**
> Makefile target will disable the btrfs driver within the containerd Go build.
@ -153,52 +151,33 @@ make STATIC=1
# Via Docker container
The following instructions assume you are at the parent directory of containerd source directory.
> [!NOTE]
> The following instructions assume you are at the **parent** directory of containerd source directory.
## Build containerd in a container
You can build `containerd` via a Linux-based Docker container.
You can build an image from this `Dockerfile`:
You can build `containerd` via a Linux-based Docker container using the [Docker official `golang` image](https://hub.docker.com/_/golang/)
```dockerfile
FROM golang
```
Let's suppose that you built an image called `containerd/build`. From the
containerd source root directory you can run the following command:
From the **parent** directory of `containerd`'s cloned repo you can run the following command:
```sh
docker run -it \
-v ${PWD}/containerd:/go/src/github.com/containerd/containerd \
-e GOPATH=/go \
-w /go/src/github.com/containerd/containerd containerd/build sh
-v ${PWD}/containerd:/src/containerd \
-w /src/containerd golang
```
This mounts `containerd` repository
This mounts the `containerd` repository inside the image at `/src/containerd` and, by default, runs a shell at that directory.
You are now ready to [build](#build-containerd):
```sh
make && make install
```
Now, you are now ready to follow the [build instructions](#build-containerd):
## Build containerd and runc in a container
To have complete core container runtime, you will need both `containerd` and `runc`. It is possible to build both of these via Docker container.
You can use `git` to checkout `runc`:
You can clone `runc` in the same parent directory where you cloned `containerd` and you should clone [the latest stable version of `runc`](https://github.com/opencontainers/runc/releases), e.g. v1.1.13:
```sh
git clone https://github.com/opencontainers/runc
```
We can build an image from this `Dockerfile`:
```sh
FROM golang
RUN apt-get update && \
apt-get install -y libseccomp-dev
git clone --branch <RELEASE_TAG> https://github.com/opencontainers/runc
```
In our Docker container we will build `runc` build, which includes
@ -209,36 +188,66 @@ do not require external libraries at build time). Refer to [RUNC.md](docs/RUNC.m
in the docs directory to for details about building runc, and to learn about
supported versions of `runc` as used by containerd.
Let's suppose you build an image called `containerd/build` from the above Dockerfile. You can run the following command:
Since we need [`libseccomp-dev`](https://packages.debian.org/stable/libseccomp-dev) installed as a dependency, we will need a custom Docker image derived from the official `golang` image. You can use the following `Dockerfile` to build your custom image:
```sh
docker run -it --privileged \
-v /var/lib/containerd \
-v ${PWD}/runc:/go/src/github.com/opencontainers/runc \
-v ${PWD}/containerd:/go/src/github.com/containerd/containerd \
-e GOPATH=/go \
-w /go/src/github.com/containerd/containerd containerd/build sh
FROM golang
RUN apt-get update && \
apt-get install -y libseccomp-dev
```
Let's suppose you've built an image named `containerd/build` from the above `Dockerfile`.
You can run the following command:
```sh
docker run -it \
-v ${PWD}/containerd:/src/containerd \
-v ${PWD}/runc:/src/runc \
-w /src/containerd \
containerd/build
```
This mounts both `runc` and `containerd` repositories in our Docker container.
From within our Docker container let's build `containerd`:
From within the Docker container, let's build `containerd`:
```sh
cd /go/src/github.com/containerd/containerd
make && make install
```
These binaries can be found in the `./bin` directory in your host.
`make install` will move the binaries in your `$PATH`.
You can check the installed binaries with:
```sh
$ which containerd
/usr/local/bin/containerd
$ containerd --version
containerd github.com/containerd/containerd/v2 v2.0.0-rc.3-195-gf5d5407c2 f5d5407c2ff12865653a9a132d5783196be82763
```
Next, let's build `runc`:
```sh
cd /go/src/github.com/opencontainers/runc
cd /src/runc
make && make install
```
You can check the installed binaries with:
```sh
$ which runc
/usr/local/sbin/runc
$ runc --version
runc version 1.1.13
commit: v1.1.13-0-g58aa9203
spec: 1.0.2-dev
go: go1.23.0
libseccomp: 2.5.4
```
For further details about building runc, refer to [RUNC.md](docs/RUNC.md) in the
docs directory.
@ -262,25 +271,25 @@ name and also how to use the flag directly against `go test` to run root-requiri
```sh
# run the test <TEST_NAME>:
go test -v -run "<TEST_NAME>" .
go test -v -run "<TEST_NAME>" ./path/to/package
# enable the root-requiring tests:
go test -v -run . -test.root
go test -v -run ./path/to/package -test.root
```
Example output from directly running `go test` to execute the `TestContainerList` test:
```sh
sudo go test -v -run "TestContainerList" . -test.root
INFO[0000] running tests against containerd revision=f2ae8a020a985a8d9862c9eb5ab66902c2888361 version=v1.0.0-beta.2-49-gf2ae8a0
sudo go test -v -run "TestContainerList" ./integration/client -test.root
=== RUN TestContainerList
--- PASS: TestContainerList (0.00s)
PASS
ok github.com/containerd/containerd 4.778s
ok github.com/containerd/containerd/v2/integration/client 2.584s
```
> *Note*: in order to run `sudo go` you need to
> - either keep user PATH environment variable. ex: `sudo "PATH=$PATH" env go test <args>`
> - or use `go test -exec` ex: `go test -exec sudo -v -run "TestTarWithXattr" ./archive/ -test.root`
> - or use `go test -exec` ex: `go test -exec sudo -v -run "TestTarWithXattr" ./pkg/archive -test.root`
## Additional tools

72
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,72 @@
# Contributors' Guide
This guide will help familiarize contributors to the `containerd/containerd` repository.
## Prerequisite
First read the containerd project's [general guidelines around contribution](https://github.com/containerd/project/blob/main/CONTRIBUTING.md)
which apply to all containerd projects.
## Getting started
See [`BUILDING.md`](https://github.com/containerd/containerd/blob/main/BUILDING.md) for instructions for setting up a development environment.
If you are also a new user to containerd, you can first check out the [_Getting started with containerd_](https://github.com/containerd/containerd/blob/main/docs/getting-started.md) guide.
## Setting up your local environment
At a minimum, the dev tools from `script/setup/install-dev-tools` should be installed.
Run `make install-deps` to install dependencies used for running and developing the CRI plugin.
Other install scripts under `script/setup` may need to be run depending on your environment and your preference for installing libraries and dependencies.
The versions used by `containerd/containerd` CI can be found in `script/setup` and referred to if installing manually.
```
$ script/setup/install-dev-tools
$ make install-deps
```
## Code style
- Go files adhere to standard Go formatting and styling
- Protobuf files use tabs for indentation
- Other files must not contain trailing whitespace and should end with a single new line character
Use the `check` command in the makefile to verify your code matches the expected style.
```
make check
```
## Updating protobuf files
Ensure protoc and dev tools have been installed, then run `make protos`
> **Note**
> When running `make protos`, the current working directory should be found under the `GOPATH` environment
> variable to ensure protoc can properly resolve the paths of protofiles in the project.
## Naming packages
Package names should be short and simple. Avoid using `_` and repeating words from parent directories.
### Where to put packages
Try to put a new package under the appropriate root directories. The root directory is reserved for
configuration and build files, no source files will be accepted in root since containerd v2.0.
- `api` - All protobuf service definitions and types used by services
- `bin` - Autogenerated during build, do not check in file here
- `client` - All Go files for the containerd client (formerly in `containerd/containerd` root in 1.x)
- `cmd` - All Go main packages and the packages used only for that main package
- `contrib` - Files, configurations, and packages related to external tools or libraries
- `core` - Core Go packages with interface definitions and built-in implementations
- `docs` - All containerd technical documentation using markdown
- `internal` - All utility packages used by containerd and not intended for direct import
- `man`- All containerd reference manuals used for the `man` command
- `pkg` - Non-core Go packages used by clients and other containerd packages
- `plugins` - All included containerd plugins which are registered via init
- `releases` - All release note files
- `script` - All scripts used for testing, development, and CI
- `test` - Test scripts used for external end to end testing of containerd, do not add new files here
- `vendor` - Autogenerated vendor files from `make vendor` command, do not manually edit files here
- `version` - Version package with the current containerd version

View File

@ -24,15 +24,17 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# The files will be installed under `$(DESTDIR)/$(PREFIX)`.
# The convention of `DESTDIR` was changed in containerd v1.6.
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
DATADIR ?= $(PREFIX)/share
DOCDIR ?= $(DATADIR)/doc
MANDIR ?= $(DATADIR)/man
TEST_IMAGE_LIST ?=
# Used to populate variables in version package.
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
PACKAGE=github.com/containerd/containerd
REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
PACKAGE=github.com/containerd/containerd/v2
SHIM_CGO_ENABLED ?= 0
ifneq "$(strip $(shell command -v $(GO) 2>/dev/null))" ""
@ -79,7 +81,7 @@ STATICRELEASE=containerd-static-$(VERSION:v%=%)-${GOOS}-${GOARCH}
CRIRELEASE=cri-containerd-$(VERSION:v%=%)-${GOOS}-${GOARCH}
CRICNIRELEASE=cri-containerd-cni-$(VERSION:v%=%)-${GOOS}-${GOARCH}
PKG=github.com/containerd/containerd
PKG=github.com/containerd/containerd/v2
# Project binaries.
COMMANDS=ctr containerd containerd-stress
@ -94,7 +96,11 @@ GO_BUILDTAGS += ${DEBUG_TAGS}
ifneq ($(STATIC),)
GO_BUILDTAGS += osusergo netgo static_build
endif
SHIM_GO_BUILDTAGS := $(GO_BUILDTAGS) no_grpc
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(strip $(GO_BUILDTAGS))",)
SHIM_GO_TAGS=$(if $(SHIM_GO_BUILDTAGS),-tags "$(strip $(SHIM_GO_BUILDTAGS))",)
GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)
ifneq ($(STATIC),)
@ -107,7 +113,6 @@ SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version
# Project packages.
PACKAGES=$(shell $(GO) list ${GO_TAGS} ./... | grep -v /vendor/ | grep -v /integration)
API_PACKAGES=$(shell (cd api && $(GO) list ${GO_TAGS} ./... | grep -v /vendor/ | grep -v /integration))
NON_API_PACKAGES=$(shell $(GO) list ${GO_TAGS} ./... | grep -v /vendor/ | grep -v /integration | grep -v "containerd/api")
TEST_REQUIRES_ROOT_PACKAGES=$(filter \
${PACKAGES}, \
$(shell \
@ -124,10 +129,10 @@ ifdef SKIPTESTS
endif
#Replaces ":" (*nix), ";" (windows) with newline for easy parsing
GOPATHS=$(shell go env GOPATH | tr ":" "\n" | tr ";" "\n")
GOPATHS=$(shell $(GO) env GOPATH | tr ":" "\n" | tr ";" "\n")
TESTFLAGS_RACE=
GO_BUILD_FLAGS=
GO_BUILD_FLAGS ?=
# See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809
GO_GCFLAGS=$(shell \
set -- ${GOPATHS}; \
@ -149,7 +154,8 @@ GOTEST ?= $(GO) test
OUTPUTDIR = $(join $(ROOTDIR), _output)
CRIDIR=$(OUTPUTDIR)/cri
.PHONY: clean all AUTHORS build binaries test integration generate protos check-protos coverage ci check help install uninstall vendor release static-release mandir install-man genman install-cri-deps cri-release cri-cni-release cri-integration install-deps bin/cri-integration.test
.PHONY: clean all AUTHORS build binaries test integration generate protos check-protos coverage ci check help install uninstall vendor release static-release mandir install-man install-doc genman install-cri-deps cri-release cri-cni-release cri-integration install-deps bin/cri-integration.test remove-replace clean-vendor
.DEFAULT: default
# Forcibly set the default goal to all, in case an include above brought in a rule definition.
@ -170,16 +176,19 @@ generate: protos
@echo "$(WHALE) $@"
@PATH="${ROOTDIR}/bin:${PATH}" $(GO) generate -x ${PACKAGES}
protos: bin/protoc-gen-go-fieldpath
protos: bin/protoc-gen-go-fieldpath bin/go-buildtag
@echo "$(WHALE) $@"
@find . -path ./vendor -prune -false -o -name '*.pb.go' | xargs rm
$(eval TMPDIR := $(shell mktemp -d))
@mv ${ROOTDIR}/vendor ${TMPDIR}
@(cd ${ROOTDIR}/api && PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${API_PACKAGES})
@(PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${NON_API_PACKAGES})
@mv ${TMPDIR}/vendor ${ROOTDIR}
@rm -rf ${TMPDIR}
go-fix-acronym -w -a '(Id|Io|Uuid|Os)$$' $(shell find api/ runtime/ -name '*.pb.go')
@rm -rf ${TMPDIR} v2
go-fix-acronym -w -a '^Os' $(shell find api/ -name '*.pb.go')
go-fix-acronym -w -a '(Id|Io|Uuid|Os)$$' $(shell find api/ -name '*.pb.go')
bin/go-buildtag -w --tags '!no_grpc' $(shell find api/ -name '*_grpc.pb.go')
@test -z "$$(git status --short | grep "api/next.pb.txt" | tee /dev/stderr)" || \
$(GO) mod edit -replace=github.com/containerd/containerd/api=./api
check-protos: protos ## check if protobufs needs to be generated again
@echo "$(WHALE) $@"
@ -227,13 +236,18 @@ cri-integration: binaries bin/cri-integration.test ## run cri integration tests
# build runc shimv2 with failpoint control, only used by integration test
bin/containerd-shim-runc-fp-v1: integration/failpoint/cmd/containerd-shim-runc-fp-v1 FORCE
@echo "$(WHALE) $@"
@CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./integration/failpoint/cmd/containerd-shim-runc-fp-v1
@CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ${SHIM_GO_TAGS} ./integration/failpoint/cmd/containerd-shim-runc-fp-v1
# build CNI bridge plugin wrapper with failpoint support, only used by integration test
bin/cni-bridge-fp: integration/failpoint/cmd/cni-bridge-fp FORCE
@echo "$(WHALE) $@"
@$(GO) build ${GO_BUILD_FLAGS} -o $@ ./integration/failpoint/cmd/cni-bridge-fp
# build runc-fp as runc wrapper to support failpoint, only used by integration test
bin/runc-fp: integration/failpoint/cmd/runc-fp FORCE
@echo "$(WHALE) $@"
@$(GO) build ${GO_BUILD_FLAGS} -o $@ ./integration/failpoint/cmd/runc-fp
benchmark: ## run benchmarks tests
@echo "$(WHALE) $@"
@$(GO) test ${TESTFLAGS} -bench . -run Benchmark -test.root
@ -256,7 +270,7 @@ bin/gen-manpages: cmd/gen-manpages FORCE
bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and omit pie for a static shim build: https://github.com/golang/go/issues/17789#issuecomment-258542220
@echo "$(WHALE) $@"
@CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build ${GO_BUILD_FLAGS} -o $@ ${SHIM_GO_LDFLAGS} ${SHIM_GO_TAGS} ./cmd/containerd-shim-runc-v2
binaries: $(BINARIES) ## build binaries
@echo "$(WHALE) $@"
@ -291,6 +305,10 @@ install-man: man
@echo "$(WHALE) $@"
$(foreach manpage,$(addprefix man/,$(MANPAGES)), $(call installmanpage,$(manpage),$(subst .,,$(suffix $(manpage))),$(notdir $(manpage))))
install-doc:
@echo "$(WHALE) $@"
@mkdir -p $(DESTDIR)/$(DOCDIR)/containerd
@cp -R docs/* $(DESTDIR)/$(DOCDIR)/containerd
define pack_release
@rm -rf releases/$(1) releases/$(1).tar.gz
@ -374,11 +392,11 @@ releases/$(CRICNIRELEASE).tar.gz: install-cri-deps $(CRIDIR)/cri-containerd.DEPR
@tar -czf releases/$(CRICNIRELEASE).tar.gz -C $(CRIDIR) cri-containerd.DEPRECATED.txt etc usr opt
endif
cri-release: releases/$(CRIRELEASE).tar.gz
cri-release: releases/$(CRIRELEASE).tar.gz ## Deprecated (only kept for external CI)
@echo "$(WHALE) $@"
@cd releases && sha256sum $(CRIRELEASE).tar.gz >$(CRIRELEASE).tar.gz.sha256sum && ln -sf $(CRIRELEASE).tar.gz cri-containerd.tar.gz
cri-cni-release: releases/$(CRICNIRELEASE).tar.gz
cri-cni-release: releases/$(CRICNIRELEASE).tar.gz ## Deprecated (only kept for external CI)
@echo "$(WHALE) $@"
@cd releases && sha256sum $(CRICNIRELEASE).tar.gz >$(CRICNIRELEASE).tar.gz.sha256sum && ln -sf $(CRICNIRELEASE).tar.gz cri-cni-containerd.tar.gz
@ -408,16 +426,15 @@ clean-test: ## clean up debris from previously failed tests
install: ## install binaries
@echo "$(WHALE) $@ $(BINARIES)"
@$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
@$(INSTALL) $(BINARIES) $(DESTDIR)$(PREFIX)/bin
@$(INSTALL) -d $(DESTDIR)$(BINDIR)
@$(INSTALL) $(BINARIES) $(DESTDIR)$(BINDIR)
uninstall:
@echo "$(WHALE) $@"
@rm -f $(addprefix $(DESTDIR)$(PREFIX)/bin/,$(notdir $(BINARIES)))
@rm -f $(addprefix $(DESTDIR)$(BINDIR)/,$(notdir $(BINARIES)))
ifeq ($(GOOS),windows)
install-deps:
# TODO: need a script for hcshim something like containerd/cri/hack/install/windows/install-hcsshim.sh
script/setup/install-critools
script/setup/install-cni-windows
else
@ -457,22 +474,29 @@ root-coverage: ## generate coverage profiles for unit tests that require root
fi; \
done )
remove-replace:
@echo "$(WHALE) $@"
@$(GO) mod edit -dropreplace=github.com/containerd/containerd/api
vendor: ## ensure all the go.mod/go.sum files are up-to-date including vendor/ directory
@echo "$(WHALE) $@"
@$(GO) mod tidy
@$(GO) mod vendor
@$(GO) mod verify
@(cd ${ROOTDIR}/integration/client && ${GO} mod tidy)
@(cd ${ROOTDIR}/api && ${GO} mod tidy)
verify-vendor: ## verify if all the go.mod/go.sum files are up-to-date
@echo "$(WHALE) $@"
$(eval TMPDIR := $(shell mktemp -d))
@cp -R ${ROOTDIR} ${TMPDIR}
@(cd ${TMPDIR}/containerd && ${GO} mod tidy)
@(cd ${TMPDIR}/containerd/integration/client && ${GO} mod tidy)
@(cd ${TMPDIR}/containerd && ${GO} mod vendor)
@(cd ${TMPDIR}/containerd && ${GO} mod verify)
@(cd ${TMPDIR}/containerd/api && ${GO} mod tidy)
@diff -r -u -q ${ROOTDIR} ${TMPDIR}/containerd
@rm -rf ${TMPDIR}
@${ROOTDIR}/script/verify-go-modules.sh integration/client
clean-vendor: remove-replace vendor
help: ## this help

View File

@ -1,21 +0,0 @@
version = "2"
generators = ["go"]
# Control protoc include paths. Below are usually some good defaults, but feel
# free to try it without them if it works for your project.
[includes]
# Include paths that will be added before all others. Typically, you want to
# treat the root of the project as an include, but this may not be necessary.
before = ["./protobuf"]
# Paths that will be added untouched to the end of the includes. We use
# `/usr/local/include` to pickup the common install location of protobuf.
# This is the default.
after = ["/usr/local/include", "/usr/include"]
[[descriptors]]
prefix = "github.com/containerd/containerd/runtime/v2/runc/options"
target = "runtime/v2/runc/options/next.pb.txt"
ignore_files = [
"google/protobuf/descriptor.proto",
]

187
README.md
View File

@ -1,11 +1,13 @@
![containerd banner light mode](https://raw.githubusercontent.com/cncf/artwork/master/projects/containerd/horizontal/color/containerd-horizontal-color.png#gh-light-mode-only)
![containerd banner dark mode](https://raw.githubusercontent.com/cncf/artwork/master/projects/containerd/horizontal/white/containerd-horizontal-white.png#gh-dark-mode-only)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/containerd/containerd)](https://pkg.go.dev/github.com/containerd/containerd)
[![Build Status](https://github.com/containerd/containerd/workflows/CI/badge.svg)](https://github.com/containerd/containerd/actions?query=workflow%3ACI)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/containerd/containerd/v2)](https://pkg.go.dev/github.com/containerd/containerd/v2)
[![Build Status](https://github.com/containerd/containerd/actions/workflows/ci.yml/badge.svg?event=merge_group)](https://github.com/containerd/containerd/actions?query=workflow%3ACI+event%3Amerge_group)
[![Nightlies](https://github.com/containerd/containerd/workflows/Nightly/badge.svg)](https://github.com/containerd/containerd/actions?query=workflow%3ANightly)
[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/containerd)](https://goreportcard.com/report/github.com/containerd/containerd)
[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/containerd/v2)](https://goreportcard.com/report/github.com/containerd/containerd/v2)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1271/badge)](https://bestpractices.coreinfrastructure.org/projects/1271)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/containerd/containerd/badge)](https://scorecard.dev/viewer/?uri=github.com/containerd/containerd)
[![Check Links](https://github.com/containerd/containerd/actions/workflows/links.yml/badge.svg)](https://github.com/containerd/containerd/actions/workflows/links.yml)
containerd is an industry-standard container runtime with an emphasis on simplicity, robustness, and portability. It is available as a daemon for Linux and Windows, which can manage the complete container lifecycle of its host system: image transfer and storage, container execution and supervision, low-level storage and network attachments, etc.
@ -17,16 +19,8 @@ containerd is designed to be embedded into a larger system, rather than being us
## Announcements
### Hello Kubernetes v1.24!
The containerd project would like to announce containerd [v1.6.4](https://github.com/containerd/containerd/releases/tag/v1.6.4). While other prior releases are supported, this latest release and the containerd [v1.5.11](https://github.com/containerd/containerd/releases/tag/v1.5.11) release are recommended for Kubernetes v1.24.
We felt it important to announce this, particularly in view of [the dockershim removal from this release of Kubernetes](https://kubernetes.io/blog/2022/05/03/dockershim-historical-context/).
It should be noted here that moving to CRI integrations has been in the plan for many years. `containerd` began as part of `Docker` and was donated to `CNCF`. `containerd` remains in use today by Docker/moby/buildkit etc., and has many other [adopters](https://github.com/containerd/containerd/blob/main/ADOPTERS.md). `containerd` has a namespace that isolates use of `containerd` from various clients/adopters. The Kubernetes namespace is appropriately named `k8s.io`. The CRI API and `containerd` CRI plugin project has, from the start, been an effort to reduce the impact surface for Kubernetes container runtime integration. If you can't tell, we are excited to see this come to fruition.
If you have any concerns or questions, we will be here to answer them in [issues, discussions, and/or on slack](#communication). Below you will find information/detail about our [CRI Integration](#cri) implementation.
For containerd users already on v1.6.0-v1.6.3, there are known issues addressed by [v1.6.4](https://github.com/containerd/containerd/releases/tag/v1.6.4). The issues are primarily related to [CNI setup](https://github.com/kubernetes/website/blob/dev-1.24/content/en/docs/tasks/administer-cluster/migrating-from-dockershim/troubleshooting-cni-plugin-related-errors.md)
### containerd v2.0 is now released!
See [`docs/containerd-2.0.md`](docs/containerd-2.0.md).
### Now Recruiting
@ -47,7 +41,7 @@ See our documentation on [containerd.io](https://containerd.io):
* [namespaces](docs/namespaces.md)
* [client options](docs/client-opts.md)
See how to build containerd from source at [BUILDING](BUILDING.md).
To get started contributing to containerd, see [CONTRIBUTING](CONTRIBUTING.md).
If you are interested in trying out containerd see our example at [Getting Started](docs/getting-started.md).
@ -98,164 +92,8 @@ For configuring registries, see [registry host configuration documentation](docs
## Features
### Client
containerd offers a full client package to help you integrate containerd into your platform.
```go
import (
"context"
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/namespaces"
)
func main() {
client, err := containerd.New("/run/containerd/containerd.sock")
defer client.Close()
}
```
### Namespaces
Namespaces allow multiple consumers to use the same containerd without conflicting with each other. It has the benefit of sharing content while maintaining separation with containers and images.
To set a namespace for requests to the API:
```go
context = context.Background()
// create a context for docker
docker = namespaces.WithNamespace(context, "docker")
containerd, err := client.NewContainer(docker, "id")
```
To set a default namespace on the client:
```go
client, err := containerd.New(address, containerd.WithDefaultNamespace("docker"))
```
### Distribution
```go
// pull an image
image, err := client.Pull(context, "docker.io/library/redis:latest")
// push an image
err := client.Push(context, "docker.io/library/redis:latest", image.Target())
```
### Containers
In containerd, a container is a metadata object. Resources such as an OCI runtime specification, image, root filesystem, and other metadata can be attached to a container.
```go
redis, err := client.NewContainer(context, "redis-master")
defer redis.Delete(context)
```
### OCI Runtime Specification
containerd fully supports the OCI runtime specification for running containers. We have built-in functions to help you generate runtime specifications based on images as well as custom parameters.
You can specify options when creating a container about how to modify the specification.
```go
redis, err := client.NewContainer(context, "redis-master", containerd.WithNewSpec(oci.WithImageConfig(image)))
```
### Root Filesystems
containerd allows you to use overlay or snapshot filesystems with your containers. It comes with built-in support for overlayfs and btrfs.
```go
// pull an image and unpack it into the configured snapshotter
image, err := client.Pull(context, "docker.io/library/redis:latest", containerd.WithPullUnpack)
// allocate a new RW root filesystem for a container based on the image
redis, err := client.NewContainer(context, "redis-master",
containerd.WithNewSnapshot("redis-rootfs", image),
containerd.WithNewSpec(oci.WithImageConfig(image)),
)
// use a readonly filesystem with multiple containers
for i := 0; i < 10; i++ {
id := fmt.Sprintf("id-%s", i)
container, err := client.NewContainer(ctx, id,
containerd.WithNewSnapshotView(id, image),
containerd.WithNewSpec(oci.WithImageConfig(image)),
)
}
```
### Tasks
Taking a container object and turning it into a runnable process on a system is done by creating a new `Task` from the container. A task represents the runnable object within containerd.
```go
// create a new task
task, err := redis.NewTask(context, cio.NewCreator(cio.WithStdio))
defer task.Delete(context)
// the task is now running and has a pid that can be used to setup networking
// or other runtime settings outside of containerd
pid := task.Pid()
// start the redis-server process inside the container
err := task.Start(context)
// wait for the task to exit and get the exit status
status, err := task.Wait(context)
```
### Checkpoint and Restore
If you have [criu](https://criu.org/Main_Page) installed on your machine you can checkpoint and restore containers and their tasks. This allows you to clone and/or live migrate containers to other machines.
```go
// checkpoint the task then push it to a registry
checkpoint, err := task.Checkpoint(context)
err := client.Push(context, "myregistry/checkpoints/redis:master", checkpoint)
// on a new machine pull the checkpoint and restore the redis container
checkpoint, err := client.Pull(context, "myregistry/checkpoints/redis:master")
redis, err = client.NewContainer(context, "redis-master", containerd.WithNewSnapshot("redis-rootfs", checkpoint))
defer container.Delete(context)
task, err = redis.NewTask(context, cio.NewCreator(cio.WithStdio), containerd.WithTaskCheckpoint(checkpoint))
defer task.Delete(context)
err := task.Start(context)
```
### Snapshot Plugins
In addition to the built-in Snapshot plugins in containerd, additional external
plugins can be configured using GRPC. An external plugin is made available using
the configured name and appears as a plugin alongside the built-in ones.
To add an external snapshot plugin, add the plugin to containerd's config file
(by default at `/etc/containerd/config.toml`). The string following
`proxy_plugin.` will be used as the name of the snapshotter and the address
should refer to a socket with a GRPC listener serving containerd's Snapshot
GRPC API. Remember to restart containerd for any configuration changes to take
effect.
```
[proxy_plugins]
[proxy_plugins.customsnapshot]
type = "snapshot"
address = "/var/run/mysnapshotter.sock"
```
See [PLUGINS.md](/docs/PLUGINS.md) for how to create plugins
For a detailed overview of containerd's core concepts and the features it supports,
please refer to the [FEATURES.MD](./docs/features.md) document.
### Releases and API Stability
@ -299,9 +137,6 @@ loaded for the user's shell environment.
`cri` is a native plugin of containerd. Since containerd 1.1, the cri plugin is built into the release binaries and enabled by default.
> **Note:** As of containerd 1.5, the `cri` plugin is merged into the containerd/containerd repo. For example, the source code previously stored under [`containerd/cri/pkg`](https://github.com/containerd/cri/tree/release/1.4/pkg)
was moved to [`containerd/containerd/pkg/cri` package](https://github.com/containerd/containerd/tree/main/pkg/cri).
The `cri` plugin has reached GA status, representing that it is:
* Feature complete
* Works with Kubernetes 1.10 and above
@ -309,7 +144,7 @@ The `cri` plugin has reached GA status, representing that it is:
* Passes all [node e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/e2e-node-tests.md).
* Passes all [e2e tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md).
See results on the containerd k8s [test dashboard](https://k8s-testgrid.appspot.com/sig-node-containerd)
See results on the containerd k8s [test dashboard](https://testgrid.k8s.io/containerd)
#### Validating Your `cri` Setup
A Kubernetes incubator project, [cri-tools](https://github.com/kubernetes-sigs/cri-tools), includes programs for exercising CRI implementations. More importantly, cri-tools includes the program `critest` which is used for running [CRI Validation Testing](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/cri-validation.md).

View File

@ -96,28 +96,37 @@ backports until the end of life date. They may also accept a wider range of
patches than non-_LTS_ releases to support the longer term maintainability of the
branch, including library dependency, toolchain (including Go) and other version updates
which are needed to ensure each release is built with fully supported dependencies and
remains usable by containerd clients. There should be at least a 6-month overlap between
remains usable by containerd clients. _LTS_ releases can also accept feature backports
to support new Kubernetes releases. The default action has to be reject it though,
for long-term stability. This is still negotiable when the feature is a hard dependency
for a new release of Kubernetes. There should be at least a 6-month overlap between
the end of life of an _LTS_ release and the initial release of a new _LTS_ release.
Up to 6 months before the announced end of life of an _LTS_ branch, the branch may
convert to a regular _Active_ release with stricter backport criteria.
The current state is available in the following tables:
| Release | Status | Start | End of Life |
| --------- | ------------- | ------------------ | ------------------- |
| [0.0](https://github.com/containerd/containerd/releases/tag/0.0.5) | End of Life | Dec 4, 2015 | - |
| [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - |
| [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 |
| [1.0](https://github.com/containerd/containerd/releases/tag/v1.0.3) | End of Life | December 5, 2017 | December 5, 2018 |
| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.8) | End of Life | April 23, 2018 | October 23, 2019 |
| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.13) | End of Life | October 24, 2018 | October 15, 2020 |
| [1.3](https://github.com/containerd/containerd/releases/tag/v1.3.10) | End of Life | September 26, 2019 | March 4, 2021 |
| [1.4](https://github.com/containerd/containerd/releases/tag/v1.4.13) | End of Life | August 17, 2020 | March 3, 2022 |
| [1.5](https://github.com/containerd/containerd/releases/tag/v1.5.18) | End of Life | May 3, 2021 | February 28, 2023 |
| [1.6](https://github.com/containerd/containerd/releases/tag/v1.6.19) | LTS | February 15, 2022 | max(February 15, 2025 or next LTS + 6 months) |
| [1.7](https://github.com/containerd/containerd/releases/tag/v1.7.0) | Active | March 10, 2023 | max(March 10, 2024 or release of 2.0 + 6 months) |
| [2.0](https://github.com/containerd/containerd/milestone/35) | Next | TBD | TBD |
| Release | Status | Start | End of Life |
| --------- | ------------- | ------------------ | ------------------- |
| [0.0](https://github.com/containerd/containerd/releases/tag/0.0.5) | End of Life | Dec 4, 2015 | - |
| [0.1](https://github.com/containerd/containerd/releases/tag/v0.1.0) | End of Life | Mar 21, 2016 | - |
| [0.2](https://github.com/containerd/containerd/tree/v0.2.x) | End of Life | Apr 21, 2016 | December 5, 2017 |
| [1.0](https://github.com/containerd/containerd/releases/tag/v1.0.3) | End of Life | December 5, 2017 | December 5, 2018 |
| [1.1](https://github.com/containerd/containerd/releases/tag/v1.1.8) | End of Life | April 23, 2018 | October 23, 2019 |
| [1.2](https://github.com/containerd/containerd/releases/tag/v1.2.13) | End of Life | October 24, 2018 | October 15, 2020 |
| [1.3](https://github.com/containerd/containerd/releases/tag/v1.3.10) | End of Life | September 26, 2019 | March 4, 2021 |
| [1.4](https://github.com/containerd/containerd/releases/tag/v1.4.13) | End of Life | August 17, 2020 | March 3, 2022 |
| [1.5](https://github.com/containerd/containerd/releases/tag/v1.5.18) | End of Life | May 3, 2021 | February 28, 2023 |
| [1.6](https://github.com/containerd/containerd/releases/tag/v1.6.36) | LTS | February 15, 2022 | next LTS + 6 months |
| [1.7](https://github.com/containerd/containerd/releases/tag/v1.7.23) | Active | March 10, 2023 | active(May 5, 2025), extended(EOL of 1.6) |
| [2.0](https://github.com/containerd/containerd/releases/tag/v2.0.0) | Active | November 5, 2024 | max(November 5, 2025 or release of 2.1 + 6 months) |
| [2.1](https://github.com/containerd/containerd/milestone/48) | Next | TBD | TBD |
> **_NOTE_** containerd v1.7 will end of life at the same time as v1.6 LTS. Due to
> [Minimal Version Selection](https://go.dev/ref/mod#minimal-version-selection) used
> by Go modules, 1.7 must be supported until EOL of all 1.x releases. Once 1.7 is in
> extended support, it will continue to accept security patches in addition to client
> changes relevant for package importers using the 1.6 LTS daemon.
### Kubernetes Support
@ -130,25 +139,25 @@ for the list of actively tested versions. Kubernetes only supports n-3 minor
release versions and containerd will ensure there is always a supported version
of containerd for every supported version of Kubernetes.
| Kubernetes Version | containerd Version | CRI Version |
|--------------------|--------------------|-----------------|
| 1.24 | 1.7.0+, 1.6.4+ | v1, v1alpha2 |
| 1.25 | 1.7.0+, 1.6.4+ | v1, v1alpha2 ** |
| 1.26 | 1.7.0+, 1.6.15+ | v1 |
| 1.27 | 1.7.0+, 1.6.15+ | v1 |
** Note: containerd v1.6.*, and v1.7.* support CRI v1 and v1alpha2 through EOL as those releases continue to support older versions of k8s, cloud providers, and other clients using CRI v1alpha2. CRI v1alpha2 is deprecated in v1.7 and will be removed in containerd v2.0.
| Kubernetes Version | containerd Version | CRI Version |
|--------------------|-------------------------------|-----------------|
| 1.29 | 1.7.11+, 1.6.27+ | v1 |
| 1.30 | 2.0.0+, 1.7.13+, 1.6.28+ | v1 |
| 1.31 | 2.0.0+, 1.7.20+, 1.6.34+ | v1 |
Deprecated containerd and kubernetes versions
| Containerd Version | Kubernetes Version | CRI Version |
|--------------------------|--------------------|----------------------|
| v1.0 (w/ cri-containerd) | 1.7, 1.8, 1.9 | v1alpha1 |
| v1.1 | 1.10+ | v1alpha2 |
| v1.2 | 1.10+ | v1alpha2 |
| v1.3 | 1.12+ | v1alpha2 |
| v1.4 | 1.19+ | v1alpha2 |
| v1.5 | 1.20+ | v1 (1.23+), v1alpha2 |
| Containerd Version | Kubernetes Version | CRI Version |
|--------------------------|--------------------|--------------------------------------|
| v1.0 (w/ cri-containerd) | 1.7, 1.8, 1.9 | v1alpha1 |
| v1.1 | 1.10+ | v1alpha2 |
| v1.2 | 1.10+ | v1alpha2 |
| v1.3 | 1.12+ | v1alpha2 |
| v1.4 | 1.19+ | v1alpha2 |
| v1.5 | 1.20+ | v1 (1.23+), v1alpha2 (until 1.25) ** |
| v1.6.15+, v1.7.0+ | 1.26+ | v1 |
** Note: containerd v1.6.*, and v1.7.* support CRI v1 and v1alpha2 through EOL as those releases continue to support older versions of k8s, cloud providers, and other clients using CRI v1alpha2. CRI v1alpha2 is deprecated in v1.7 and will be removed in containerd v2.0.
### Backporting
@ -193,6 +202,11 @@ process:
```console
$ git cherry-pick -xsS <commit>
```
If all of the work from a particular PR/set of PRs is wanted,
cherry-pick the individual commits instead of the merge commit.
Take #8624 for example, 82ec62b is favored over 9e834e7.
(Optional) If other commits exist in the main branch which are related
to the cherry-picked commit; eg: fixes to the main PR. It is recommended
to cherry-pick those commits also into this same `my-backport-branch`.
@ -231,7 +245,7 @@ containerd versions:
| Runtime Shim API | Stable | 1.2 | - |
| Daemon Config | Stable | 1.0 | - |
| CRI GRPC API | Stable | 1.6 (_CRI v1_) | [cri-api](https://github.com/kubernetes/cri-api/tree/master/pkg/apis/runtime/v1) |
| Go client API | Unstable | _future_ | [godoc](https://godoc.org/github.com/containerd/containerd) |
| Go client API | Stable | 2.0 | [godoc](https://pkg.go.dev/github.com/containerd/containerd/v2/client) |
| `ctr` tool | Unstable | Out of scope | - |
From the version stated in the above table, that component must adhere to the
@ -241,6 +255,11 @@ Unless explicitly stated here, components that are called out as unstable or
not covered may change in a future minor version. Breaking changes to
"unstable" components will be avoided in patch versions.
Go client API stability includes the `client`, `defaults` and `version` package
as well as all packages under `pkg`, `core`, `api` and `protobuf`.
All packages under `cmd`, `contrib`, `integration`, and `internal` are not
considered part of the stable client API.
### GRPC API
The primary product of containerd is the GRPC API. As of the 1.0.0 release, the
@ -259,6 +278,36 @@ and new fields on messages may be added if they are optional.
to the API by having a diff that the CI can run. These files are not intended to be
consumed or used by clients.
As of containerd 2.0, the API version diverges from the main containerd version.
While containerd 2.0 is a _major_ version jump for containerd, the API will remain
on 1.x to remain backwards compatible with prior releases and existing clients.
The 2.0 release adds the API to a separate Go module which can remain as the
`github.com/containerd/containerd/api` Go package and imported separately from the
rest of containerd.
The API minor version will continue to be incremented for each major and minor
version release of containerd. However, the API is tagged directly out of the
main branch with the minor version incrementing earlier in the next release cycle
rather than at the end. This means that after the containerd 2.0 release, the next
API change is tagged as `api/v1.9.0` prior to any containerd 2.1 release. The
latest API version should be backported to all supported versions and patch
releases for prior API versions should be avoided if possible.
| Containerd Version | API Version at Release |
|--------------------|------------------------|
| v1.0 | 1.0 |
| v1.1 | 1.1 |
| v1.2 | 1.2 |
| v1.3 | 1.3 |
| v1.4 | 1.4 |
| v1.5 | 1.5 |
| v1.6 | 1.6 |
| v1.7 | 1.7 |
| v2.0 | 1.8 |
| next | 1.9 |
### Metrics API
The metrics API that outputs prometheus style metrics will be versioned independently,
@ -299,7 +348,7 @@ follow that format.
### Go client API
The Go client API, documented in
[godoc](https://godoc.org/github.com/containerd/containerd), is currently
[godoc](https://godoc.org/github.com/containerd/containerd/v2/client), is currently
considered unstable. It is recommended to vendor the necessary components to
stabilize your project build. Note that because the Go API interfaces with the
GRPC API, clients written against a 1.0 Go API should remain compatible with
@ -342,9 +391,26 @@ We will do our best to not break compatibility in the tool in _patch_ releases.
The daemon's configuration file, commonly located in `/etc/containerd/config.toml`
is versioned and backwards compatible. The `version` field in the config
file specifies the config's version. If no version number is specified inside
the config file then it is assumed to be a version 1 config and parsed as such.
Please use `version = 2` to enable version 2 config as version 1 has been
deprecated.
the config file then it is assumed to be a version `1` config and parsed as such.
The latest version is `version = 2`. The `main` branch is being prepared to support
the next config version `3`. The configuration is automatically migrated to the
latest version on each startup, leaving the configuration file unchanged. To avoid
the migration and optimize the daemon startup time, use `containerd config migrate`
to output the configuration as the latest version. Version `1` is no longer deprecated
and is supported by migration, however, it is recommended to use at least version `2`.
Migrating a configuration to the latest version will limit the prior versions
of containerd in which the configuration can be used. It is suggested not to
migrate your configuration file until you are confident you do not need to
quickly rollback your containerd version. Use the table of configuration
versions to containerd releases to know the minimum version of containerd for
each configuration version.
| Configuration Version | Minimum containerd version |
|-----------------------|----------------------------|
| 1 | v1.0.0 |
| 2 | v1.3.0 |
| 3 | v2.0.0 |
### Not Covered
@ -370,16 +436,20 @@ against total impact.
The deprecated features are shown in the following table:
| Component | Deprecation release | Target release for removal | Recommendation |
|----------------------------------------------------------------------------------|---------------------|----------------------------|------------------------------------------|
| Runtime V1 API and implementation (`io.containerd.runtime.v1.linux`) | containerd v1.4 | containerd v2.0 ✅ | Use `io.containerd.runc.v2` |
| Runc V1 implementation of Runtime V2 (`io.containerd.runc.v1`) | containerd v1.4 | containerd v2.0 ✅ | Use `io.containerd.runc.v2` |
| config.toml `version = 1` | containerd v1.5 | containerd v2.0 ✅ | Use config.toml `version = 2` |
| Built-in `aufs` snapshotter | containerd v1.5 | containerd v2.0 ✅ | Use `overlayfs` snapshotter |
| Container label `containerd.io/restart.logpath` | containerd v1.5 | containerd v2.0 ✅ | Use `containerd.io/restart.loguri` label |
| `cri-containerd-*.tar.gz` release bundles | containerd v1.6 | containerd v2.0 | Use `containerd-*.tar.gz` bundles |
| Pulling Schema 1 images (`application/vnd.docker.distribution.manifest.v1+json`) | containerd v1.7 | containerd v2.0 | Use Schema 2 or OCI images |
| CRI `v1alpha2` | containerd v1.7 | containerd v2.0 ✅ | Use CRI `v1` |
| Component | Deprecation release | Target release for removal | Recommendation |
|----------------------------------------------------------------------------------|---------------------|---------------------------------------|------------------------------------------|
| Runtime V1 API and implementation (`io.containerd.runtime.v1.linux`) | containerd v1.4 | containerd v2.0 ✅ | Use `io.containerd.runc.v2` |
| Runc V1 implementation of Runtime V2 (`io.containerd.runc.v1`) | containerd v1.4 | containerd v2.0 ✅ | Use `io.containerd.runc.v2` |
| Built-in `aufs` snapshotter | containerd v1.5 | containerd v2.0 ✅ | Use `overlayfs` snapshotter |
| Container label `containerd.io/restart.logpath` | containerd v1.5 | containerd v2.0 ✅ | Use `containerd.io/restart.loguri` label |
| `cri-containerd-*.tar.gz` release bundles | containerd v1.6 | containerd v2.0 ✅ | Use `containerd-*.tar.gz` bundles |
| Pulling Schema 1 images (`application/vnd.docker.distribution.manifest.v1+json`) | containerd v1.7 | containerd v2.1 (Disabled in v2.0 ✅) | Use Schema 2 or OCI images |
| CRI `v1alpha2` | containerd v1.7 | containerd v2.0 ✅ | Use CRI `v1` |
| Legacy CRI implementation of podsandbox support | containerd v2.0 | containerd v2.0 ✅ | |
| Go-Plugin library (`*.so`) as containerd runtime plugin | containerd v2.0 | containerd v2.1 | Use external plugins (proxy or binary) |
- Pulling Schema 1 images has been disabled in containerd v2.0, but it still can be enabled by setting an environment variable `CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1`
until containerd v2.1. `ctr` users have to specify `--local` too (e.g., `ctr images pull --local`).
### Deprecated config properties
The deprecated properties in [`config.toml`](./docs/cri/config.md) are shown in the following table:
@ -387,15 +457,23 @@ The deprecated properties in [`config.toml`](./docs/cri/config.md) are shown in
| Property Group | Property | Deprecation release | Target release for removal | Recommendation |
|----------------------------------------------------------------------|------------------------------|---------------------|----------------------------|-------------------------------------------------|
|`[plugins."io.containerd.grpc.v1.cri"]` | `systemd_cgroup` | containerd v1.3 | containerd v2.0 ✅ | Use `SystemdCgroup` in runc options (see below) |
|`[plugins."io.containerd.grpc.v1.cri".cni]` | `conf_template` | containerd v1.? | containerd v2.0 | Create a CNI config in `/etc/cni/net.d` |
|`[plugins."io.containerd.grpc.v1.cri".containerd]` | `untrusted_workload_runtime` | containerd v1.2 | containerd v2.0 ✅ | Create `untrusted` runtime in `runtimes` |
|`[plugins."io.containerd.grpc.v1.cri".containerd]` | `default_runtime` | containerd v1.3 | containerd v2.0 ✅ | Use `default_runtime_name` |
|`[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.*]` | `runtime_engine` | containerd v1.3 | containerd v2.0 ✅ | Use runtime v2 |
|`[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.*]` | `runtime_root` | containerd v1.3 | containerd v2.0 ✅ | Use `options.Root` |
|`[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.*]` | `disable_cgroup` | - | containerd v2.0 ✅ | Use [cgroup v2 delegation](https://rootlesscontaine.rs/getting-started/common/cgroup2/) |
|`[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.*.options]` | `CriuPath` | containerd v1.7 | containerd v2.0 ✅ | Set `$PATH` to the `criu` binary |
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `auths` | containerd v1.3 | containerd v2.0 | Use [`ImagePullSecrets`](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). See also [#8228](https://github.com/containerd/containerd/issues/8228). |
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `configs` | containerd v1.5 | containerd v2.0 | Use [`config_path`](./docs/hosts.md) |
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `mirrors` | containerd v1.5 | containerd v2.0 | Use [`config_path`](./docs/hosts.md) |
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `auths` | containerd v1.3 | containerd v2.1 | Use [`ImagePullSecrets`](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). See also [#8228](https://github.com/containerd/containerd/issues/8228). |
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `configs` | containerd v1.5 | containerd v2.1 | Use [`config_path`](./docs/hosts.md) |
|`[plugins."io.containerd.grpc.v1.cri".registry]` | `mirrors` | containerd v1.5 | containerd v2.1 | Use [`config_path`](./docs/hosts.md) |
|`[plugins."io.containerd.tracing.processor.v1.otlp"]` | `endpoint`, `protocol`, `insecure` | containerd v1.6.29 | containerd v2.0 | Use [OTLP environment variables](https://opentelemetry.io/docs/specs/otel/protocol/exporter/), e.g. OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_SDK_DISABLED |
|`[plugins."io.containerd.internal.v1.tracing"]` | `service_name`, `sampling_ratio` | containerd v1.6.29 | containerd v2.0 | Instead use [OTel environment variables](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/), e.g. OTEL_SERVICE_NAME, OTEL_TRACES_SAMPLER* |
> **Note**
>
> CNI Config Template (`plugins."io.containerd.grpc.v1.cri".cni.conf_template`) was once deprecated in v1.7.0,
> but its deprecation was cancelled in v1.7.3.
<details><summary>Example: runc option <code>SystemdCgroup</code></summary><p>
@ -446,4 +524,4 @@ more quickly.
| [NRI in CRI Support](https://github.com/containerd/containerd/pull/6019) | containerd v1.7 | containerd v2.0 |
| [gRPC Shim](https://github.com/containerd/containerd/pull/8052) | containerd v1.7 | containerd v2.0 |
| [CRI Runtime Specific Snapshotter](https://github.com/containerd/containerd/pull/6899) | containerd v1.7 | containerd v2.0 |
| [CRI Support for User Namespaces](https://github.com/containerd/containerd/pull/7679) | containerd v1.7 | containerd v2.0 |
| [CRI Support for User Namespaces](./docs/user-namespaces/README.md) | containerd v1.7 | containerd v2.0 |

40
Vagrantfile vendored
View File

@ -17,7 +17,7 @@
# Vagrantfile for Fedora and EL
Vagrant.configure("2") do |config|
config.vm.box = ENV["BOX"] ? ENV["BOX"].split("@")[0] : "fedora/37-cloud-base"
config.vm.box = ENV["BOX"] ? ENV["BOX"].split("@")[0] : "fedora/41-cloud-base"
# BOX_VERSION is deprecated. Use "BOX=<BOX>@<BOX_VERSION>".
config.vm.box_version = ENV["BOX_VERSION"] || (ENV["BOX"].split("@")[1] if ENV["BOX"])
@ -29,11 +29,16 @@ Vagrant.configure("2") do |config|
v.cpus = cpus
# Needs env var VAGRANT_EXPERIMENTAL="disks"
o.vm.disk :disk, size: "#{disk_size}GB", primary: true
v.customize ["modifyvm", :id, "--firmware", "efi"]
end
config.vm.provider :libvirt do |v|
v.memory = memory
v.cpus = cpus
v.machine_virtual_size = disk_size
# https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1725#issuecomment-1454058646
# Needs `sudo cp /usr/share/OVMF/OVMF_VARS_4M.fd /var/lib/libvirt/qemu/nvram/`
v.loader = '/usr/share/OVMF/OVMF_CODE_4M.fd'
v.nvram = '/var/lib/libvirt/qemu/nvram/OVMF_VARS_4M.fd'
end
config.vm.synced_folder ".", "/vagrant", type: "rsync"
@ -78,6 +83,7 @@ Vagrant.configure("2") do |config|
libselinux-devel \
lsof \
make \
strace \
${INSTALL_PACKAGES}
SHELL
end
@ -101,7 +107,7 @@ EOF
config.vm.provision "install-golang", type: "shell", run: "once" do |sh|
sh.upload_path = "/tmp/vagrant-install-golang"
sh.env = {
'GO_VERSION': ENV['GO_VERSION'] || "1.20.4",
'GO_VERSION': ENV['GO_VERSION'] || "1.23.8",
}
sh.inline = <<~SHELL
#!/usr/bin/env bash
@ -254,7 +260,7 @@ EOF
set -eux -o pipefail
rm -rf /var/lib/containerd-test /run/containerd-test
cd ${GOPATH}/src/github.com/containerd/containerd
go test -v -count=1 -race ./metrics/cgroups
go test -v -count=1 -race ./core/metrics/cgroups
make integration EXTRA_TESTFLAGS="-timeout 15m -no-criu -test.v" TEST_RUNTIME=io.containerd.runc.v2 RUNC_FLAVOR=$RUNC_FLAVOR
SHELL
end
@ -269,7 +275,7 @@ EOF
'GOTESTSUM_JUNITFILE': ENV['GOTESTSUM_JUNITFILE'],
'GOTESTSUM_JSONFILE': ENV['GOTESTSUM_JSONFILE'],
'GITHUB_WORKSPACE': '',
'ENABLE_CRI_SANDBOXES': ENV['ENABLE_CRI_SANDBOXES'],
'CGROUP_DRIVER': ENV['CGROUP_DRIVER'],
}
sh.inline = <<~SHELL
#!/usr/bin/env bash
@ -297,6 +303,7 @@ EOF
sh.env = {
'GOTEST': ENV['GOTEST'] || "go test",
'REPORT_DIR': ENV['REPORT_DIR'],
'CGROUP_DRIVER': ENV['CGROUP_DRIVER'],
}
sh.inline = <<~SHELL
#!/usr/bin/env bash
@ -325,29 +332,4 @@ EOF
SHELL
end
# Rootless Podman is used for testing CRI-in-UserNS
# (We could use rootless nerdctl, but we are using Podman here because it is available in dnf)
config.vm.provision "install-rootless-podman", type: "shell", run: "never" do |sh|
sh.upload_path = "/tmp/vagrant-install-rootless-podman"
sh.inline = <<~SHELL
#!/usr/bin/env bash
set -eux -o pipefail
# Delegate cgroup v2 controllers to rootless
mkdir -p /etc/systemd/system/user@.service.d
cat > /etc/systemd/system/user@.service.d/delegate.conf << EOF
[Service]
Delegate=yes
EOF
systemctl daemon-reload
# Install Podman
dnf install -y podman
# Configure Podman to resolve `golang` to `docker.io/library/golang`
mkdir -p /etc/containers
cat > /etc/containers/registries.conf <<EOF
[registries.search]
registries = ['docker.io']
EOF
SHELL
end
end

View File

@ -1,5 +1,5 @@
version = "2"
generators = ["go", "go-grpc"]
generators = ["go", "go-grpc", "go-ttrpc"]
# Control protoc include paths. Below are usually some good defaults, but feel
# free to try it without them if it works for your project.
@ -18,13 +18,22 @@ generators = ["go", "go-grpc"]
[packages]
"google/rpc/status.proto" = "google.golang.org/genproto/googleapis/rpc/status"
[parameters.go-ttrpc]
prefix = "TTRPC"
[[overrides]]
prefixes = ["github.com/containerd/containerd/api/events"]
generators = ["go", "go-ttrpc", "go-fieldpath"]
[overrides.parameters.go-ttrpc]
prefix = ""
[[overrides]]
prefixes = ["github.com/containerd/containerd/api/services/ttrpc/events/v1"]
generators = ["go", "go-ttrpc", "go-fieldpath"]
generators = ["go", "go-ttrpc"]
[overrides.parameters.go-ttrpc]
prefix = ""
[[overrides]]
# enable ttrpc and disable fieldpath and grpc for the shim
@ -33,24 +42,21 @@ prefixes = [
]
generators = ["go", "go-ttrpc"]
[overrides.parameters.go-ttrpc]
prefix = ""
[[overrides]]
prefixes = [
"github.com/containerd/containerd/api/runtime/sandbox/v1",
]
generators = ["go", "go-ttrpc", "go-grpc"]
[overrides.parameters.go-ttrpc]
prefix = "TTRPC"
[[overrides]]
prefixes = [
"github.com/containerd/containerd/api/runtime/task/v3",
]
generators = ["go", "go-ttrpc", "go-grpc"]
[overrides.parameters.go-ttrpc]
prefix = "TTRPC"
# Aggregrate the API descriptors to lock down API changes.
[[descriptors]]
prefix = "github.com/containerd/containerd/api"

View File

@ -22,7 +22,7 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
_ "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
@ -282,45 +282,44 @@ var file_github_com_containerd_containerd_api_events_container_proto_rawDesc = [
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x40, 0x67, 0x69, 0x74,
0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x66, 0x69,
0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01,
0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x75, 0x6e,
0x74, 0x69, 0x6d, 0x65, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x4d, 0x0a,
0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x07,
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x41, 0x6e, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xdd, 0x01, 0x0a,
0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x21,
0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4b, 0x65,
0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, 0x0a, 0x0f,
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x42,
0x38, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74,
0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69,
0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x12, 0x44, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x07,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x4d, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69,
0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6f,
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6e, 0x61, 0x70,
0x73, 0x68, 0x6f, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4b, 0x65, 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x4c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0,
0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -19,10 +19,10 @@ syntax = "proto3";
package containerd.events;
import "google/protobuf/any.proto";
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.plugin.fieldpath_all) = true;
option (containerd.types.fieldpath_all) = true;
message ContainerCreate {
string id = 1;

View File

@ -22,7 +22,7 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
_ "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -90,18 +90,18 @@ var file_github_com_containerd_containerd_api_events_content_proto_rawDesc = []b
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x40,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x3a,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x27, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0,
0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0d, 0x43, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64,
0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67,
0x65, 0x73, 0x74, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -18,10 +18,10 @@ syntax = "proto3";
package containerd.events;
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.plugin.fieldpath_all) = true;
option (containerd.types.fieldpath_all) = true;
message ContentDelete {
string digest = 1;

View File

@ -22,7 +22,7 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
_ "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -201,39 +201,39 @@ var file_github_com_containerd_containerd_api_events_image_proto_rawDesc = []byt
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69,
0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64,
0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e,
0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39,
0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x49, 0x6d,
0x61, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a,
0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d,
0x61, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a,
0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x21, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67,
0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x38, 0x5a, 0x32, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74,
0x79, 0x70, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69,
0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x22, 0x21, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -18,10 +18,10 @@ syntax = "proto3";
package containerd.services.images.v1;
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.plugin.fieldpath_all) = true;
option (containerd.types.fieldpath_all) = true;
message ImageCreate {
string name = 1;

View File

@ -22,7 +22,7 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
_ "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -201,39 +201,38 @@ var file_github_com_containerd_containerd_api_events_namespace_proto_rawDesc = [
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x1a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
0x1a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x4c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa8, 0x01,
0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a,
0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42,
0x38, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x65,
0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a,
0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b,
0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa8, 0x01, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65,
0x6e, 0x74, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
0x38, 0x01, 0x22, 0x25, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0,
0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -18,10 +18,10 @@ syntax = "proto3";
package containerd.events;
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.plugin.fieldpath_all) = true;
option (containerd.types.fieldpath_all) = true;
message NamespaceCreate {
string name = 1;

316
api/events/sandbox.pb.go Normal file
View File

@ -0,0 +1,316 @@
//
//Copyright The containerd Authors.
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.1
// source: github.com/containerd/containerd/api/events/sandbox.proto
package events
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type SandboxCreate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
}
func (x *SandboxCreate) Reset() {
*x = SandboxCreate{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SandboxCreate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SandboxCreate) ProtoMessage() {}
func (x *SandboxCreate) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SandboxCreate.ProtoReflect.Descriptor instead.
func (*SandboxCreate) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescGZIP(), []int{0}
}
func (x *SandboxCreate) GetSandboxID() string {
if x != nil {
return x.SandboxID
}
return ""
}
type SandboxStart struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
}
func (x *SandboxStart) Reset() {
*x = SandboxStart{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SandboxStart) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SandboxStart) ProtoMessage() {}
func (x *SandboxStart) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SandboxStart.ProtoReflect.Descriptor instead.
func (*SandboxStart) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescGZIP(), []int{1}
}
func (x *SandboxStart) GetSandboxID() string {
if x != nil {
return x.SandboxID
}
return ""
}
type SandboxExit struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
ExitStatus uint32 `protobuf:"varint,2,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
ExitedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=exited_at,json=exitedAt,proto3" json:"exited_at,omitempty"`
}
func (x *SandboxExit) Reset() {
*x = SandboxExit{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SandboxExit) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SandboxExit) ProtoMessage() {}
func (x *SandboxExit) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SandboxExit.ProtoReflect.Descriptor instead.
func (*SandboxExit) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescGZIP(), []int{2}
}
func (x *SandboxExit) GetSandboxID() string {
if x != nil {
return x.SandboxID
}
return ""
}
func (x *SandboxExit) GetExitStatus() uint32 {
if x != nil {
return x.ExitStatus
}
return 0
}
func (x *SandboxExit) GetExitedAt() *timestamppb.Timestamp {
if x != nil {
return x.ExitedAt
}
return nil
}
var File_github_com_containerd_containerd_api_events_sandbox_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_events_sandbox_proto_rawDesc = []byte{
0x0a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x1f,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x2e, 0x0a, 0x0d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22,
0x2d, 0x0a, 0x0c, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12,
0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x86,
0x01, 0x0a, 0x0b, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x45, 0x78, 0x69, 0x74, 0x12, 0x1d,
0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x1f, 0x0a,
0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37,
0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65,
0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescOnce sync.Once
file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescData = file_github_com_containerd_containerd_api_events_sandbox_proto_rawDesc
)
func file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescGZIP() []byte {
file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescOnce.Do(func() {
file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescData)
})
return file_github_com_containerd_containerd_api_events_sandbox_proto_rawDescData
}
var file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_github_com_containerd_containerd_api_events_sandbox_proto_goTypes = []interface{}{
(*SandboxCreate)(nil), // 0: containerd.events.SandboxCreate
(*SandboxStart)(nil), // 1: containerd.events.SandboxStart
(*SandboxExit)(nil), // 2: containerd.events.SandboxExit
(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
}
var file_github_com_containerd_containerd_api_events_sandbox_proto_depIdxs = []int32{
3, // 0: containerd.events.SandboxExit.exited_at:type_name -> google.protobuf.Timestamp
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_github_com_containerd_containerd_api_events_sandbox_proto_init() }
func file_github_com_containerd_containerd_api_events_sandbox_proto_init() {
if File_github_com_containerd_containerd_api_events_sandbox_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SandboxCreate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SandboxStart); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SandboxExit); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_github_com_containerd_containerd_api_events_sandbox_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_github_com_containerd_containerd_api_events_sandbox_proto_goTypes,
DependencyIndexes: file_github_com_containerd_containerd_api_events_sandbox_proto_depIdxs,
MessageInfos: file_github_com_containerd_containerd_api_events_sandbox_proto_msgTypes,
}.Build()
File_github_com_containerd_containerd_api_events_sandbox_proto = out.File
file_github_com_containerd_containerd_api_events_sandbox_proto_rawDesc = nil
file_github_com_containerd_containerd_api_events_sandbox_proto_goTypes = nil
file_github_com_containerd_containerd_api_events_sandbox_proto_depIdxs = nil
}

37
api/events/sandbox.proto Normal file
View File

@ -0,0 +1,37 @@
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
syntax = "proto3";
package containerd.events;
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
message SandboxCreate {
string sandbox_id = 1;
}
message SandboxStart {
string sandbox_id = 1;
}
message SandboxExit {
string sandbox_id = 1;
uint32 exit_status = 2;
google.protobuf.Timestamp exited_at = 3;
}

View File

@ -0,0 +1,44 @@
// Code generated by protoc-gen-go-fieldpath. DO NOT EDIT.
// source: github.com/containerd/containerd/api/events/sandbox.proto
package events
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SandboxCreate) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
case "sandbox_id":
return string(m.SandboxID), len(m.SandboxID) > 0
}
return "", false
}
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SandboxStart) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
case "sandbox_id":
return string(m.SandboxID), len(m.SandboxID) > 0
}
return "", false
}
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SandboxExit) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
// unhandled: exit_status
// unhandled: exited_at
case "sandbox_id":
return string(m.SandboxID), len(m.SandboxID) > 0
}
return "", false
}

View File

@ -22,7 +22,7 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
_ "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@ -225,31 +225,30 @@ var file_github_com_containerd_containerd_api_events_snapshot_proto_rawDesc = []
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x73, 0x6e,
0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a,
0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x5d, 0x0a, 0x0f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x72, 0x65,
0x70, 0x61, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20,
0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72,
0x22, 0x58, 0x0a, 0x0e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x6d,
0x69, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70,
0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x65, 0x6c,
0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x0f, 0x53,
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70,
0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73,
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x22, 0x44, 0x0a, 0x0e, 0x53, 0x6e,
0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20,
0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72,
0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x22, 0x58, 0x0a, 0x0e, 0x53, 0x6e,
0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65,
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
0x74, 0x74, 0x65, 0x72, 0x22, 0x44, 0x0a, 0x0e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x6e, 0x61, 0x70,
0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73,
0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -18,10 +18,10 @@ syntax = "proto3";
package containerd.events;
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.plugin.fieldpath_all) = true;
option (containerd.types.fieldpath_all) = true;
message SnapshotPrepare {
string key = 1;

View File

@ -23,7 +23,6 @@ package events
import (
types "github.com/containerd/containerd/api/types"
_ "github.com/containerd/containerd/protobuf/plugin"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
@ -738,86 +737,86 @@ var file_github_com_containerd_containerd_api_events_task_proto_rawDesc = []byte
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
0x12, 0x2f, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x66,
0x73, 0x12, 0x29, 0x0a, 0x02, 0x69, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x4f, 0x52, 0x02, 0x69, 0x6f, 0x12, 0x1e, 0x0a, 0x0a,
0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03,
0x70, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x40,
0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64,
0x22, 0xab, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xd5, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12,
0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x03, 0x70, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f,
0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6a,
0x0a, 0x06, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x4f, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x64, 0x69,
0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x16,
0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x1a,
0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
0x52, 0x08, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0xa9, 0x01, 0x0a, 0x08, 0x54,
0x61, 0x73, 0x6b, 0x45, 0x78, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b,
0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a,
0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78,
0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x2c, 0x0a, 0x07, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x4f,
0x4d, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63,
0x41, 0x64, 0x64, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x6f,
0x6f, 0x74, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x66, 0x73, 0x12, 0x29, 0x0a, 0x02, 0x69,
0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b,
0x49, 0x4f, 0x52, 0x02, 0x69, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70,
0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63,
0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x06, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x40, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b,
0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x65, 0x63, 0x49,
0x64, 0x22, 0x5f, 0x0a, 0x0f, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x53, 0x74, 0x61,
0x72, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x65, 0x63, 0x49, 0x64,
0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70,
0x69, 0x64, 0x22, 0x2f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x75, 0x73, 0x65, 0x64,
0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6d,
0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x55, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x65,
0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0xab, 0x01, 0x0a, 0x0a, 0x54,
0x61, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x38, 0x5a, 0x32,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x1f,
0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08,
0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6a, 0x0a, 0x06, 0x54, 0x61, 0x73, 0x6b,
0x49, 0x4f, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f,
0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x65, 0x72, 0x6d,
0x69, 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x74, 0x65, 0x72, 0x6d,
0x69, 0x6e, 0x61, 0x6c, 0x22, 0xa9, 0x01, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x69,
0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73,
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69,
0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65,
0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74,
0x22, 0x2c, 0x0a, 0x07, 0x54, 0x61, 0x73, 0x6b, 0x4f, 0x4f, 0x4d, 0x12, 0x21, 0x0a, 0x0c, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x4b,
0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x41, 0x64, 0x64, 0x65, 0x64, 0x12,
0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x65, 0x63, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x0f, 0x54,
0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x21,
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49,
0x64, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x65, 0x78, 0x65, 0x63, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x0a,
0x54, 0x61, 0x73, 0x6b, 0x50, 0x61, 0x75, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x30, 0x0a,
0x0b, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22,
0x55, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e,
0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70,
0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63,
0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x38, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0xa0, 0xf4, 0x1e, 0x01,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -20,10 +20,10 @@ package containerd.events;
import "google/protobuf/timestamp.proto";
import "github.com/containerd/containerd/api/types/mount.proto";
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/fieldpath.proto";
option go_package = "github.com/containerd/containerd/api/events;events";
option (containerd.plugin.fieldpath_all) = true;
option (containerd.types.fieldpath_all) = true;
message TaskCreate {
string container_id = 1;

23
api/go.mod Normal file
View File

@ -0,0 +1,23 @@
module github.com/containerd/containerd/api
go 1.23.0
require (
github.com/containerd/ttrpc v1.2.5
github.com/containerd/typeurl/v2 v2.1.1
github.com/opencontainers/image-spec v1.1.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.33.0
)
require (
github.com/containerd/log v0.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
)

80
api/go.sum Normal file
View File

@ -0,0 +1,80 @@
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU=
github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o=
github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

File diff suppressed because it is too large Load Diff

17
api/releases/v1.8.0.toml Normal file
View File

@ -0,0 +1,17 @@
# commit to be tagged for new release
commit = "HEAD"
project_name = "containerd"
github_repo = "containerd/containerd"
sub_path = "api"
ignore_deps = [ "github.com/containerd/containerd" ]
# previous release
previous = "v1.7.0"
pre_release = false
preface = """\
The first dedicated release for the containerd API. This release continues the 1.x
line of API compatibility with the 9th minor release of the 1.x API.
"""

View File

@ -43,11 +43,12 @@ type CreateSandboxRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
BundlePath string `protobuf:"bytes,2,opt,name=bundle_path,json=bundlePath,proto3" json:"bundle_path,omitempty"`
Rootfs []*types.Mount `protobuf:"bytes,3,rep,name=rootfs,proto3" json:"rootfs,omitempty"`
Options *anypb.Any `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
NetnsPath string `protobuf:"bytes,5,opt,name=netns_path,json=netnsPath,proto3" json:"netns_path,omitempty"`
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
BundlePath string `protobuf:"bytes,2,opt,name=bundle_path,json=bundlePath,proto3" json:"bundle_path,omitempty"`
Rootfs []*types.Mount `protobuf:"bytes,3,rep,name=rootfs,proto3" json:"rootfs,omitempty"`
Options *anypb.Any `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
NetnsPath string `protobuf:"bytes,5,opt,name=netns_path,json=netnsPath,proto3" json:"netns_path,omitempty"`
Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *CreateSandboxRequest) Reset() {
@ -117,6 +118,13 @@ func (x *CreateSandboxRequest) GetNetnsPath() string {
return ""
}
func (x *CreateSandboxRequest) GetAnnotations() map[string]string {
if x != nil {
return x.Annotations
}
return nil
}
type CreateSandboxResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -967,6 +975,100 @@ func (*ShutdownSandboxResponse) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{17}
}
type SandboxMetricsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
}
func (x *SandboxMetricsRequest) Reset() {
*x = SandboxMetricsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SandboxMetricsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SandboxMetricsRequest) ProtoMessage() {}
func (x *SandboxMetricsRequest) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SandboxMetricsRequest.ProtoReflect.Descriptor instead.
func (*SandboxMetricsRequest) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{18}
}
func (x *SandboxMetricsRequest) GetSandboxID() string {
if x != nil {
return x.SandboxID
}
return ""
}
type SandboxMetricsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Metrics *types.Metric `protobuf:"bytes,1,opt,name=metrics,proto3" json:"metrics,omitempty"`
}
func (x *SandboxMetricsResponse) Reset() {
*x = SandboxMetricsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SandboxMetricsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SandboxMetricsResponse) ProtoMessage() {}
func (x *SandboxMetricsResponse) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SandboxMetricsResponse.ProtoReflect.Descriptor instead.
func (*SandboxMetricsResponse) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_rawDescGZIP(), []int{19}
}
func (x *SandboxMetricsResponse) GetMetrics() *types.Metric {
if x != nil {
return x.Metrics
}
return nil
}
var File_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_rawDesc = []byte{
@ -987,179 +1089,210 @@ var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_r
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d,
0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x1f, 0x0a,
0x0b, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2f,
0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x66, 0x73, 0x12,
0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74, 0x6e, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x6e, 0x73, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17,
0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d,
0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x63, 0x0a,
0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x41, 0x74, 0x22, 0x30, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x50, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x22, 0x56, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x91, 0x02, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xfe, 0x02, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x6e, 0x64, 0x6c,
0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75,
0x6e, 0x64, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x74,
0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e,
0x74, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x74, 0x66, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79,
0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x0b, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x44, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x12, 0x57, 0x61, 0x69, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x13, 0x57, 0x61, 0x69, 0x74,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x08, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
0x62, 0x6f, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62,
0x6f, 0x73, 0x65, 0x22, 0x8b, 0x03, 0x0a, 0x15, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a,
0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03,
0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x14,
0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73,
0x74, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x05,
0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
0x79, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x49, 0x6e, 0x66, 0x6f,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x2c, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x65, 0x74,
0x6e, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
0x65, 0x74, 0x6e, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x66, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69,
0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x17, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x74, 0x61,
0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22,
0x0e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x37, 0x0a, 0x16, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x68, 0x75, 0x74,
0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x32, 0xbe, 0x07, 0x0a, 0x07, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12,
0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x0c, 0x53,
0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x32, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72,
0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e,
0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31,
0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31,
0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x74, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31,
0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x63, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65,
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x22, 0x30, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x08, 0x70, 0x6c,
0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x22, 0x56, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74,
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74,
0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x91, 0x02, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x66, 0x0a,
0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x44, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e,
0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x12, 0x57, 0x61, 0x69, 0x74, 0x53, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x13, 0x57, 0x61,
0x69, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a,
0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76,
0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65,
0x72, 0x62, 0x6f, 0x73, 0x65, 0x22, 0x8b, 0x03, 0x0a, 0x15, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74,
0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x5f,
0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2a,
0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x41, 0x6e, 0x79, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x49, 0x6e,
0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0x2c, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49,
0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x37, 0x0a, 0x16, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x53, 0x68,
0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d,
0x0a, 0x0a, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x49, 0x64, 0x22, 0x4c, 0x0a,
0x16, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69,
0x63, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x32, 0xbd, 0x08, 0x0a, 0x07,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69,
0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x77, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x53,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x08,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x0b, 0x53, 0x74, 0x6f,
0x70, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x53, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x70,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x74, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x31,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x57,
0x61, 0x69, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72,
0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76,
0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x0d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a,
0x0d, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33,
0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x66, 0x0a, 0x0b, 0x50, 0x69, 0x6e, 0x67, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31,
0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x53, 0x68,
0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x35, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69,
0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68,
0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e,
0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x0e,
0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x34,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x0b, 0x50, 0x69, 0x6e,
0x67, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f,
0x78, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62,
0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61,
0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x75,
0x74, 0x64, 0x6f, 0x77, 0x6e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x75, 0x6e,
0x74, 0x69, 0x6d, 0x65, 0x2f, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b,
0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x78, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x4d, 0x65, 0x74, 0x72,
0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x41, 0x5a, 0x3f, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x73, 0x61, 0x6e, 0x64,
0x62, 0x6f, 0x78, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x61, 0x6e, 0x64, 0x62, 0x6f, 0x78, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1174,7 +1307,7 @@ func file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_
return file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_rawDescData
}
var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_goTypes = []interface{}{
(*CreateSandboxRequest)(nil), // 0: containerd.runtime.sandbox.v1.CreateSandboxRequest
(*CreateSandboxResponse)(nil), // 1: containerd.runtime.sandbox.v1.CreateSandboxResponse
@ -1194,46 +1327,54 @@ var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_g
(*PingResponse)(nil), // 15: containerd.runtime.sandbox.v1.PingResponse
(*ShutdownSandboxRequest)(nil), // 16: containerd.runtime.sandbox.v1.ShutdownSandboxRequest
(*ShutdownSandboxResponse)(nil), // 17: containerd.runtime.sandbox.v1.ShutdownSandboxResponse
nil, // 18: containerd.runtime.sandbox.v1.UpdateSandboxRequest.AnnotationsEntry
nil, // 19: containerd.runtime.sandbox.v1.SandboxStatusResponse.InfoEntry
(*types.Mount)(nil), // 20: containerd.types.Mount
(*anypb.Any)(nil), // 21: google.protobuf.Any
(*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp
(*types.Platform)(nil), // 23: containerd.types.Platform
(*SandboxMetricsRequest)(nil), // 18: containerd.runtime.sandbox.v1.SandboxMetricsRequest
(*SandboxMetricsResponse)(nil), // 19: containerd.runtime.sandbox.v1.SandboxMetricsResponse
nil, // 20: containerd.runtime.sandbox.v1.CreateSandboxRequest.AnnotationsEntry
nil, // 21: containerd.runtime.sandbox.v1.UpdateSandboxRequest.AnnotationsEntry
nil, // 22: containerd.runtime.sandbox.v1.SandboxStatusResponse.InfoEntry
(*types.Mount)(nil), // 23: containerd.types.Mount
(*anypb.Any)(nil), // 24: google.protobuf.Any
(*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
(*types.Platform)(nil), // 26: containerd.types.Platform
(*types.Metric)(nil), // 27: containerd.types.Metric
}
var file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_depIdxs = []int32{
20, // 0: containerd.runtime.sandbox.v1.CreateSandboxRequest.rootfs:type_name -> containerd.types.Mount
21, // 1: containerd.runtime.sandbox.v1.CreateSandboxRequest.options:type_name -> google.protobuf.Any
22, // 2: containerd.runtime.sandbox.v1.StartSandboxResponse.created_at:type_name -> google.protobuf.Timestamp
23, // 3: containerd.runtime.sandbox.v1.PlatformResponse.platform:type_name -> containerd.types.Platform
21, // 4: containerd.runtime.sandbox.v1.UpdateSandboxRequest.resources:type_name -> google.protobuf.Any
18, // 5: containerd.runtime.sandbox.v1.UpdateSandboxRequest.annotations:type_name -> containerd.runtime.sandbox.v1.UpdateSandboxRequest.AnnotationsEntry
22, // 6: containerd.runtime.sandbox.v1.WaitSandboxResponse.exited_at:type_name -> google.protobuf.Timestamp
19, // 7: containerd.runtime.sandbox.v1.SandboxStatusResponse.info:type_name -> containerd.runtime.sandbox.v1.SandboxStatusResponse.InfoEntry
22, // 8: containerd.runtime.sandbox.v1.SandboxStatusResponse.created_at:type_name -> google.protobuf.Timestamp
22, // 9: containerd.runtime.sandbox.v1.SandboxStatusResponse.exited_at:type_name -> google.protobuf.Timestamp
21, // 10: containerd.runtime.sandbox.v1.SandboxStatusResponse.extra:type_name -> google.protobuf.Any
0, // 11: containerd.runtime.sandbox.v1.Sandbox.CreateSandbox:input_type -> containerd.runtime.sandbox.v1.CreateSandboxRequest
2, // 12: containerd.runtime.sandbox.v1.Sandbox.StartSandbox:input_type -> containerd.runtime.sandbox.v1.StartSandboxRequest
4, // 13: containerd.runtime.sandbox.v1.Sandbox.Platform:input_type -> containerd.runtime.sandbox.v1.PlatformRequest
6, // 14: containerd.runtime.sandbox.v1.Sandbox.StopSandbox:input_type -> containerd.runtime.sandbox.v1.StopSandboxRequest
9, // 15: containerd.runtime.sandbox.v1.Sandbox.WaitSandbox:input_type -> containerd.runtime.sandbox.v1.WaitSandboxRequest
12, // 16: containerd.runtime.sandbox.v1.Sandbox.SandboxStatus:input_type -> containerd.runtime.sandbox.v1.SandboxStatusRequest
14, // 17: containerd.runtime.sandbox.v1.Sandbox.PingSandbox:input_type -> containerd.runtime.sandbox.v1.PingRequest
16, // 18: containerd.runtime.sandbox.v1.Sandbox.ShutdownSandbox:input_type -> containerd.runtime.sandbox.v1.ShutdownSandboxRequest
1, // 19: containerd.runtime.sandbox.v1.Sandbox.CreateSandbox:output_type -> containerd.runtime.sandbox.v1.CreateSandboxResponse
3, // 20: containerd.runtime.sandbox.v1.Sandbox.StartSandbox:output_type -> containerd.runtime.sandbox.v1.StartSandboxResponse
5, // 21: containerd.runtime.sandbox.v1.Sandbox.Platform:output_type -> containerd.runtime.sandbox.v1.PlatformResponse
7, // 22: containerd.runtime.sandbox.v1.Sandbox.StopSandbox:output_type -> containerd.runtime.sandbox.v1.StopSandboxResponse
10, // 23: containerd.runtime.sandbox.v1.Sandbox.WaitSandbox:output_type -> containerd.runtime.sandbox.v1.WaitSandboxResponse
13, // 24: containerd.runtime.sandbox.v1.Sandbox.SandboxStatus:output_type -> containerd.runtime.sandbox.v1.SandboxStatusResponse
15, // 25: containerd.runtime.sandbox.v1.Sandbox.PingSandbox:output_type -> containerd.runtime.sandbox.v1.PingResponse
17, // 26: containerd.runtime.sandbox.v1.Sandbox.ShutdownSandbox:output_type -> containerd.runtime.sandbox.v1.ShutdownSandboxResponse
19, // [19:27] is the sub-list for method output_type
11, // [11:19] is the sub-list for method input_type
11, // [11:11] is the sub-list for extension type_name
11, // [11:11] is the sub-list for extension extendee
0, // [0:11] is the sub-list for field type_name
23, // 0: containerd.runtime.sandbox.v1.CreateSandboxRequest.rootfs:type_name -> containerd.types.Mount
24, // 1: containerd.runtime.sandbox.v1.CreateSandboxRequest.options:type_name -> google.protobuf.Any
20, // 2: containerd.runtime.sandbox.v1.CreateSandboxRequest.annotations:type_name -> containerd.runtime.sandbox.v1.CreateSandboxRequest.AnnotationsEntry
25, // 3: containerd.runtime.sandbox.v1.StartSandboxResponse.created_at:type_name -> google.protobuf.Timestamp
26, // 4: containerd.runtime.sandbox.v1.PlatformResponse.platform:type_name -> containerd.types.Platform
24, // 5: containerd.runtime.sandbox.v1.UpdateSandboxRequest.resources:type_name -> google.protobuf.Any
21, // 6: containerd.runtime.sandbox.v1.UpdateSandboxRequest.annotations:type_name -> containerd.runtime.sandbox.v1.UpdateSandboxRequest.AnnotationsEntry
25, // 7: containerd.runtime.sandbox.v1.WaitSandboxResponse.exited_at:type_name -> google.protobuf.Timestamp
22, // 8: containerd.runtime.sandbox.v1.SandboxStatusResponse.info:type_name -> containerd.runtime.sandbox.v1.SandboxStatusResponse.InfoEntry
25, // 9: containerd.runtime.sandbox.v1.SandboxStatusResponse.created_at:type_name -> google.protobuf.Timestamp
25, // 10: containerd.runtime.sandbox.v1.SandboxStatusResponse.exited_at:type_name -> google.protobuf.Timestamp
24, // 11: containerd.runtime.sandbox.v1.SandboxStatusResponse.extra:type_name -> google.protobuf.Any
27, // 12: containerd.runtime.sandbox.v1.SandboxMetricsResponse.metrics:type_name -> containerd.types.Metric
0, // 13: containerd.runtime.sandbox.v1.Sandbox.CreateSandbox:input_type -> containerd.runtime.sandbox.v1.CreateSandboxRequest
2, // 14: containerd.runtime.sandbox.v1.Sandbox.StartSandbox:input_type -> containerd.runtime.sandbox.v1.StartSandboxRequest
4, // 15: containerd.runtime.sandbox.v1.Sandbox.Platform:input_type -> containerd.runtime.sandbox.v1.PlatformRequest
6, // 16: containerd.runtime.sandbox.v1.Sandbox.StopSandbox:input_type -> containerd.runtime.sandbox.v1.StopSandboxRequest
9, // 17: containerd.runtime.sandbox.v1.Sandbox.WaitSandbox:input_type -> containerd.runtime.sandbox.v1.WaitSandboxRequest
12, // 18: containerd.runtime.sandbox.v1.Sandbox.SandboxStatus:input_type -> containerd.runtime.sandbox.v1.SandboxStatusRequest
14, // 19: containerd.runtime.sandbox.v1.Sandbox.PingSandbox:input_type -> containerd.runtime.sandbox.v1.PingRequest
16, // 20: containerd.runtime.sandbox.v1.Sandbox.ShutdownSandbox:input_type -> containerd.runtime.sandbox.v1.ShutdownSandboxRequest
18, // 21: containerd.runtime.sandbox.v1.Sandbox.SandboxMetrics:input_type -> containerd.runtime.sandbox.v1.SandboxMetricsRequest
1, // 22: containerd.runtime.sandbox.v1.Sandbox.CreateSandbox:output_type -> containerd.runtime.sandbox.v1.CreateSandboxResponse
3, // 23: containerd.runtime.sandbox.v1.Sandbox.StartSandbox:output_type -> containerd.runtime.sandbox.v1.StartSandboxResponse
5, // 24: containerd.runtime.sandbox.v1.Sandbox.Platform:output_type -> containerd.runtime.sandbox.v1.PlatformResponse
7, // 25: containerd.runtime.sandbox.v1.Sandbox.StopSandbox:output_type -> containerd.runtime.sandbox.v1.StopSandboxResponse
10, // 26: containerd.runtime.sandbox.v1.Sandbox.WaitSandbox:output_type -> containerd.runtime.sandbox.v1.WaitSandboxResponse
13, // 27: containerd.runtime.sandbox.v1.Sandbox.SandboxStatus:output_type -> containerd.runtime.sandbox.v1.SandboxStatusResponse
15, // 28: containerd.runtime.sandbox.v1.Sandbox.PingSandbox:output_type -> containerd.runtime.sandbox.v1.PingResponse
17, // 29: containerd.runtime.sandbox.v1.Sandbox.ShutdownSandbox:output_type -> containerd.runtime.sandbox.v1.ShutdownSandboxResponse
19, // 30: containerd.runtime.sandbox.v1.Sandbox.SandboxMetrics:output_type -> containerd.runtime.sandbox.v1.SandboxMetricsResponse
22, // [22:31] is the sub-list for method output_type
13, // [13:22] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
}
func init() { file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_init() }
@ -1458,6 +1599,30 @@ func file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_
return nil
}
}
file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SandboxMetricsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SandboxMetricsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -1465,7 +1630,7 @@ func file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_github_com_containerd_containerd_api_runtime_sandbox_v1_sandbox_proto_rawDesc,
NumEnums: 0,
NumMessages: 20,
NumMessages: 23,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -23,6 +23,7 @@ import "google/protobuf/timestamp.proto";
import "github.com/containerd/containerd/api/types/mount.proto";
import "github.com/containerd/containerd/api/types/platform.proto";
import "github.com/containerd/containerd/api/types/metrics.proto";
option go_package = "github.com/containerd/containerd/api/runtime/sandbox/v1;sandbox";
@ -34,7 +35,7 @@ service Sandbox {
// It is a good place to initialize sandbox environment.
rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse);
// StartSandbox will start previsouly created sandbox.
// StartSandbox will start a previously created sandbox.
rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse);
// Platform queries the platform the sandbox is going to run containers on.
@ -44,7 +45,7 @@ service Sandbox {
// StopSandbox will stop existing sandbox instance
rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse);
// WaitSandbox blocks until sanbox exits.
// WaitSandbox blocks until sandbox exits.
rpc WaitSandbox(WaitSandboxRequest) returns (WaitSandboxResponse);
// SandboxStatus will return current status of the running sandbox instance
@ -55,6 +56,9 @@ service Sandbox {
// ShutdownSandbox must shutdown shim instance.
rpc ShutdownSandbox(ShutdownSandboxRequest) returns (ShutdownSandboxResponse);
// SandboxMetrics retrieves metrics about a sandbox instance.
rpc SandboxMetrics(SandboxMetricsRequest) returns (SandboxMetricsResponse);
}
message CreateSandboxRequest {
@ -63,6 +67,7 @@ message CreateSandboxRequest {
repeated containerd.types.Mount rootfs = 3;
google.protobuf.Any options = 4;
string netns_path = 5;
map<string, string> annotations = 6;
}
message CreateSandboxResponse {}
@ -134,3 +139,11 @@ message ShutdownSandboxRequest {
}
message ShutdownSandboxResponse {}
message SandboxMetricsRequest {
string sandbox_id = 1;
}
message SandboxMetricsResponse {
containerd.types.Metric metrics = 1;
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
@ -25,14 +27,14 @@ type SandboxClient interface {
// CreateSandbox will be called right after sandbox shim instance launched.
// It is a good place to initialize sandbox environment.
CreateSandbox(ctx context.Context, in *CreateSandboxRequest, opts ...grpc.CallOption) (*CreateSandboxResponse, error)
// StartSandbox will start previsouly created sandbox.
// StartSandbox will start a previously created sandbox.
StartSandbox(ctx context.Context, in *StartSandboxRequest, opts ...grpc.CallOption) (*StartSandboxResponse, error)
// Platform queries the platform the sandbox is going to run containers on.
// containerd will use this to generate a proper OCI spec.
Platform(ctx context.Context, in *PlatformRequest, opts ...grpc.CallOption) (*PlatformResponse, error)
// StopSandbox will stop existing sandbox instance
StopSandbox(ctx context.Context, in *StopSandboxRequest, opts ...grpc.CallOption) (*StopSandboxResponse, error)
// WaitSandbox blocks until sanbox exits.
// WaitSandbox blocks until sandbox exits.
WaitSandbox(ctx context.Context, in *WaitSandboxRequest, opts ...grpc.CallOption) (*WaitSandboxResponse, error)
// SandboxStatus will return current status of the running sandbox instance
SandboxStatus(ctx context.Context, in *SandboxStatusRequest, opts ...grpc.CallOption) (*SandboxStatusResponse, error)
@ -40,6 +42,8 @@ type SandboxClient interface {
PingSandbox(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
// ShutdownSandbox must shutdown shim instance.
ShutdownSandbox(ctx context.Context, in *ShutdownSandboxRequest, opts ...grpc.CallOption) (*ShutdownSandboxResponse, error)
// SandboxMetrics retrieves metrics about a sandbox instance.
SandboxMetrics(ctx context.Context, in *SandboxMetricsRequest, opts ...grpc.CallOption) (*SandboxMetricsResponse, error)
}
type sandboxClient struct {
@ -122,6 +126,15 @@ func (c *sandboxClient) ShutdownSandbox(ctx context.Context, in *ShutdownSandbox
return out, nil
}
func (c *sandboxClient) SandboxMetrics(ctx context.Context, in *SandboxMetricsRequest, opts ...grpc.CallOption) (*SandboxMetricsResponse, error) {
out := new(SandboxMetricsResponse)
err := c.cc.Invoke(ctx, "/containerd.runtime.sandbox.v1.Sandbox/SandboxMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SandboxServer is the server API for Sandbox service.
// All implementations must embed UnimplementedSandboxServer
// for forward compatibility
@ -129,14 +142,14 @@ type SandboxServer interface {
// CreateSandbox will be called right after sandbox shim instance launched.
// It is a good place to initialize sandbox environment.
CreateSandbox(context.Context, *CreateSandboxRequest) (*CreateSandboxResponse, error)
// StartSandbox will start previsouly created sandbox.
// StartSandbox will start a previously created sandbox.
StartSandbox(context.Context, *StartSandboxRequest) (*StartSandboxResponse, error)
// Platform queries the platform the sandbox is going to run containers on.
// containerd will use this to generate a proper OCI spec.
Platform(context.Context, *PlatformRequest) (*PlatformResponse, error)
// StopSandbox will stop existing sandbox instance
StopSandbox(context.Context, *StopSandboxRequest) (*StopSandboxResponse, error)
// WaitSandbox blocks until sanbox exits.
// WaitSandbox blocks until sandbox exits.
WaitSandbox(context.Context, *WaitSandboxRequest) (*WaitSandboxResponse, error)
// SandboxStatus will return current status of the running sandbox instance
SandboxStatus(context.Context, *SandboxStatusRequest) (*SandboxStatusResponse, error)
@ -144,6 +157,8 @@ type SandboxServer interface {
PingSandbox(context.Context, *PingRequest) (*PingResponse, error)
// ShutdownSandbox must shutdown shim instance.
ShutdownSandbox(context.Context, *ShutdownSandboxRequest) (*ShutdownSandboxResponse, error)
// SandboxMetrics retrieves metrics about a sandbox instance.
SandboxMetrics(context.Context, *SandboxMetricsRequest) (*SandboxMetricsResponse, error)
mustEmbedUnimplementedSandboxServer()
}
@ -175,6 +190,9 @@ func (UnimplementedSandboxServer) PingSandbox(context.Context, *PingRequest) (*P
func (UnimplementedSandboxServer) ShutdownSandbox(context.Context, *ShutdownSandboxRequest) (*ShutdownSandboxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShutdownSandbox not implemented")
}
func (UnimplementedSandboxServer) SandboxMetrics(context.Context, *SandboxMetricsRequest) (*SandboxMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SandboxMetrics not implemented")
}
func (UnimplementedSandboxServer) mustEmbedUnimplementedSandboxServer() {}
// UnsafeSandboxServer may be embedded to opt out of forward compatibility for this service.
@ -332,6 +350,24 @@ func _Sandbox_ShutdownSandbox_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _Sandbox_SandboxMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SandboxMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SandboxServer).SandboxMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/containerd.runtime.sandbox.v1.Sandbox/SandboxMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SandboxServer).SandboxMetrics(ctx, req.(*SandboxMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
// Sandbox_ServiceDesc is the grpc.ServiceDesc for Sandbox service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -371,6 +407,10 @@ var Sandbox_ServiceDesc = grpc.ServiceDesc{
MethodName: "ShutdownSandbox",
Handler: _Sandbox_ShutdownSandbox_Handler,
},
{
MethodName: "SandboxMetrics",
Handler: _Sandbox_SandboxMetrics_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/containerd/containerd/api/runtime/sandbox/v1/sandbox.proto",

View File

@ -16,6 +16,7 @@ type TTRPCSandboxService interface {
SandboxStatus(context.Context, *SandboxStatusRequest) (*SandboxStatusResponse, error)
PingSandbox(context.Context, *PingRequest) (*PingResponse, error)
ShutdownSandbox(context.Context, *ShutdownSandboxRequest) (*ShutdownSandboxResponse, error)
SandboxMetrics(context.Context, *SandboxMetricsRequest) (*SandboxMetricsResponse, error)
}
func RegisterTTRPCSandboxService(srv *ttrpc.Server, svc TTRPCSandboxService) {
@ -77,6 +78,13 @@ func RegisterTTRPCSandboxService(srv *ttrpc.Server, svc TTRPCSandboxService) {
}
return svc.ShutdownSandbox(ctx, &req)
},
"SandboxMetrics": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req SandboxMetricsRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.SandboxMetrics(ctx, &req)
},
},
})
}
@ -154,3 +162,11 @@ func (c *ttrpcsandboxClient) ShutdownSandbox(ctx context.Context, req *ShutdownS
}
return &resp, nil
}
func (c *ttrpcsandboxClient) SandboxMetrics(ctx context.Context, req *SandboxMetricsRequest) (*SandboxMetricsResponse, error) {
var resp SandboxMetricsResponse
if err := c.client.Call(ctx, "containerd.runtime.sandbox.v1.Sandbox", "SandboxMetrics", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,174 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/containers/v1/containers.proto
package containers
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCContainersService interface {
Get(context.Context, *GetContainerRequest) (*GetContainerResponse, error)
List(context.Context, *ListContainersRequest) (*ListContainersResponse, error)
ListStream(context.Context, *ListContainersRequest, TTRPCContainers_ListStreamServer) error
Create(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error)
Update(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error)
Delete(context.Context, *DeleteContainerRequest) (*emptypb.Empty, error)
}
type TTRPCContainers_ListStreamServer interface {
Send(*ListContainerMessage) error
ttrpc.StreamServer
}
type ttrpccontainersListStreamServer struct {
ttrpc.StreamServer
}
func (x *ttrpccontainersListStreamServer) Send(m *ListContainerMessage) error {
return x.StreamServer.SendMsg(m)
}
func RegisterTTRPCContainersService(srv *ttrpc.Server, svc TTRPCContainersService) {
srv.RegisterService("containerd.services.containers.v1.Containers", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Get": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req GetContainerRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Get(ctx, &req)
},
"List": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListContainersRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.List(ctx, &req)
},
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CreateContainerRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UpdateContainerRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteContainerRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
},
Streams: map[string]ttrpc.Stream{
"ListStream": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
m := new(ListContainersRequest)
if err := stream.RecvMsg(m); err != nil {
return nil, err
}
return nil, svc.ListStream(ctx, m, &ttrpccontainersListStreamServer{stream})
},
StreamingClient: false,
StreamingServer: true,
},
},
})
}
type TTRPCContainersClient interface {
Get(context.Context, *GetContainerRequest) (*GetContainerResponse, error)
List(context.Context, *ListContainersRequest) (*ListContainersResponse, error)
ListStream(context.Context, *ListContainersRequest) (TTRPCContainers_ListStreamClient, error)
Create(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error)
Update(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error)
Delete(context.Context, *DeleteContainerRequest) (*emptypb.Empty, error)
}
type ttrpccontainersClient struct {
client *ttrpc.Client
}
func NewTTRPCContainersClient(client *ttrpc.Client) TTRPCContainersClient {
return &ttrpccontainersClient{
client: client,
}
}
func (c *ttrpccontainersClient) Get(ctx context.Context, req *GetContainerRequest) (*GetContainerResponse, error) {
var resp GetContainerResponse
if err := c.client.Call(ctx, "containerd.services.containers.v1.Containers", "Get", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontainersClient) List(ctx context.Context, req *ListContainersRequest) (*ListContainersResponse, error) {
var resp ListContainersResponse
if err := c.client.Call(ctx, "containerd.services.containers.v1.Containers", "List", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontainersClient) ListStream(ctx context.Context, req *ListContainersRequest) (TTRPCContainers_ListStreamClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: false,
StreamingServer: true,
}, "containerd.services.containers.v1.Containers", "ListStream", req)
if err != nil {
return nil, err
}
x := &ttrpccontainersListStreamClient{stream}
return x, nil
}
type TTRPCContainers_ListStreamClient interface {
Recv() (*ListContainerMessage, error)
ttrpc.ClientStream
}
type ttrpccontainersListStreamClient struct {
ttrpc.ClientStream
}
func (x *ttrpccontainersListStreamClient) Recv() (*ListContainerMessage, error) {
m := new(ListContainerMessage)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *ttrpccontainersClient) Create(ctx context.Context, req *CreateContainerRequest) (*CreateContainerResponse, error) {
var resp CreateContainerResponse
if err := c.client.Call(ctx, "containerd.services.containers.v1.Containers", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontainersClient) Update(ctx context.Context, req *UpdateContainerRequest) (*UpdateContainerResponse, error) {
var resp UpdateContainerResponse
if err := c.client.Call(ctx, "containerd.services.containers.v1.Containers", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontainersClient) Delete(ctx context.Context, req *DeleteContainerRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.containers.v1.Containers", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,311 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/content/v1/content.proto
package content
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCContentService interface {
Info(context.Context, *InfoRequest) (*InfoResponse, error)
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
List(context.Context, *ListContentRequest, TTRPCContent_ListServer) error
Delete(context.Context, *DeleteContentRequest) (*emptypb.Empty, error)
Read(context.Context, *ReadContentRequest, TTRPCContent_ReadServer) error
Status(context.Context, *StatusRequest) (*StatusResponse, error)
ListStatuses(context.Context, *ListStatusesRequest) (*ListStatusesResponse, error)
Write(context.Context, TTRPCContent_WriteServer) error
Abort(context.Context, *AbortRequest) (*emptypb.Empty, error)
}
type TTRPCContent_ListServer interface {
Send(*ListContentResponse) error
ttrpc.StreamServer
}
type ttrpccontentListServer struct {
ttrpc.StreamServer
}
func (x *ttrpccontentListServer) Send(m *ListContentResponse) error {
return x.StreamServer.SendMsg(m)
}
type TTRPCContent_ReadServer interface {
Send(*ReadContentResponse) error
ttrpc.StreamServer
}
type ttrpccontentReadServer struct {
ttrpc.StreamServer
}
func (x *ttrpccontentReadServer) Send(m *ReadContentResponse) error {
return x.StreamServer.SendMsg(m)
}
type TTRPCContent_WriteServer interface {
Send(*WriteContentResponse) error
Recv() (*WriteContentRequest, error)
ttrpc.StreamServer
}
type ttrpccontentWriteServer struct {
ttrpc.StreamServer
}
func (x *ttrpccontentWriteServer) Send(m *WriteContentResponse) error {
return x.StreamServer.SendMsg(m)
}
func (x *ttrpccontentWriteServer) Recv() (*WriteContentRequest, error) {
m := new(WriteContentRequest)
if err := x.StreamServer.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func RegisterTTRPCContentService(srv *ttrpc.Server, svc TTRPCContentService) {
srv.RegisterService("containerd.services.content.v1.Content", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Info": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req InfoRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Info(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UpdateRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteContentRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
"Status": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StatusRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Status(ctx, &req)
},
"ListStatuses": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListStatusesRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.ListStatuses(ctx, &req)
},
"Abort": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req AbortRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Abort(ctx, &req)
},
},
Streams: map[string]ttrpc.Stream{
"List": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
m := new(ListContentRequest)
if err := stream.RecvMsg(m); err != nil {
return nil, err
}
return nil, svc.List(ctx, m, &ttrpccontentListServer{stream})
},
StreamingClient: false,
StreamingServer: true,
},
"Read": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
m := new(ReadContentRequest)
if err := stream.RecvMsg(m); err != nil {
return nil, err
}
return nil, svc.Read(ctx, m, &ttrpccontentReadServer{stream})
},
StreamingClient: false,
StreamingServer: true,
},
"Write": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
return nil, svc.Write(ctx, &ttrpccontentWriteServer{stream})
},
StreamingClient: true,
StreamingServer: true,
},
},
})
}
type TTRPCContentClient interface {
Info(context.Context, *InfoRequest) (*InfoResponse, error)
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
List(context.Context, *ListContentRequest) (TTRPCContent_ListClient, error)
Delete(context.Context, *DeleteContentRequest) (*emptypb.Empty, error)
Read(context.Context, *ReadContentRequest) (TTRPCContent_ReadClient, error)
Status(context.Context, *StatusRequest) (*StatusResponse, error)
ListStatuses(context.Context, *ListStatusesRequest) (*ListStatusesResponse, error)
Write(context.Context) (TTRPCContent_WriteClient, error)
Abort(context.Context, *AbortRequest) (*emptypb.Empty, error)
}
type ttrpccontentClient struct {
client *ttrpc.Client
}
func NewTTRPCContentClient(client *ttrpc.Client) TTRPCContentClient {
return &ttrpccontentClient{
client: client,
}
}
func (c *ttrpccontentClient) Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error) {
var resp InfoResponse
if err := c.client.Call(ctx, "containerd.services.content.v1.Content", "Info", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontentClient) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error) {
var resp UpdateResponse
if err := c.client.Call(ctx, "containerd.services.content.v1.Content", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontentClient) List(ctx context.Context, req *ListContentRequest) (TTRPCContent_ListClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: false,
StreamingServer: true,
}, "containerd.services.content.v1.Content", "List", req)
if err != nil {
return nil, err
}
x := &ttrpccontentListClient{stream}
return x, nil
}
type TTRPCContent_ListClient interface {
Recv() (*ListContentResponse, error)
ttrpc.ClientStream
}
type ttrpccontentListClient struct {
ttrpc.ClientStream
}
func (x *ttrpccontentListClient) Recv() (*ListContentResponse, error) {
m := new(ListContentResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *ttrpccontentClient) Delete(ctx context.Context, req *DeleteContentRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.content.v1.Content", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontentClient) Read(ctx context.Context, req *ReadContentRequest) (TTRPCContent_ReadClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: false,
StreamingServer: true,
}, "containerd.services.content.v1.Content", "Read", req)
if err != nil {
return nil, err
}
x := &ttrpccontentReadClient{stream}
return x, nil
}
type TTRPCContent_ReadClient interface {
Recv() (*ReadContentResponse, error)
ttrpc.ClientStream
}
type ttrpccontentReadClient struct {
ttrpc.ClientStream
}
func (x *ttrpccontentReadClient) Recv() (*ReadContentResponse, error) {
m := new(ReadContentResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *ttrpccontentClient) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error) {
var resp StatusResponse
if err := c.client.Call(ctx, "containerd.services.content.v1.Content", "Status", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontentClient) ListStatuses(ctx context.Context, req *ListStatusesRequest) (*ListStatusesResponse, error) {
var resp ListStatusesResponse
if err := c.client.Call(ctx, "containerd.services.content.v1.Content", "ListStatuses", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontentClient) Write(ctx context.Context) (TTRPCContent_WriteClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: true,
StreamingServer: true,
}, "containerd.services.content.v1.Content", "Write", nil)
if err != nil {
return nil, err
}
x := &ttrpccontentWriteClient{stream}
return x, nil
}
type TTRPCContent_WriteClient interface {
Send(*WriteContentRequest) error
Recv() (*WriteContentResponse, error)
ttrpc.ClientStream
}
type ttrpccontentWriteClient struct {
ttrpc.ClientStream
}
func (x *ttrpccontentWriteClient) Send(m *WriteContentRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *ttrpccontentWriteClient) Recv() (*WriteContentResponse, error) {
m := new(WriteContentResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *ttrpccontentClient) Abort(ctx context.Context, req *AbortRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.content.v1.Content", "Abort", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -47,6 +47,8 @@ type ApplyRequest struct {
Diff *types.Descriptor `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
Mounts []*types.Mount `protobuf:"bytes,2,rep,name=mounts,proto3" json:"mounts,omitempty"`
Payloads map[string]*anypb.Any `protobuf:"bytes,3,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// SyncFs is to synchronize the underlying filesystem containing files.
SyncFs bool `protobuf:"varint,4,opt,name=sync_fs,json=syncFs,proto3" json:"sync_fs,omitempty"`
}
func (x *ApplyRequest) Reset() {
@ -102,6 +104,13 @@ func (x *ApplyRequest) GetPayloads() map[string]*anypb.Any {
return nil
}
func (x *ApplyRequest) GetSyncFs() bool {
if x != nil {
return x.SyncFs
}
return false
}
type ApplyResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -172,8 +181,11 @@ type DiffRequest struct {
// Labels are the labels to apply to the generated content
// on content store commit.
Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// SourceDateEpoch specifies the timestamp used for whiteouts to provide control for reproducibility.
// SourceDateEpoch specifies the timestamp used to provide control for reproducibility.
// See also https://reproducible-builds.org/docs/source-date-epoch/ .
//
// Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01),
// not to the source date epoch.
SourceDateEpoch *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=source_date_epoch,json=sourceDateEpoch,proto3" json:"source_date_epoch,omitempty"`
}
@ -319,7 +331,7 @@ var file_github_com_containerd_containerd_api_services_diff_v1_diff_proto_rawDes
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x99, 0x02, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x22, 0xb2, 0x02, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70,
0x65, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x04, 0x64,
@ -331,61 +343,62 @@ var file_github_com_containerd_containerd_api_services_diff_v1_diff_proto_rawDes
0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66,
0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x1a, 0x51, 0x0a, 0x0d, 0x50, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, 0x0d,
0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a,
0x07, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x61, 0x70,
0x70, 0x6c, 0x69, 0x65, 0x64, 0x22, 0xeb, 0x02, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x65,
0x66, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x05, 0x72, 0x69, 0x67, 0x68,
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65,
0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72,
0x65, 0x66, 0x12, 0x4c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31,
0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x12, 0x46, 0x0a, 0x11, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f,
0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44,
0x61, 0x74, 0x65, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x02, 0x38, 0x01, 0x22, 0x40, 0x0a, 0x0c, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74,
0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52,
0x04, 0x64, 0x69, 0x66, 0x66, 0x32, 0xc3, 0x01, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x5e,
0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69,
0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31,
0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b,
0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66,
0x66, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x44,
0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x64, 0x69, 0x66,
0x66, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x66, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x6e,
0x63, 0x5f, 0x66, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63,
0x46, 0x73, 0x1a, 0x51, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x22, 0xeb,
0x02, 0x0a, 0x0b, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b,
0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x72,
0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4d, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65,
0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x4c, 0x0a, 0x06, 0x6c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x46, 0x0a, 0x11, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x52, 0x0f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x61, 0x74, 0x65, 0x45, 0x70, 0x6f, 0x63,
0x68, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x40, 0x0a, 0x0c,
0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x04,
0x64, 0x69, 0x66, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x32, 0xc3,
0x01, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12, 0x5e, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79,
0x12, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41,
0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x04, 0x44, 0x69, 0x66, 0x66, 0x12,
0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69,
0x66, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
0x64, 0x69, 0x66, 0x66, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x64, 0x69, 0x66, 0x66, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69,
0x66, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -44,6 +44,8 @@ message ApplyRequest {
repeated containerd.types.Mount mounts = 2;
map<string, google.protobuf.Any> payloads = 3;
// SyncFs is to synchronize the underlying filesystem containing files.
bool sync_fs = 4;
}
message ApplyResponse {
@ -74,8 +76,11 @@ message DiffRequest {
// on content store commit.
map<string, string> labels = 5;
// SourceDateEpoch specifies the timestamp used for whiteouts to provide control for reproducibility.
// SourceDateEpoch specifies the timestamp used to provide control for reproducibility.
// See also https://reproducible-builds.org/docs/source-date-epoch/ .
//
// Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01),
// not to the source date epoch.
google.protobuf.Timestamp source_date_epoch = 6;
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,60 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/diff/v1/diff.proto
package diff
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
)
type TTRPCDiffService interface {
Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
Diff(context.Context, *DiffRequest) (*DiffResponse, error)
}
func RegisterTTRPCDiffService(srv *ttrpc.Server, svc TTRPCDiffService) {
srv.RegisterService("containerd.services.diff.v1.Diff", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Apply": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ApplyRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Apply(ctx, &req)
},
"Diff": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DiffRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Diff(ctx, &req)
},
},
})
}
type ttrpcdiffClient struct {
client *ttrpc.Client
}
func NewTTRPCDiffClient(client *ttrpc.Client) TTRPCDiffService {
return &ttrpcdiffClient{
client: client,
}
}
func (c *ttrpcdiffClient) Apply(ctx context.Context, req *ApplyRequest) (*ApplyResponse, error) {
var resp ApplyResponse
if err := c.client.Call(ctx, "containerd.services.diff.v1.Diff", "Apply", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcdiffClient) Diff(ctx context.Context, req *DiffRequest) (*DiffResponse, error) {
var resp DiffResponse
if err := c.client.Call(ctx, "containerd.services.diff.v1.Diff", "Diff", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -16,3 +16,8 @@
// Package events defines the event pushing and subscription service.
package events
import types "github.com/containerd/containerd/api/types"
// Deprecated: Use [types.Envelope].
type Envelope = types.Envelope

View File

@ -22,12 +22,11 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
types "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@ -99,7 +98,7 @@ type ForwardRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
Envelope *types.Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
}
func (x *ForwardRequest) Reset() {
@ -134,7 +133,7 @@ func (*ForwardRequest) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_events_v1_events_proto_rawDescGZIP(), []int{1}
}
func (x *ForwardRequest) GetEnvelope() *Envelope {
func (x *ForwardRequest) GetEnvelope() *types.Envelope {
if x != nil {
return x.Envelope
}
@ -188,77 +187,6 @@ func (x *SubscribeRequest) GetFilters() []string {
return nil
}
type Envelope struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
Event *anypb.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
}
func (x *Envelope) Reset() {
*x = Envelope{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_services_events_v1_events_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Envelope) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Envelope) ProtoMessage() {}
func (x *Envelope) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_services_events_v1_events_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Envelope.ProtoReflect.Descriptor instead.
func (*Envelope) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_events_v1_events_proto_rawDescGZIP(), []int{3}
}
func (x *Envelope) GetTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.Timestamp
}
return nil
}
func (x *Envelope) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Envelope) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *Envelope) GetEvent() *anypb.Any {
if x != nil {
return x.Event
}
return nil
}
var File_github_com_containerd_containerd_api_services_events_v1_events_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_services_events_v1_events_proto_rawDesc = []byte{
@ -268,63 +196,48 @@ var file_github_com_containerd_containerd_api_services_events_v1_events_proto_ra
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74,
0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x52, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f,
0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65,
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70,
0x65, 0x52, 0x08, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x53,
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x08, 0x45, 0x6e,
0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
0x6f, 0x70, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x3a, 0x04, 0x80, 0xb9, 0x1f, 0x01, 0x32, 0x95, 0x02, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x12, 0x50, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x2d, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62,
0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x2d,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46,
0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x67, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69,
0x62, 0x65, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e,
0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x30, 0x01, 0x42, 0x40,
0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x2a, 0x0a,
0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x79, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x0e, 0x46, 0x6f, 0x72,
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x65,
0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x08, 0x65, 0x6e, 0x76, 0x65, 0x6c,
0x6f, 0x70, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65,
0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
0x73, 0x32, 0x88, 0x02, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x07,
0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x50,
0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x12, 0x5a, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x2f, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75,
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x30, 0x01, 0x42, 0x40, 0x5a, 0x3e,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -339,32 +252,29 @@ func file_github_com_containerd_containerd_api_services_events_v1_events_proto_r
return file_github_com_containerd_containerd_api_services_events_v1_events_proto_rawDescData
}
var file_github_com_containerd_containerd_api_services_events_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_github_com_containerd_containerd_api_services_events_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_github_com_containerd_containerd_api_services_events_v1_events_proto_goTypes = []interface{}{
(*PublishRequest)(nil), // 0: containerd.services.events.v1.PublishRequest
(*ForwardRequest)(nil), // 1: containerd.services.events.v1.ForwardRequest
(*SubscribeRequest)(nil), // 2: containerd.services.events.v1.SubscribeRequest
(*Envelope)(nil), // 3: containerd.services.events.v1.Envelope
(*anypb.Any)(nil), // 4: google.protobuf.Any
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 6: google.protobuf.Empty
(*PublishRequest)(nil), // 0: containerd.services.events.v1.PublishRequest
(*ForwardRequest)(nil), // 1: containerd.services.events.v1.ForwardRequest
(*SubscribeRequest)(nil), // 2: containerd.services.events.v1.SubscribeRequest
(*anypb.Any)(nil), // 3: google.protobuf.Any
(*types.Envelope)(nil), // 4: containerd.types.Envelope
(*emptypb.Empty)(nil), // 5: google.protobuf.Empty
}
var file_github_com_containerd_containerd_api_services_events_v1_events_proto_depIdxs = []int32{
4, // 0: containerd.services.events.v1.PublishRequest.event:type_name -> google.protobuf.Any
3, // 1: containerd.services.events.v1.ForwardRequest.envelope:type_name -> containerd.services.events.v1.Envelope
5, // 2: containerd.services.events.v1.Envelope.timestamp:type_name -> google.protobuf.Timestamp
4, // 3: containerd.services.events.v1.Envelope.event:type_name -> google.protobuf.Any
0, // 4: containerd.services.events.v1.Events.Publish:input_type -> containerd.services.events.v1.PublishRequest
1, // 5: containerd.services.events.v1.Events.Forward:input_type -> containerd.services.events.v1.ForwardRequest
2, // 6: containerd.services.events.v1.Events.Subscribe:input_type -> containerd.services.events.v1.SubscribeRequest
6, // 7: containerd.services.events.v1.Events.Publish:output_type -> google.protobuf.Empty
6, // 8: containerd.services.events.v1.Events.Forward:output_type -> google.protobuf.Empty
3, // 9: containerd.services.events.v1.Events.Subscribe:output_type -> containerd.services.events.v1.Envelope
7, // [7:10] is the sub-list for method output_type
4, // [4:7] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
3, // 0: containerd.services.events.v1.PublishRequest.event:type_name -> google.protobuf.Any
4, // 1: containerd.services.events.v1.ForwardRequest.envelope:type_name -> containerd.types.Envelope
0, // 2: containerd.services.events.v1.Events.Publish:input_type -> containerd.services.events.v1.PublishRequest
1, // 3: containerd.services.events.v1.Events.Forward:input_type -> containerd.services.events.v1.ForwardRequest
2, // 4: containerd.services.events.v1.Events.Subscribe:input_type -> containerd.services.events.v1.SubscribeRequest
5, // 5: containerd.services.events.v1.Events.Publish:output_type -> google.protobuf.Empty
5, // 6: containerd.services.events.v1.Events.Forward:output_type -> google.protobuf.Empty
4, // 7: containerd.services.events.v1.Events.Subscribe:output_type -> containerd.types.Envelope
5, // [5:8] is the sub-list for method output_type
2, // [2:5] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_github_com_containerd_containerd_api_services_events_v1_events_proto_init() }
@ -409,18 +319,6 @@ func file_github_com_containerd_containerd_api_services_events_v1_events_proto_i
return nil
}
}
file_github_com_containerd_containerd_api_services_events_v1_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Envelope); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -428,7 +326,7 @@ func file_github_com_containerd_containerd_api_services_events_v1_events_proto_i
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_github_com_containerd_containerd_api_services_events_v1_events_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -18,10 +18,9 @@ syntax = "proto3";
package containerd.services.events.v1;
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "github.com/containerd/containerd/api/types/event.proto";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/services/events/v1;events";
@ -46,7 +45,7 @@ service Events {
// from all namespaces unless otherwise specified. If this is not desired,
// a filter can be provided in the format 'namespace==<namespace>' to
// restrict the received events.
rpc Subscribe(SubscribeRequest) returns (stream Envelope);
rpc Subscribe(SubscribeRequest) returns (stream containerd.types.Envelope);
}
message PublishRequest {
@ -55,17 +54,9 @@ message PublishRequest {
}
message ForwardRequest {
Envelope envelope = 1;
containerd.types.Envelope envelope = 1;
}
message SubscribeRequest {
repeated string filters = 1;
}
message Envelope {
option (containerd.plugin.fieldpath) = true;
google.protobuf.Timestamp timestamp = 1;
string namespace = 2;
string topic = 3;
google.protobuf.Any event = 4;
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
@ -8,6 +10,7 @@ package events
import (
context "context"
types "github.com/containerd/containerd/api/types"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@ -86,7 +89,7 @@ func (c *eventsClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts
}
type Events_SubscribeClient interface {
Recv() (*Envelope, error)
Recv() (*types.Envelope, error)
grpc.ClientStream
}
@ -94,8 +97,8 @@ type eventsSubscribeClient struct {
grpc.ClientStream
}
func (x *eventsSubscribeClient) Recv() (*Envelope, error) {
m := new(Envelope)
func (x *eventsSubscribeClient) Recv() (*types.Envelope, error) {
m := new(types.Envelope)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
@ -199,7 +202,7 @@ func _Events_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error
}
type Events_SubscribeServer interface {
Send(*Envelope) error
Send(*types.Envelope) error
grpc.ServerStream
}
@ -207,7 +210,7 @@ type eventsSubscribeServer struct {
grpc.ServerStream
}
func (x *eventsSubscribeServer) Send(m *Envelope) error {
func (x *eventsSubscribeServer) Send(m *types.Envelope) error {
return x.ServerStream.SendMsg(m)
}

View File

@ -0,0 +1,124 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/events/v1/events.proto
package events
import (
context "context"
types "github.com/containerd/containerd/api/types"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCEventsService interface {
Publish(context.Context, *PublishRequest) (*emptypb.Empty, error)
Forward(context.Context, *ForwardRequest) (*emptypb.Empty, error)
Subscribe(context.Context, *SubscribeRequest, TTRPCEvents_SubscribeServer) error
}
type TTRPCEvents_SubscribeServer interface {
Send(*types.Envelope) error
ttrpc.StreamServer
}
type ttrpceventsSubscribeServer struct {
ttrpc.StreamServer
}
func (x *ttrpceventsSubscribeServer) Send(m *types.Envelope) error {
return x.StreamServer.SendMsg(m)
}
func RegisterTTRPCEventsService(srv *ttrpc.Server, svc TTRPCEventsService) {
srv.RegisterService("containerd.services.events.v1.Events", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Publish": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req PublishRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Publish(ctx, &req)
},
"Forward": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ForwardRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Forward(ctx, &req)
},
},
Streams: map[string]ttrpc.Stream{
"Subscribe": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
m := new(SubscribeRequest)
if err := stream.RecvMsg(m); err != nil {
return nil, err
}
return nil, svc.Subscribe(ctx, m, &ttrpceventsSubscribeServer{stream})
},
StreamingClient: false,
StreamingServer: true,
},
},
})
}
type TTRPCEventsClient interface {
Publish(context.Context, *PublishRequest) (*emptypb.Empty, error)
Forward(context.Context, *ForwardRequest) (*emptypb.Empty, error)
Subscribe(context.Context, *SubscribeRequest) (TTRPCEvents_SubscribeClient, error)
}
type ttrpceventsClient struct {
client *ttrpc.Client
}
func NewTTRPCEventsClient(client *ttrpc.Client) TTRPCEventsClient {
return &ttrpceventsClient{
client: client,
}
}
func (c *ttrpceventsClient) Publish(ctx context.Context, req *PublishRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.events.v1.Events", "Publish", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpceventsClient) Forward(ctx context.Context, req *ForwardRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.events.v1.Events", "Forward", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpceventsClient) Subscribe(ctx context.Context, req *SubscribeRequest) (TTRPCEvents_SubscribeClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: false,
StreamingServer: true,
}, "containerd.services.events.v1.Events", "Subscribe", req)
if err != nil {
return nil, err
}
x := &ttrpceventsSubscribeClient{stream}
return x, nil
}
type TTRPCEvents_SubscribeClient interface {
Recv() (*types.Envelope, error)
ttrpc.ClientStream
}
type ttrpceventsSubscribeClient struct {
ttrpc.ClientStream
}
func (x *ttrpceventsSubscribeClient) Recv() (*types.Envelope, error) {
m := new(types.Envelope)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}

View File

@ -555,6 +555,11 @@ type DeleteImageRequest struct {
//
// Default is false
Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"`
// Target value for image to be deleted
//
// If image descriptor does not match the same digest,
// the delete operation will return "not found" error.
Target *types.Descriptor `protobuf:"bytes,3,opt,name=target,proto3,oneof" json:"target,omitempty"`
}
func (x *DeleteImageRequest) Reset() {
@ -603,6 +608,13 @@ func (x *DeleteImageRequest) GetSync() bool {
return false
}
func (x *DeleteImageRequest) GetTarget() *types.Descriptor {
if x != nil {
return x.Target
}
return nil
}
var File_github_com_containerd_containerd_api_services_images_v1_images_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_services_images_v1_images_proto_rawDesc = []byte{
@ -692,49 +704,53 @@ var file_github_com_containerd_containerd_api_services_images_v1_images_proto_ra
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61,
0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x06, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d,
0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73, 0x79,
0x6e, 0x63, 0x32, 0x94, 0x04, 0x0a, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x66, 0x0a,
0x03, 0x47, 0x65, 0x74, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x61, 0x67, 0x65, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x73,
0x79, 0x6e, 0x63, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
0x72, 0x48, 0x00, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x88, 0x01, 0x01, 0x42, 0x09,
0x0a, 0x07, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x32, 0x94, 0x04, 0x0a, 0x06, 0x49, 0x6d,
0x61, 0x67, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x2e, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49,
0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x04,
0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61,
0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73,
0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61,
0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x31, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x31,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x73, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d,
0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6d,
0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x06, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6d, 0x61, 0x67,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -781,21 +797,22 @@ var file_github_com_containerd_containerd_api_services_images_v1_images_proto_de
12, // 10: containerd.services.images.v1.UpdateImageRequest.source_date_epoch:type_name -> google.protobuf.Timestamp
0, // 11: containerd.services.images.v1.UpdateImageResponse.image:type_name -> containerd.services.images.v1.Image
0, // 12: containerd.services.images.v1.ListImagesResponse.images:type_name -> containerd.services.images.v1.Image
1, // 13: containerd.services.images.v1.Images.Get:input_type -> containerd.services.images.v1.GetImageRequest
7, // 14: containerd.services.images.v1.Images.List:input_type -> containerd.services.images.v1.ListImagesRequest
3, // 15: containerd.services.images.v1.Images.Create:input_type -> containerd.services.images.v1.CreateImageRequest
5, // 16: containerd.services.images.v1.Images.Update:input_type -> containerd.services.images.v1.UpdateImageRequest
9, // 17: containerd.services.images.v1.Images.Delete:input_type -> containerd.services.images.v1.DeleteImageRequest
2, // 18: containerd.services.images.v1.Images.Get:output_type -> containerd.services.images.v1.GetImageResponse
8, // 19: containerd.services.images.v1.Images.List:output_type -> containerd.services.images.v1.ListImagesResponse
4, // 20: containerd.services.images.v1.Images.Create:output_type -> containerd.services.images.v1.CreateImageResponse
6, // 21: containerd.services.images.v1.Images.Update:output_type -> containerd.services.images.v1.UpdateImageResponse
14, // 22: containerd.services.images.v1.Images.Delete:output_type -> google.protobuf.Empty
18, // [18:23] is the sub-list for method output_type
13, // [13:18] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
11, // 13: containerd.services.images.v1.DeleteImageRequest.target:type_name -> containerd.types.Descriptor
1, // 14: containerd.services.images.v1.Images.Get:input_type -> containerd.services.images.v1.GetImageRequest
7, // 15: containerd.services.images.v1.Images.List:input_type -> containerd.services.images.v1.ListImagesRequest
3, // 16: containerd.services.images.v1.Images.Create:input_type -> containerd.services.images.v1.CreateImageRequest
5, // 17: containerd.services.images.v1.Images.Update:input_type -> containerd.services.images.v1.UpdateImageRequest
9, // 18: containerd.services.images.v1.Images.Delete:input_type -> containerd.services.images.v1.DeleteImageRequest
2, // 19: containerd.services.images.v1.Images.Get:output_type -> containerd.services.images.v1.GetImageResponse
8, // 20: containerd.services.images.v1.Images.List:output_type -> containerd.services.images.v1.ListImagesResponse
4, // 21: containerd.services.images.v1.Images.Create:output_type -> containerd.services.images.v1.CreateImageResponse
6, // 22: containerd.services.images.v1.Images.Update:output_type -> containerd.services.images.v1.UpdateImageResponse
14, // 23: containerd.services.images.v1.Images.Delete:output_type -> google.protobuf.Empty
19, // [19:24] is the sub-list for method output_type
14, // [14:19] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_github_com_containerd_containerd_api_services_images_v1_images_proto_init() }
@ -925,6 +942,7 @@ func file_github_com_containerd_containerd_api_services_images_v1_images_proto_i
}
}
}
file_github_com_containerd_containerd_api_services_images_v1_images_proto_msgTypes[9].OneofWrappers = []interface{}{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{

View File

@ -140,4 +140,10 @@ message DeleteImageRequest {
//
// Default is false
bool sync = 2;
// Target value for image to be deleted
//
// If image descriptor does not match the same digest,
// the delete operation will return "not found" error.
optional containerd.types.Descriptor target = 3;
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,109 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/images/v1/images.proto
package images
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCImagesService interface {
Get(context.Context, *GetImageRequest) (*GetImageResponse, error)
List(context.Context, *ListImagesRequest) (*ListImagesResponse, error)
Create(context.Context, *CreateImageRequest) (*CreateImageResponse, error)
Update(context.Context, *UpdateImageRequest) (*UpdateImageResponse, error)
Delete(context.Context, *DeleteImageRequest) (*emptypb.Empty, error)
}
func RegisterTTRPCImagesService(srv *ttrpc.Server, svc TTRPCImagesService) {
srv.RegisterService("containerd.services.images.v1.Images", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Get": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req GetImageRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Get(ctx, &req)
},
"List": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListImagesRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.List(ctx, &req)
},
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CreateImageRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UpdateImageRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteImageRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
},
})
}
type ttrpcimagesClient struct {
client *ttrpc.Client
}
func NewTTRPCImagesClient(client *ttrpc.Client) TTRPCImagesService {
return &ttrpcimagesClient{
client: client,
}
}
func (c *ttrpcimagesClient) Get(ctx context.Context, req *GetImageRequest) (*GetImageResponse, error) {
var resp GetImageResponse
if err := c.client.Call(ctx, "containerd.services.images.v1.Images", "Get", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcimagesClient) List(ctx context.Context, req *ListImagesRequest) (*ListImagesResponse, error) {
var resp ListImagesResponse
if err := c.client.Call(ctx, "containerd.services.images.v1.Images", "List", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcimagesClient) Create(ctx context.Context, req *CreateImageRequest) (*CreateImageResponse, error) {
var resp CreateImageResponse
if err := c.client.Call(ctx, "containerd.services.images.v1.Images", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcimagesClient) Update(ctx context.Context, req *UpdateImageRequest) (*UpdateImageResponse, error) {
var resp UpdateImageResponse
if err := c.client.Call(ctx, "containerd.services.images.v1.Images", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcimagesClient) Delete(ctx context.Context, req *DeleteImageRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.images.v1.Images", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -26,7 +26,9 @@ import (
status "google.golang.org/genproto/googleapis/rpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@ -272,9 +274,10 @@ type ServerResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UUID string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Pid uint64 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
Pidns uint64 `protobuf:"varint,3,opt,name=pidns,proto3" json:"pidns,omitempty"` // PID namespace, such as 4026531836
UUID string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
Pid uint64 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
Pidns uint64 `protobuf:"varint,3,opt,name=pidns,proto3" json:"pidns,omitempty"` // PID namespace, such as 4026531836
Deprecations []*DeprecationWarning `protobuf:"bytes,4,rep,name=deprecations,proto3" json:"deprecations,omitempty"`
}
func (x *ServerResponse) Reset() {
@ -330,6 +333,198 @@ func (x *ServerResponse) GetPidns() uint64 {
return 0
}
func (x *ServerResponse) GetDeprecations() []*DeprecationWarning {
if x != nil {
return x.Deprecations
}
return nil
}
type DeprecationWarning struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
LastOccurrence *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_occurrence,json=lastOccurrence,proto3" json:"last_occurrence,omitempty"`
}
func (x *DeprecationWarning) Reset() {
*x = DeprecationWarning{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeprecationWarning) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeprecationWarning) ProtoMessage() {}
func (x *DeprecationWarning) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeprecationWarning.ProtoReflect.Descriptor instead.
func (*DeprecationWarning) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_rawDescGZIP(), []int{4}
}
func (x *DeprecationWarning) GetID() string {
if x != nil {
return x.ID
}
return ""
}
func (x *DeprecationWarning) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *DeprecationWarning) GetLastOccurrence() *timestamppb.Timestamp {
if x != nil {
return x.LastOccurrence
}
return nil
}
type PluginInfoRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// Options may be used to request extra dynamic information from
// a plugin.
// This object is determined by the plugin and the plugin may return
// NotImplemented or InvalidArgument if it is not supported
Options *anypb.Any `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
}
func (x *PluginInfoRequest) Reset() {
*x = PluginInfoRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PluginInfoRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PluginInfoRequest) ProtoMessage() {}
func (x *PluginInfoRequest) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PluginInfoRequest.ProtoReflect.Descriptor instead.
func (*PluginInfoRequest) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_rawDescGZIP(), []int{5}
}
func (x *PluginInfoRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *PluginInfoRequest) GetID() string {
if x != nil {
return x.ID
}
return ""
}
func (x *PluginInfoRequest) GetOptions() *anypb.Any {
if x != nil {
return x.Options
}
return nil
}
type PluginInfoResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Plugin *Plugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
Extra *anypb.Any `protobuf:"bytes,2,opt,name=extra,proto3" json:"extra,omitempty"`
}
func (x *PluginInfoResponse) Reset() {
*x = PluginInfoResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PluginInfoResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PluginInfoResponse) ProtoMessage() {}
func (x *PluginInfoResponse) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PluginInfoResponse.ProtoReflect.Descriptor instead.
func (*PluginInfoResponse) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_rawDescGZIP(), []int{6}
}
func (x *PluginInfoResponse) GetPlugin() *Plugin {
if x != nil {
return x.Plugin
}
return nil
}
func (x *PluginInfoResponse) GetExtra() *anypb.Any {
if x != nil {
return x.Extra
}
return nil
}
var File_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_rawDesc = []byte{
@ -340,70 +535,115 @@ var file_github_com_containerd_containerd_api_services_introspection_v1_introspe
0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73,
0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x39, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70,
0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x02, 0x0a, 0x06,
0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65,
0x71, 0x75, 0x69, 0x72, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x72, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x50, 0x6c, 0x61,
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73,
0x12, 0x53, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x78,
0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x69, 0x6e, 0x69,
0x74, 0x5f, 0x65, 0x72, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
0x07, 0x69, 0x6e, 0x69, 0x74, 0x45, 0x72, 0x72, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6f,
0x72, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73,
0x22, 0x59, 0x0a, 0x0f, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f,
0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0x4c, 0x0a, 0x0e, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03,
0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x69, 0x64, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x04, 0x52, 0x05, 0x70, 0x69, 0x64, 0x6e, 0x73, 0x32, 0xdf, 0x01, 0x0a, 0x0d, 0x49, 0x6e,
0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x76, 0x0a, 0x07, 0x50,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74,
0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63,
0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61,
0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x02, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67,
0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72,
0x6d, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x12, 0x53, 0x0a, 0x07,
0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x70, 0x6f,
0x72, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c,
0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x65, 0x72,
0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x69, 0x6e, 0x69,
0x74, 0x45, 0x72, 0x72, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x2a, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0x59, 0x0a, 0x0f,
0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x46, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x70, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x70, 0x69, 0x64, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x70, 0x69, 0x64, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57,
0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6f, 0x63,
0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x6c, 0x61, 0x73, 0x74,
0x4f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x67, 0x0a, 0x11, 0x50, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
0x12, 0x2a, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x32, 0xe0, 0x02, 0x0a,
0x0d, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x76,
0x0a, 0x07, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69,
0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f,
0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x37, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x72,
0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4e, 0x5a, 0x4c, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74,
0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6e,
0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
0x4e, 0x5a, 0x4c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
0x2f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76,
0x31, 0x3b, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -418,31 +658,43 @@ func file_github_com_containerd_containerd_api_services_introspection_v1_introsp
return file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_rawDescData
}
var file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_goTypes = []interface{}{
(*Plugin)(nil), // 0: containerd.services.introspection.v1.Plugin
(*PluginsRequest)(nil), // 1: containerd.services.introspection.v1.PluginsRequest
(*PluginsResponse)(nil), // 2: containerd.services.introspection.v1.PluginsResponse
(*ServerResponse)(nil), // 3: containerd.services.introspection.v1.ServerResponse
nil, // 4: containerd.services.introspection.v1.Plugin.ExportsEntry
(*types.Platform)(nil), // 5: containerd.types.Platform
(*status.Status)(nil), // 6: google.rpc.Status
(*emptypb.Empty)(nil), // 7: google.protobuf.Empty
(*Plugin)(nil), // 0: containerd.services.introspection.v1.Plugin
(*PluginsRequest)(nil), // 1: containerd.services.introspection.v1.PluginsRequest
(*PluginsResponse)(nil), // 2: containerd.services.introspection.v1.PluginsResponse
(*ServerResponse)(nil), // 3: containerd.services.introspection.v1.ServerResponse
(*DeprecationWarning)(nil), // 4: containerd.services.introspection.v1.DeprecationWarning
(*PluginInfoRequest)(nil), // 5: containerd.services.introspection.v1.PluginInfoRequest
(*PluginInfoResponse)(nil), // 6: containerd.services.introspection.v1.PluginInfoResponse
nil, // 7: containerd.services.introspection.v1.Plugin.ExportsEntry
(*types.Platform)(nil), // 8: containerd.types.Platform
(*status.Status)(nil), // 9: google.rpc.Status
(*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
(*anypb.Any)(nil), // 11: google.protobuf.Any
(*emptypb.Empty)(nil), // 12: google.protobuf.Empty
}
var file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_depIdxs = []int32{
5, // 0: containerd.services.introspection.v1.Plugin.platforms:type_name -> containerd.types.Platform
4, // 1: containerd.services.introspection.v1.Plugin.exports:type_name -> containerd.services.introspection.v1.Plugin.ExportsEntry
6, // 2: containerd.services.introspection.v1.Plugin.init_err:type_name -> google.rpc.Status
0, // 3: containerd.services.introspection.v1.PluginsResponse.plugins:type_name -> containerd.services.introspection.v1.Plugin
1, // 4: containerd.services.introspection.v1.Introspection.Plugins:input_type -> containerd.services.introspection.v1.PluginsRequest
7, // 5: containerd.services.introspection.v1.Introspection.Server:input_type -> google.protobuf.Empty
2, // 6: containerd.services.introspection.v1.Introspection.Plugins:output_type -> containerd.services.introspection.v1.PluginsResponse
3, // 7: containerd.services.introspection.v1.Introspection.Server:output_type -> containerd.services.introspection.v1.ServerResponse
6, // [6:8] is the sub-list for method output_type
4, // [4:6] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
8, // 0: containerd.services.introspection.v1.Plugin.platforms:type_name -> containerd.types.Platform
7, // 1: containerd.services.introspection.v1.Plugin.exports:type_name -> containerd.services.introspection.v1.Plugin.ExportsEntry
9, // 2: containerd.services.introspection.v1.Plugin.init_err:type_name -> google.rpc.Status
0, // 3: containerd.services.introspection.v1.PluginsResponse.plugins:type_name -> containerd.services.introspection.v1.Plugin
4, // 4: containerd.services.introspection.v1.ServerResponse.deprecations:type_name -> containerd.services.introspection.v1.DeprecationWarning
10, // 5: containerd.services.introspection.v1.DeprecationWarning.last_occurrence:type_name -> google.protobuf.Timestamp
11, // 6: containerd.services.introspection.v1.PluginInfoRequest.options:type_name -> google.protobuf.Any
0, // 7: containerd.services.introspection.v1.PluginInfoResponse.plugin:type_name -> containerd.services.introspection.v1.Plugin
11, // 8: containerd.services.introspection.v1.PluginInfoResponse.extra:type_name -> google.protobuf.Any
1, // 9: containerd.services.introspection.v1.Introspection.Plugins:input_type -> containerd.services.introspection.v1.PluginsRequest
12, // 10: containerd.services.introspection.v1.Introspection.Server:input_type -> google.protobuf.Empty
5, // 11: containerd.services.introspection.v1.Introspection.PluginInfo:input_type -> containerd.services.introspection.v1.PluginInfoRequest
2, // 12: containerd.services.introspection.v1.Introspection.Plugins:output_type -> containerd.services.introspection.v1.PluginsResponse
3, // 13: containerd.services.introspection.v1.Introspection.Server:output_type -> containerd.services.introspection.v1.ServerResponse
6, // 14: containerd.services.introspection.v1.Introspection.PluginInfo:output_type -> containerd.services.introspection.v1.PluginInfoResponse
12, // [12:15] is the sub-list for method output_type
9, // [9:12] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() {
@ -501,6 +753,42 @@ func file_github_com_containerd_containerd_api_services_introspection_v1_introsp
return nil
}
}
file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeprecationWarning); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PluginInfoRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PluginInfoResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -508,7 +796,7 @@ func file_github_com_containerd_containerd_api_services_introspection_v1_introsp
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_github_com_containerd_containerd_api_services_introspection_v1_introspection_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -18,9 +18,12 @@ syntax = "proto3";
package containerd.services.introspection.v1;
import "google/protobuf/any.proto";
import "github.com/containerd/containerd/api/types/introspection.proto";
import "github.com/containerd/containerd/api/types/platform.proto";
import "google/rpc/status.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/services/introspection/v1;introspection";
@ -32,6 +35,8 @@ service Introspection {
rpc Plugins(PluginsRequest) returns (PluginsResponse);
// Server returns information about the containerd server
rpc Server(google.protobuf.Empty) returns (ServerResponse);
// PluginInfo returns information directly from a plugin if the plugin supports it
rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse);
}
message Plugin {
@ -102,4 +107,27 @@ message ServerResponse {
string uuid = 1;
uint64 pid = 2;
uint64 pidns = 3; // PID namespace, such as 4026531836
repeated DeprecationWarning deprecations = 4;
}
message DeprecationWarning {
string id = 1;
string message = 2;
google.protobuf.Timestamp last_occurrence = 3;
}
message PluginInfoRequest {
string type = 1;
string id = 2;
// Options may be used to request extra dynamic information from
// a plugin.
// This object is determined by the plugin and the plugin may return
// NotImplemented or InvalidArgument if it is not supported
google.protobuf.Any options = 3;
}
message PluginInfoResponse {
Plugin plugin = 1;
google.protobuf.Any extra = 2;
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
@ -30,6 +32,8 @@ type IntrospectionClient interface {
Plugins(ctx context.Context, in *PluginsRequest, opts ...grpc.CallOption) (*PluginsResponse, error)
// Server returns information about the containerd server
Server(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServerResponse, error)
// PluginInfo returns information directly from a plugin if the plugin supports it
PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error)
}
type introspectionClient struct {
@ -58,6 +62,15 @@ func (c *introspectionClient) Server(ctx context.Context, in *emptypb.Empty, opt
return out, nil
}
func (c *introspectionClient) PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error) {
out := new(PluginInfoResponse)
err := c.cc.Invoke(ctx, "/containerd.services.introspection.v1.Introspection/PluginInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IntrospectionServer is the server API for Introspection service.
// All implementations must embed UnimplementedIntrospectionServer
// for forward compatibility
@ -69,6 +82,8 @@ type IntrospectionServer interface {
Plugins(context.Context, *PluginsRequest) (*PluginsResponse, error)
// Server returns information about the containerd server
Server(context.Context, *emptypb.Empty) (*ServerResponse, error)
// PluginInfo returns information directly from a plugin if the plugin supports it
PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error)
mustEmbedUnimplementedIntrospectionServer()
}
@ -82,6 +97,9 @@ func (UnimplementedIntrospectionServer) Plugins(context.Context, *PluginsRequest
func (UnimplementedIntrospectionServer) Server(context.Context, *emptypb.Empty) (*ServerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Server not implemented")
}
func (UnimplementedIntrospectionServer) PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PluginInfo not implemented")
}
func (UnimplementedIntrospectionServer) mustEmbedUnimplementedIntrospectionServer() {}
// UnsafeIntrospectionServer may be embedded to opt out of forward compatibility for this service.
@ -131,6 +149,24 @@ func _Introspection_Server_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler)
}
func _Introspection_PluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PluginInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IntrospectionServer).PluginInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/containerd.services.introspection.v1.Introspection/PluginInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IntrospectionServer).PluginInfo(ctx, req.(*PluginInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
// Introspection_ServiceDesc is the grpc.ServiceDesc for Introspection service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -146,6 +182,10 @@ var Introspection_ServiceDesc = grpc.ServiceDesc{
MethodName: "Server",
Handler: _Introspection_Server_Handler,
},
{
MethodName: "PluginInfo",
Handler: _Introspection_PluginInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/containerd/containerd/api/services/introspection/v1/introspection.proto",

View File

@ -0,0 +1,77 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/introspection/v1/introspection.proto
package introspection
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCIntrospectionService interface {
Plugins(context.Context, *PluginsRequest) (*PluginsResponse, error)
Server(context.Context, *emptypb.Empty) (*ServerResponse, error)
PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error)
}
func RegisterTTRPCIntrospectionService(srv *ttrpc.Server, svc TTRPCIntrospectionService) {
srv.RegisterService("containerd.services.introspection.v1.Introspection", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Plugins": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req PluginsRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Plugins(ctx, &req)
},
"Server": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req emptypb.Empty
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Server(ctx, &req)
},
"PluginInfo": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req PluginInfoRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.PluginInfo(ctx, &req)
},
},
})
}
type ttrpcintrospectionClient struct {
client *ttrpc.Client
}
func NewTTRPCIntrospectionClient(client *ttrpc.Client) TTRPCIntrospectionService {
return &ttrpcintrospectionClient{
client: client,
}
}
func (c *ttrpcintrospectionClient) Plugins(ctx context.Context, req *PluginsRequest) (*PluginsResponse, error) {
var resp PluginsResponse
if err := c.client.Call(ctx, "containerd.services.introspection.v1.Introspection", "Plugins", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcintrospectionClient) Server(ctx context.Context, req *emptypb.Empty) (*ServerResponse, error) {
var resp ServerResponse
if err := c.client.Call(ctx, "containerd.services.introspection.v1.Introspection", "Server", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcintrospectionClient) PluginInfo(ctx context.Context, req *PluginInfoRequest) (*PluginInfoResponse, error) {
var resp PluginInfoResponse
if err := c.client.Call(ctx, "containerd.services.introspection.v1.Introspection", "PluginInfo", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,125 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/leases/v1/leases.proto
package leases
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCLeasesService interface {
Create(context.Context, *CreateRequest) (*CreateResponse, error)
Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
List(context.Context, *ListRequest) (*ListResponse, error)
AddResource(context.Context, *AddResourceRequest) (*emptypb.Empty, error)
DeleteResource(context.Context, *DeleteResourceRequest) (*emptypb.Empty, error)
ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
}
func RegisterTTRPCLeasesService(srv *ttrpc.Server, svc TTRPCLeasesService) {
srv.RegisterService("containerd.services.leases.v1.Leases", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CreateRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
"List": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.List(ctx, &req)
},
"AddResource": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req AddResourceRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.AddResource(ctx, &req)
},
"DeleteResource": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteResourceRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.DeleteResource(ctx, &req)
},
"ListResources": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListResourcesRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.ListResources(ctx, &req)
},
},
})
}
type ttrpcleasesClient struct {
client *ttrpc.Client
}
func NewTTRPCLeasesClient(client *ttrpc.Client) TTRPCLeasesService {
return &ttrpcleasesClient{
client: client,
}
}
func (c *ttrpcleasesClient) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error) {
var resp CreateResponse
if err := c.client.Call(ctx, "containerd.services.leases.v1.Leases", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcleasesClient) Delete(ctx context.Context, req *DeleteRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.leases.v1.Leases", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcleasesClient) List(ctx context.Context, req *ListRequest) (*ListResponse, error) {
var resp ListResponse
if err := c.client.Call(ctx, "containerd.services.leases.v1.Leases", "List", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcleasesClient) AddResource(ctx context.Context, req *AddResourceRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.leases.v1.Leases", "AddResource", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcleasesClient) DeleteResource(ctx context.Context, req *DeleteResourceRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.leases.v1.Leases", "DeleteResource", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcleasesClient) ListResources(ctx context.Context, req *ListResourcesRequest) (*ListResourcesResponse, error) {
var resp ListResourcesResponse
if err := c.client.Call(ctx, "containerd.services.leases.v1.Leases", "ListResources", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,109 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto
package namespaces
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCNamespacesService interface {
Get(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error)
List(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
Create(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error)
Update(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error)
Delete(context.Context, *DeleteNamespaceRequest) (*emptypb.Empty, error)
}
func RegisterTTRPCNamespacesService(srv *ttrpc.Server, svc TTRPCNamespacesService) {
srv.RegisterService("containerd.services.namespaces.v1.Namespaces", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Get": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req GetNamespaceRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Get(ctx, &req)
},
"List": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListNamespacesRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.List(ctx, &req)
},
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CreateNamespaceRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UpdateNamespaceRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteNamespaceRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
},
})
}
type ttrpcnamespacesClient struct {
client *ttrpc.Client
}
func NewTTRPCNamespacesClient(client *ttrpc.Client) TTRPCNamespacesService {
return &ttrpcnamespacesClient{
client: client,
}
}
func (c *ttrpcnamespacesClient) Get(ctx context.Context, req *GetNamespaceRequest) (*GetNamespaceResponse, error) {
var resp GetNamespaceResponse
if err := c.client.Call(ctx, "containerd.services.namespaces.v1.Namespaces", "Get", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcnamespacesClient) List(ctx context.Context, req *ListNamespacesRequest) (*ListNamespacesResponse, error) {
var resp ListNamespacesResponse
if err := c.client.Call(ctx, "containerd.services.namespaces.v1.Namespaces", "List", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcnamespacesClient) Create(ctx context.Context, req *CreateNamespaceRequest) (*CreateNamespaceResponse, error) {
var resp CreateNamespaceResponse
if err := c.client.Call(ctx, "containerd.services.namespaces.v1.Namespaces", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcnamespacesClient) Update(ctx context.Context, req *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) {
var resp UpdateNamespaceResponse
if err := c.client.Call(ctx, "containerd.services.namespaces.v1.Namespaces", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcnamespacesClient) Delete(ctx context.Context, req *DeleteNamespaceRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.namespaces.v1.Namespaces", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

File diff suppressed because it is too large Load Diff

41
api/services/sandbox/v1/sandbox.proto Normal file → Executable file
View File

@ -31,6 +31,7 @@ import "google/protobuf/timestamp.proto";
import "github.com/containerd/containerd/api/types/sandbox.proto";
import "github.com/containerd/containerd/api/types/mount.proto";
import "github.com/containerd/containerd/api/types/platform.proto";
import "github.com/containerd/containerd/api/types/metrics.proto";
option go_package = "github.com/containerd/containerd/api/services/sandbox/v1;sandbox";
@ -93,6 +94,8 @@ service Controller {
rpc Wait(ControllerWaitRequest) returns (ControllerWaitResponse);
rpc Status(ControllerStatusRequest) returns (ControllerStatusResponse);
rpc Shutdown(ControllerShutdownRequest) returns (ControllerShutdownResponse);
rpc Metrics(ControllerMetricsRequest) returns (ControllerMetricsResponse);
rpc Update(ControllerUpdateRequest) returns (ControllerUpdateResponse);
}
message ControllerCreateRequest {
@ -100,6 +103,9 @@ message ControllerCreateRequest {
repeated containerd.types.Mount rootfs = 2;
google.protobuf.Any options = 3;
string netns_path = 4;
map<string, string> annotations = 5;
containerd.types.Sandbox sandbox = 6;
string sandboxer = 10;
}
message ControllerCreateResponse {
@ -108,6 +114,7 @@ message ControllerCreateResponse {
message ControllerStartRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerStartResponse {
@ -115,10 +122,16 @@ message ControllerStartResponse {
uint32 pid = 2;
google.protobuf.Timestamp created_at = 3;
map<string, string> labels = 4;
// Address of the sandbox for containerd to connect,
// for calling Task or other APIs serving in the sandbox.
// it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://<vsock cid>:<port>.
string address = 5;
uint32 version = 6;
}
message ControllerPlatformRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerPlatformResponse {
@ -128,12 +141,14 @@ message ControllerPlatformResponse {
message ControllerStopRequest {
string sandbox_id = 1;
uint32 timeout_secs = 2;
string sandboxer = 10;
}
message ControllerStopResponse {}
message ControllerWaitRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerWaitResponse {
@ -144,6 +159,7 @@ message ControllerWaitResponse {
message ControllerStatusRequest {
string sandbox_id = 1;
bool verbose = 2;
string sandboxer = 10;
}
message ControllerStatusResponse {
@ -154,10 +170,35 @@ message ControllerStatusResponse {
google.protobuf.Timestamp created_at = 5;
google.protobuf.Timestamp exited_at = 6;
google.protobuf.Any extra = 7;
// Address of the sandbox for containerd to connect,
// for calling Task or other APIs serving in the sandbox.
// it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://<vsock cid>:<port>.
string address = 8;
uint32 version = 9;
}
message ControllerShutdownRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerShutdownResponse {}
message ControllerMetricsRequest {
string sandbox_id = 1;
string sandboxer = 10;
}
message ControllerMetricsResponse {
types.Metric metrics = 1;
}
message ControllerUpdateRequest {
string sandbox_id = 1;
string sandboxer = 2;
containerd.types.Sandbox sandbox = 3;
repeated string fields = 4;
}
message ControllerUpdateResponse {
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
@ -259,6 +261,8 @@ type ControllerClient interface {
Wait(ctx context.Context, in *ControllerWaitRequest, opts ...grpc.CallOption) (*ControllerWaitResponse, error)
Status(ctx context.Context, in *ControllerStatusRequest, opts ...grpc.CallOption) (*ControllerStatusResponse, error)
Shutdown(ctx context.Context, in *ControllerShutdownRequest, opts ...grpc.CallOption) (*ControllerShutdownResponse, error)
Metrics(ctx context.Context, in *ControllerMetricsRequest, opts ...grpc.CallOption) (*ControllerMetricsResponse, error)
Update(ctx context.Context, in *ControllerUpdateRequest, opts ...grpc.CallOption) (*ControllerUpdateResponse, error)
}
type controllerClient struct {
@ -332,6 +336,24 @@ func (c *controllerClient) Shutdown(ctx context.Context, in *ControllerShutdownR
return out, nil
}
func (c *controllerClient) Metrics(ctx context.Context, in *ControllerMetricsRequest, opts ...grpc.CallOption) (*ControllerMetricsResponse, error) {
out := new(ControllerMetricsResponse)
err := c.cc.Invoke(ctx, "/containerd.services.sandbox.v1.Controller/Metrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *controllerClient) Update(ctx context.Context, in *ControllerUpdateRequest, opts ...grpc.CallOption) (*ControllerUpdateResponse, error) {
out := new(ControllerUpdateResponse)
err := c.cc.Invoke(ctx, "/containerd.services.sandbox.v1.Controller/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ControllerServer is the server API for Controller service.
// All implementations must embed UnimplementedControllerServer
// for forward compatibility
@ -343,6 +365,8 @@ type ControllerServer interface {
Wait(context.Context, *ControllerWaitRequest) (*ControllerWaitResponse, error)
Status(context.Context, *ControllerStatusRequest) (*ControllerStatusResponse, error)
Shutdown(context.Context, *ControllerShutdownRequest) (*ControllerShutdownResponse, error)
Metrics(context.Context, *ControllerMetricsRequest) (*ControllerMetricsResponse, error)
Update(context.Context, *ControllerUpdateRequest) (*ControllerUpdateResponse, error)
mustEmbedUnimplementedControllerServer()
}
@ -371,6 +395,12 @@ func (UnimplementedControllerServer) Status(context.Context, *ControllerStatusRe
func (UnimplementedControllerServer) Shutdown(context.Context, *ControllerShutdownRequest) (*ControllerShutdownResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented")
}
func (UnimplementedControllerServer) Metrics(context.Context, *ControllerMetricsRequest) (*ControllerMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Metrics not implemented")
}
func (UnimplementedControllerServer) Update(context.Context, *ControllerUpdateRequest) (*ControllerUpdateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedControllerServer) mustEmbedUnimplementedControllerServer() {}
// UnsafeControllerServer may be embedded to opt out of forward compatibility for this service.
@ -510,6 +540,42 @@ func _Controller_Shutdown_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _Controller_Metrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ControllerMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControllerServer).Metrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/containerd.services.sandbox.v1.Controller/Metrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControllerServer).Metrics(ctx, req.(*ControllerMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Controller_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ControllerUpdateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ControllerServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/containerd.services.sandbox.v1.Controller/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ControllerServer).Update(ctx, req.(*ControllerUpdateRequest))
}
return interceptor(ctx, in, info, handler)
}
// Controller_ServiceDesc is the grpc.ServiceDesc for Controller service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@ -545,6 +611,14 @@ var Controller_ServiceDesc = grpc.ServiceDesc{
MethodName: "Shutdown",
Handler: _Controller_Shutdown_Handler,
},
{
MethodName: "Metrics",
Handler: _Controller_Metrics_Handler,
},
{
MethodName: "Update",
Handler: _Controller_Update_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto",

View File

@ -0,0 +1,272 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto
package sandbox
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
)
type TTRPCStoreService interface {
Create(context.Context, *StoreCreateRequest) (*StoreCreateResponse, error)
Update(context.Context, *StoreUpdateRequest) (*StoreUpdateResponse, error)
Delete(context.Context, *StoreDeleteRequest) (*StoreDeleteResponse, error)
List(context.Context, *StoreListRequest) (*StoreListResponse, error)
Get(context.Context, *StoreGetRequest) (*StoreGetResponse, error)
}
func RegisterTTRPCStoreService(srv *ttrpc.Server, svc TTRPCStoreService) {
srv.RegisterService("containerd.services.sandbox.v1.Store", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StoreCreateRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StoreUpdateRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StoreDeleteRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
"List": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StoreListRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.List(ctx, &req)
},
"Get": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StoreGetRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Get(ctx, &req)
},
},
})
}
type ttrpcstoreClient struct {
client *ttrpc.Client
}
func NewTTRPCStoreClient(client *ttrpc.Client) TTRPCStoreService {
return &ttrpcstoreClient{
client: client,
}
}
func (c *ttrpcstoreClient) Create(ctx context.Context, req *StoreCreateRequest) (*StoreCreateResponse, error) {
var resp StoreCreateResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Store", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcstoreClient) Update(ctx context.Context, req *StoreUpdateRequest) (*StoreUpdateResponse, error) {
var resp StoreUpdateResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Store", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcstoreClient) Delete(ctx context.Context, req *StoreDeleteRequest) (*StoreDeleteResponse, error) {
var resp StoreDeleteResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Store", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcstoreClient) List(ctx context.Context, req *StoreListRequest) (*StoreListResponse, error) {
var resp StoreListResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Store", "List", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcstoreClient) Get(ctx context.Context, req *StoreGetRequest) (*StoreGetResponse, error) {
var resp StoreGetResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Store", "Get", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
type TTRPCControllerService interface {
Create(context.Context, *ControllerCreateRequest) (*ControllerCreateResponse, error)
Start(context.Context, *ControllerStartRequest) (*ControllerStartResponse, error)
Platform(context.Context, *ControllerPlatformRequest) (*ControllerPlatformResponse, error)
Stop(context.Context, *ControllerStopRequest) (*ControllerStopResponse, error)
Wait(context.Context, *ControllerWaitRequest) (*ControllerWaitResponse, error)
Status(context.Context, *ControllerStatusRequest) (*ControllerStatusResponse, error)
Shutdown(context.Context, *ControllerShutdownRequest) (*ControllerShutdownResponse, error)
Metrics(context.Context, *ControllerMetricsRequest) (*ControllerMetricsResponse, error)
Update(context.Context, *ControllerUpdateRequest) (*ControllerUpdateResponse, error)
}
func RegisterTTRPCControllerService(srv *ttrpc.Server, svc TTRPCControllerService) {
srv.RegisterService("containerd.services.sandbox.v1.Controller", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerCreateRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Start": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerStartRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Start(ctx, &req)
},
"Platform": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerPlatformRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Platform(ctx, &req)
},
"Stop": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerStopRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Stop(ctx, &req)
},
"Wait": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerWaitRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Wait(ctx, &req)
},
"Status": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerStatusRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Status(ctx, &req)
},
"Shutdown": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerShutdownRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Shutdown(ctx, &req)
},
"Metrics": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerMetricsRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Metrics(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ControllerUpdateRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
},
})
}
type ttrpccontrollerClient struct {
client *ttrpc.Client
}
func NewTTRPCControllerClient(client *ttrpc.Client) TTRPCControllerService {
return &ttrpccontrollerClient{
client: client,
}
}
func (c *ttrpccontrollerClient) Create(ctx context.Context, req *ControllerCreateRequest) (*ControllerCreateResponse, error) {
var resp ControllerCreateResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Start(ctx context.Context, req *ControllerStartRequest) (*ControllerStartResponse, error) {
var resp ControllerStartResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Start", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Platform(ctx context.Context, req *ControllerPlatformRequest) (*ControllerPlatformResponse, error) {
var resp ControllerPlatformResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Platform", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Stop(ctx context.Context, req *ControllerStopRequest) (*ControllerStopResponse, error) {
var resp ControllerStopResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Stop", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Wait(ctx context.Context, req *ControllerWaitRequest) (*ControllerWaitResponse, error) {
var resp ControllerWaitResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Wait", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Status(ctx context.Context, req *ControllerStatusRequest) (*ControllerStatusResponse, error) {
var resp ControllerStatusResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Status", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Shutdown(ctx context.Context, req *ControllerShutdownRequest) (*ControllerShutdownResponse, error) {
var resp ControllerShutdownResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Shutdown", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Metrics(ctx context.Context, req *ControllerMetricsRequest) (*ControllerMetricsResponse, error) {
var resp ControllerMetricsResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Metrics", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpccontrollerClient) Update(ctx context.Context, req *ControllerUpdateRequest) (*ControllerUpdateResponse, error) {
var resp ControllerUpdateResponse
if err := c.client.Call(ctx, "containerd.services.sandbox.v1.Controller", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,242 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto
package snapshots
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCSnapshotsService interface {
Prepare(context.Context, *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error)
View(context.Context, *ViewSnapshotRequest) (*ViewSnapshotResponse, error)
Mounts(context.Context, *MountsRequest) (*MountsResponse, error)
Commit(context.Context, *CommitSnapshotRequest) (*emptypb.Empty, error)
Remove(context.Context, *RemoveSnapshotRequest) (*emptypb.Empty, error)
Stat(context.Context, *StatSnapshotRequest) (*StatSnapshotResponse, error)
Update(context.Context, *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error)
List(context.Context, *ListSnapshotsRequest, TTRPCSnapshots_ListServer) error
Usage(context.Context, *UsageRequest) (*UsageResponse, error)
Cleanup(context.Context, *CleanupRequest) (*emptypb.Empty, error)
}
type TTRPCSnapshots_ListServer interface {
Send(*ListSnapshotsResponse) error
ttrpc.StreamServer
}
type ttrpcsnapshotsListServer struct {
ttrpc.StreamServer
}
func (x *ttrpcsnapshotsListServer) Send(m *ListSnapshotsResponse) error {
return x.StreamServer.SendMsg(m)
}
func RegisterTTRPCSnapshotsService(srv *ttrpc.Server, svc TTRPCSnapshotsService) {
srv.RegisterService("containerd.services.snapshots.v1.Snapshots", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Prepare": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req PrepareSnapshotRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Prepare(ctx, &req)
},
"View": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ViewSnapshotRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.View(ctx, &req)
},
"Mounts": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req MountsRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Mounts(ctx, &req)
},
"Commit": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CommitSnapshotRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Commit(ctx, &req)
},
"Remove": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req RemoveSnapshotRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Remove(ctx, &req)
},
"Stat": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StatSnapshotRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Stat(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UpdateSnapshotRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Usage": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UsageRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Usage(ctx, &req)
},
"Cleanup": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CleanupRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Cleanup(ctx, &req)
},
},
Streams: map[string]ttrpc.Stream{
"List": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
m := new(ListSnapshotsRequest)
if err := stream.RecvMsg(m); err != nil {
return nil, err
}
return nil, svc.List(ctx, m, &ttrpcsnapshotsListServer{stream})
},
StreamingClient: false,
StreamingServer: true,
},
},
})
}
type TTRPCSnapshotsClient interface {
Prepare(context.Context, *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error)
View(context.Context, *ViewSnapshotRequest) (*ViewSnapshotResponse, error)
Mounts(context.Context, *MountsRequest) (*MountsResponse, error)
Commit(context.Context, *CommitSnapshotRequest) (*emptypb.Empty, error)
Remove(context.Context, *RemoveSnapshotRequest) (*emptypb.Empty, error)
Stat(context.Context, *StatSnapshotRequest) (*StatSnapshotResponse, error)
Update(context.Context, *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error)
List(context.Context, *ListSnapshotsRequest) (TTRPCSnapshots_ListClient, error)
Usage(context.Context, *UsageRequest) (*UsageResponse, error)
Cleanup(context.Context, *CleanupRequest) (*emptypb.Empty, error)
}
type ttrpcsnapshotsClient struct {
client *ttrpc.Client
}
func NewTTRPCSnapshotsClient(client *ttrpc.Client) TTRPCSnapshotsClient {
return &ttrpcsnapshotsClient{
client: client,
}
}
func (c *ttrpcsnapshotsClient) Prepare(ctx context.Context, req *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error) {
var resp PrepareSnapshotResponse
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Prepare", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) View(ctx context.Context, req *ViewSnapshotRequest) (*ViewSnapshotResponse, error) {
var resp ViewSnapshotResponse
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "View", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) Mounts(ctx context.Context, req *MountsRequest) (*MountsResponse, error) {
var resp MountsResponse
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Mounts", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) Commit(ctx context.Context, req *CommitSnapshotRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Commit", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) Remove(ctx context.Context, req *RemoveSnapshotRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Remove", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) Stat(ctx context.Context, req *StatSnapshotRequest) (*StatSnapshotResponse, error) {
var resp StatSnapshotResponse
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Stat", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) Update(ctx context.Context, req *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error) {
var resp UpdateSnapshotResponse
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) List(ctx context.Context, req *ListSnapshotsRequest) (TTRPCSnapshots_ListClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: false,
StreamingServer: true,
}, "containerd.services.snapshots.v1.Snapshots", "List", req)
if err != nil {
return nil, err
}
x := &ttrpcsnapshotsListClient{stream}
return x, nil
}
type TTRPCSnapshots_ListClient interface {
Recv() (*ListSnapshotsResponse, error)
ttrpc.ClientStream
}
type ttrpcsnapshotsListClient struct {
ttrpc.ClientStream
}
func (x *ttrpcsnapshotsListClient) Recv() (*ListSnapshotsResponse, error) {
m := new(ListSnapshotsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *ttrpcsnapshotsClient) Usage(ctx context.Context, req *UsageRequest) (*UsageResponse, error) {
var resp UsageResponse
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Usage", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpcsnapshotsClient) Cleanup(ctx context.Context, req *CleanupRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.snapshots.v1.Snapshots", "Cleanup", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,97 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/streaming/v1/streaming.proto
package streaming
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
anypb "google.golang.org/protobuf/types/known/anypb"
)
type TTRPCStreamingService interface {
Stream(context.Context, TTRPCStreaming_StreamServer) error
}
type TTRPCStreaming_StreamServer interface {
Send(*anypb.Any) error
Recv() (*anypb.Any, error)
ttrpc.StreamServer
}
type ttrpcstreamingStreamServer struct {
ttrpc.StreamServer
}
func (x *ttrpcstreamingStreamServer) Send(m *anypb.Any) error {
return x.StreamServer.SendMsg(m)
}
func (x *ttrpcstreamingStreamServer) Recv() (*anypb.Any, error) {
m := new(anypb.Any)
if err := x.StreamServer.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func RegisterTTRPCStreamingService(srv *ttrpc.Server, svc TTRPCStreamingService) {
srv.RegisterService("containerd.services.streaming.v1.Streaming", &ttrpc.ServiceDesc{
Streams: map[string]ttrpc.Stream{
"Stream": {
Handler: func(ctx context.Context, stream ttrpc.StreamServer) (interface{}, error) {
return nil, svc.Stream(ctx, &ttrpcstreamingStreamServer{stream})
},
StreamingClient: true,
StreamingServer: true,
},
},
})
}
type TTRPCStreamingClient interface {
Stream(context.Context) (TTRPCStreaming_StreamClient, error)
}
type ttrpcstreamingClient struct {
client *ttrpc.Client
}
func NewTTRPCStreamingClient(client *ttrpc.Client) TTRPCStreamingClient {
return &ttrpcstreamingClient{
client: client,
}
}
func (c *ttrpcstreamingClient) Stream(ctx context.Context) (TTRPCStreaming_StreamClient, error) {
stream, err := c.client.NewStream(ctx, &ttrpc.StreamDesc{
StreamingClient: true,
StreamingServer: true,
}, "containerd.services.streaming.v1.Streaming", "Stream", nil)
if err != nil {
return nil, err
}
x := &ttrpcstreamingStreamClient{stream}
return x, nil
}
type TTRPCStreaming_StreamClient interface {
Send(*anypb.Any) error
Recv() (*anypb.Any, error)
ttrpc.ClientStream
}
type ttrpcstreamingStreamClient struct {
ttrpc.ClientStream
}
func (x *ttrpcstreamingStreamClient) Send(m *anypb.Any) error {
return x.ClientStream.SendMsg(m)
}
func (x *ttrpcstreamingStreamClient) Recv() (*anypb.Any, error) {
m := new(anypb.Any)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,301 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
package tasks
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCTasksService interface {
Create(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error)
Start(context.Context, *StartRequest) (*StartResponse, error)
Delete(context.Context, *DeleteTaskRequest) (*DeleteResponse, error)
DeleteProcess(context.Context, *DeleteProcessRequest) (*DeleteResponse, error)
Get(context.Context, *GetRequest) (*GetResponse, error)
List(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
Kill(context.Context, *KillRequest) (*emptypb.Empty, error)
Exec(context.Context, *ExecProcessRequest) (*emptypb.Empty, error)
ResizePty(context.Context, *ResizePtyRequest) (*emptypb.Empty, error)
CloseIO(context.Context, *CloseIORequest) (*emptypb.Empty, error)
Pause(context.Context, *PauseTaskRequest) (*emptypb.Empty, error)
Resume(context.Context, *ResumeTaskRequest) (*emptypb.Empty, error)
ListPids(context.Context, *ListPidsRequest) (*ListPidsResponse, error)
Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error)
Update(context.Context, *UpdateTaskRequest) (*emptypb.Empty, error)
Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
Wait(context.Context, *WaitRequest) (*WaitResponse, error)
}
func RegisterTTRPCTasksService(srv *ttrpc.Server, svc TTRPCTasksService) {
srv.RegisterService("containerd.services.tasks.v1.Tasks", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Create": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CreateTaskRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Create(ctx, &req)
},
"Start": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StartRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Start(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteTaskRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Delete(ctx, &req)
},
"DeleteProcess": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req DeleteProcessRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.DeleteProcess(ctx, &req)
},
"Get": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req GetRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Get(ctx, &req)
},
"List": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListTasksRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.List(ctx, &req)
},
"Kill": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req KillRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Kill(ctx, &req)
},
"Exec": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ExecProcessRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Exec(ctx, &req)
},
"ResizePty": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ResizePtyRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.ResizePty(ctx, &req)
},
"CloseIO": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CloseIORequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.CloseIO(ctx, &req)
},
"Pause": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req PauseTaskRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Pause(ctx, &req)
},
"Resume": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ResumeTaskRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Resume(ctx, &req)
},
"ListPids": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req ListPidsRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.ListPids(ctx, &req)
},
"Checkpoint": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req CheckpointTaskRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Checkpoint(ctx, &req)
},
"Update": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req UpdateTaskRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Update(ctx, &req)
},
"Metrics": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req MetricsRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Metrics(ctx, &req)
},
"Wait": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req WaitRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Wait(ctx, &req)
},
},
})
}
type ttrpctasksClient struct {
client *ttrpc.Client
}
func NewTTRPCTasksClient(client *ttrpc.Client) TTRPCTasksService {
return &ttrpctasksClient{
client: client,
}
}
func (c *ttrpctasksClient) Create(ctx context.Context, req *CreateTaskRequest) (*CreateTaskResponse, error) {
var resp CreateTaskResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Create", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Start(ctx context.Context, req *StartRequest) (*StartResponse, error) {
var resp StartResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Start", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Delete(ctx context.Context, req *DeleteTaskRequest) (*DeleteResponse, error) {
var resp DeleteResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Delete", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) DeleteProcess(ctx context.Context, req *DeleteProcessRequest) (*DeleteResponse, error) {
var resp DeleteResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "DeleteProcess", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Get(ctx context.Context, req *GetRequest) (*GetResponse, error) {
var resp GetResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Get", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) List(ctx context.Context, req *ListTasksRequest) (*ListTasksResponse, error) {
var resp ListTasksResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "List", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Kill(ctx context.Context, req *KillRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Kill", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Exec(ctx context.Context, req *ExecProcessRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Exec", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) ResizePty(ctx context.Context, req *ResizePtyRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "ResizePty", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) CloseIO(ctx context.Context, req *CloseIORequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "CloseIO", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Pause(ctx context.Context, req *PauseTaskRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Pause", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Resume(ctx context.Context, req *ResumeTaskRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Resume", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) ListPids(ctx context.Context, req *ListPidsRequest) (*ListPidsResponse, error) {
var resp ListPidsResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "ListPids", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*CheckpointTaskResponse, error) {
var resp CheckpointTaskResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Checkpoint", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Update(ctx context.Context, req *UpdateTaskRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Update", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Metrics(ctx context.Context, req *MetricsRequest) (*MetricsResponse, error) {
var resp MetricsResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Metrics", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
func (c *ttrpctasksClient) Wait(ctx context.Context, req *WaitRequest) (*WaitResponse, error) {
var resp WaitResponse
if err := c.client.Call(ctx, "containerd.services.tasks.v1.Tasks", "Wait", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,45 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/transfer/v1/transfer.proto
package transfer
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCTransferService interface {
Transfer(context.Context, *TransferRequest) (*emptypb.Empty, error)
}
func RegisterTTRPCTransferService(srv *ttrpc.Server, svc TTRPCTransferService) {
srv.RegisterService("containerd.services.transfer.v1.Transfer", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Transfer": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req TransferRequest
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Transfer(ctx, &req)
},
},
})
}
type ttrpctransferClient struct {
client *ttrpc.Client
}
func NewTTRPCTransferClient(client *ttrpc.Client) TTRPCTransferService {
return &ttrpctransferClient{
client: client,
}
}
func (c *ttrpctransferClient) Transfer(ctx context.Context, req *TransferRequest) (*emptypb.Empty, error) {
var resp emptypb.Empty
if err := c.client.Call(ctx, "containerd.services.transfer.v1.Transfer", "Transfer", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

View File

@ -16,3 +16,8 @@
// Package events defines the ttrpc event service.
package events
import types "github.com/containerd/containerd/api/types"
// Deprecated: Use [types.Envelope].
type Envelope = types.Envelope

View File

@ -22,12 +22,10 @@
package events
import (
_ "github.com/containerd/containerd/protobuf/plugin"
types "github.com/containerd/containerd/api/types"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@ -44,7 +42,7 @@ type ForwardRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
Envelope *types.Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
}
func (x *ForwardRequest) Reset() {
@ -79,84 +77,13 @@ func (*ForwardRequest) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_rawDescGZIP(), []int{0}
}
func (x *ForwardRequest) GetEnvelope() *Envelope {
func (x *ForwardRequest) GetEnvelope() *types.Envelope {
if x != nil {
return x.Envelope
}
return nil
}
type Envelope struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
Event *anypb.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
}
func (x *Envelope) Reset() {
*x = Envelope{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Envelope) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Envelope) ProtoMessage() {}
func (x *Envelope) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Envelope.ProtoReflect.Descriptor instead.
func (*Envelope) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_rawDescGZIP(), []int{1}
}
func (x *Envelope) GetTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.Timestamp
}
return nil
}
func (x *Envelope) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Envelope) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *Envelope) GetEvent() *anypb.Any {
if x != nil {
return x.Event
}
return nil
}
var File_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_rawDesc = []byte{
@ -167,44 +94,28 @@ var file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_pr
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x23, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x74, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76,
0x31, 0x1a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
0x31, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x6c, 0x75,
0x67, 0x69, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x0e,
0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49,
0x0a, 0x08, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x74, 0x74,
0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52,
0x08, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x08, 0x45, 0x6e,
0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
0x6f, 0x70, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x3a, 0x04, 0x80, 0xb9, 0x1f, 0x01, 0x32, 0x60, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x12, 0x56, 0x0a, 0x07, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x33, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x74, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76,
0x31, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x74, 0x72, 0x70, 0x63, 0x2f,
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x65, 0x76,
0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x48, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72,
0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x65,
0x6c, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x45, 0x6e,
0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x52, 0x08, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65,
0x32, 0x60, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x56, 0x0a, 0x07, 0x46, 0x6f,
0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x65, 0x76, 0x65, 0x6e,
0x74, 0x73, 0x2e, 0x74, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x77,
0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2f, 0x74, 0x74, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
0x2f, 0x76, 0x31, 0x3b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
@ -219,25 +130,21 @@ func file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_p
return file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_rawDescData
}
var file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_goTypes = []interface{}{
(*ForwardRequest)(nil), // 0: containerd.services.events.ttrpc.v1.ForwardRequest
(*Envelope)(nil), // 1: containerd.services.events.ttrpc.v1.Envelope
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
(*anypb.Any)(nil), // 3: google.protobuf.Any
(*emptypb.Empty)(nil), // 4: google.protobuf.Empty
(*ForwardRequest)(nil), // 0: containerd.services.events.ttrpc.v1.ForwardRequest
(*types.Envelope)(nil), // 1: containerd.types.Envelope
(*emptypb.Empty)(nil), // 2: google.protobuf.Empty
}
var file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_depIdxs = []int32{
1, // 0: containerd.services.events.ttrpc.v1.ForwardRequest.envelope:type_name -> containerd.services.events.ttrpc.v1.Envelope
2, // 1: containerd.services.events.ttrpc.v1.Envelope.timestamp:type_name -> google.protobuf.Timestamp
3, // 2: containerd.services.events.ttrpc.v1.Envelope.event:type_name -> google.protobuf.Any
0, // 3: containerd.services.events.ttrpc.v1.Events.Forward:input_type -> containerd.services.events.ttrpc.v1.ForwardRequest
4, // 4: containerd.services.events.ttrpc.v1.Events.Forward:output_type -> google.protobuf.Empty
4, // [4:5] is the sub-list for method output_type
3, // [3:4] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
1, // 0: containerd.services.events.ttrpc.v1.ForwardRequest.envelope:type_name -> containerd.types.Envelope
0, // 1: containerd.services.events.ttrpc.v1.Events.Forward:input_type -> containerd.services.events.ttrpc.v1.ForwardRequest
2, // 2: containerd.services.events.ttrpc.v1.Events.Forward:output_type -> google.protobuf.Empty
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_init() }
@ -258,18 +165,6 @@ func file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_p
return nil
}
}
file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Envelope); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -277,7 +172,7 @@ func file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_p
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_github_com_containerd_containerd_api_services_ttrpc_events_v1_events_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 1,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -18,10 +18,8 @@ syntax = "proto3";
package containerd.services.events.ttrpc.v1;
import "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
import "google/protobuf/any.proto";
import "github.com/containerd/containerd/api/types/event.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/containerd/containerd/api/services/ttrpc/events/v1;events";
@ -35,13 +33,5 @@ service Events {
}
message ForwardRequest {
Envelope envelope = 1;
}
message Envelope {
option (containerd.plugin.fieldpath) = true;
google.protobuf.Timestamp timestamp = 1;
string namespace = 2;
string topic = 3;
google.protobuf.Any event = 4;
containerd.types.Envelope envelope = 1;
}

View File

@ -1,55 +0,0 @@
// Code generated by protoc-gen-go-fieldpath. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto
package events
import (
v2 "github.com/containerd/typeurl/v2"
)
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *ForwardRequest) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
case "envelope":
// NOTE(stevvooe): This is probably not correct in many cases.
// We assume that the target message also implements the Field
// method, which isn't likely true in a lot of cases.
//
// If you have a broken build and have found this comment,
// you may be closer to a solution.
if m.Envelope == nil {
return "", false
}
return m.Envelope.Field(fieldpath[1:])
}
return "", false
}
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *Envelope) Field(fieldpath []string) (string, bool) {
if len(fieldpath) == 0 {
return "", false
}
switch fieldpath[0] {
// unhandled: timestamp
case "namespace":
return string(m.Namespace), len(m.Namespace) > 0
case "topic":
return string(m.Topic), len(m.Topic) > 0
case "event":
decoded, err := v2.UnmarshalAny(m.Event)
if err != nil {
return "", false
}
adaptor, ok := decoded.(interface{ Field([]string) (string, bool) })
if !ok {
return "", false
}
return adaptor.Field(fieldpath[1:])
}
return "", false
}

View File

@ -1,3 +1,5 @@
//go:build !no_grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0

View File

@ -0,0 +1,45 @@
// Code generated by protoc-gen-go-ttrpc. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/version/v1/version.proto
package version
import (
context "context"
ttrpc "github.com/containerd/ttrpc"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
type TTRPCVersionService interface {
Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
}
func RegisterTTRPCVersionService(srv *ttrpc.Server, svc TTRPCVersionService) {
srv.RegisterService("containerd.services.version.v1.Version", &ttrpc.ServiceDesc{
Methods: map[string]ttrpc.Method{
"Version": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req emptypb.Empty
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Version(ctx, &req)
},
},
})
}
type ttrpcversionClient struct {
client *ttrpc.Client
}
func NewTTRPCVersionClient(client *ttrpc.Client) TTRPCVersionService {
return &ttrpcversionClient{
client: client,
}
}
func (c *ttrpcversionClient) Version(ctx context.Context, req *emptypb.Empty) (*VersionResponse, error) {
var resp VersionResponse
if err := c.client.Call(ctx, "containerd.services.version.v1.Version", "Version", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}

209
api/types/event.pb.go Normal file
View File

@ -0,0 +1,209 @@
//
//Copyright The containerd Authors.
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.20.1
// source: github.com/containerd/containerd/api/types/event.proto
package types
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
anypb "google.golang.org/protobuf/types/known/anypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Envelope struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
Event *anypb.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
}
func (x *Envelope) Reset() {
*x = Envelope{}
if protoimpl.UnsafeEnabled {
mi := &file_github_com_containerd_containerd_api_types_event_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Envelope) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Envelope) ProtoMessage() {}
func (x *Envelope) ProtoReflect() protoreflect.Message {
mi := &file_github_com_containerd_containerd_api_types_event_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Envelope.ProtoReflect.Descriptor instead.
func (*Envelope) Descriptor() ([]byte, []int) {
return file_github_com_containerd_containerd_api_types_event_proto_rawDescGZIP(), []int{0}
}
func (x *Envelope) GetTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.Timestamp
}
return nil
}
func (x *Envelope) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *Envelope) GetTopic() string {
if x != nil {
return x.Topic
}
return ""
}
func (x *Envelope) GetEvent() *anypb.Any {
if x != nil {
return x.Event
}
return nil
}
var File_github_com_containerd_containerd_api_types_event_proto protoreflect.FileDescriptor
var file_github_com_containerd_containerd_api_types_event_proto_rawDesc = []byte{
0x0a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e,
0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x65, 0x76, 0x65,
0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x1a, 0x3a, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x70, 0x61, 0x74, 0x68,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xaa, 0x01, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12,
0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x2a, 0x0a,
0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x79, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x3a, 0x04, 0x80, 0xb9, 0x1f, 0x01, 0x42,
0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79,
0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_github_com_containerd_containerd_api_types_event_proto_rawDescOnce sync.Once
file_github_com_containerd_containerd_api_types_event_proto_rawDescData = file_github_com_containerd_containerd_api_types_event_proto_rawDesc
)
func file_github_com_containerd_containerd_api_types_event_proto_rawDescGZIP() []byte {
file_github_com_containerd_containerd_api_types_event_proto_rawDescOnce.Do(func() {
file_github_com_containerd_containerd_api_types_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_containerd_containerd_api_types_event_proto_rawDescData)
})
return file_github_com_containerd_containerd_api_types_event_proto_rawDescData
}
var file_github_com_containerd_containerd_api_types_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_github_com_containerd_containerd_api_types_event_proto_goTypes = []interface{}{
(*Envelope)(nil), // 0: containerd.types.Envelope
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
(*anypb.Any)(nil), // 2: google.protobuf.Any
}
var file_github_com_containerd_containerd_api_types_event_proto_depIdxs = []int32{
1, // 0: containerd.types.Envelope.timestamp:type_name -> google.protobuf.Timestamp
2, // 1: containerd.types.Envelope.event:type_name -> google.protobuf.Any
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_github_com_containerd_containerd_api_types_event_proto_init() }
func file_github_com_containerd_containerd_api_types_event_proto_init() {
if File_github_com_containerd_containerd_api_types_event_proto != nil {
return
}
file_github_com_containerd_containerd_api_types_fieldpath_proto_init()
if !protoimpl.UnsafeEnabled {
file_github_com_containerd_containerd_api_types_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Envelope); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_github_com_containerd_containerd_api_types_event_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_github_com_containerd_containerd_api_types_event_proto_goTypes,
DependencyIndexes: file_github_com_containerd_containerd_api_types_event_proto_depIdxs,
MessageInfos: file_github_com_containerd_containerd_api_types_event_proto_msgTypes,
}.Build()
File_github_com_containerd_containerd_api_types_event_proto = out.File
file_github_com_containerd_containerd_api_types_event_proto_rawDesc = nil
file_github_com_containerd_containerd_api_types_event_proto_goTypes = nil
file_github_com_containerd_containerd_api_types_event_proto_depIdxs = nil
}

Some files were not shown because too many files have changed in this diff Show More