Compare commits

...

62 Commits

Author SHA1 Message Date
Kubernetes Publisher 479df36517 Merge pull request #128653 from saschagrunert/cri-gogo
Remove gogo from proto bindings (part 1: CRI)

Kubernetes-commit: 0fe23942fdeabb8f90a252a8eb241f9217177dca
2025-07-04 17:36:54 +00:00
Sascha Grunert 9c7cf2cf4a Remove gogo-protobuf from CRI
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Kubernetes-commit: b464bbeb8f7f576c3897303c39e99356ee827e88
2024-11-07 11:06:21 +01:00
Kubernetes Publisher 5c9c4b4282 Merge pull request #132654 from Jefftree/b-openapi
Bump kube-openapi

Kubernetes-commit: db49c25956df36c777213251c4a47d6d9ee1c5ea
2025-07-01 21:51:53 +00:00
Jefftree 700f3347df Update vendor
Kubernetes-commit: d04ee27c98ba91680ac6c6a8ade9e33d7ee44569
2025-07-01 15:23:58 +00:00
Jefftree a6a8ce6af0 pin kube-openapi to v0.0.0-20250628140032-d90c4fd18f59
Kubernetes-commit: b41d375b8881f25ff5fe7775b4dedaba1eaa3f02
2025-07-01 15:21:22 +00:00
Kubernetes Publisher 7d025a3cd8 Merge pull request #131951 from dims/drop-usages-of-deprecated-otelgrpc-methods
Drop usages of deprecated otelgrpc methods (update to v0.60.0)

Kubernetes-commit: d9c1b4ec9b3df7f09dc23a0cc2b3daf2506d3688
2025-05-27 18:25:50 +00:00
Davanum Srinivas e761fb674a Drop usages of deprecated otelgrpc methods
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 7c0f968ab256486b524ea37014ccf580b12c73e4
2025-05-23 19:40:36 -07:00
Kubernetes Publisher e190f6d532 Merge pull request #131891 from SergeyKanzhelev/renameGoogleGroups
renamed SIG Node google groups

Kubernetes-commit: 8f5a33768a388db03c0b50480bc0d5a134a78ef2
2025-05-22 00:14:36 -07:00
Sergey Kanzhelev 86e083d23d renamed SIG Node google groups
Kubernetes-commit: f79012a0db32759776f2ff5585df3b675c0551b4
2025-05-21 20:45:01 +00:00
Kubernetes Publisher 790a200999 Merge pull request #131838 from dims/bump-google.golang.org/grpc-to-google-v1.72.1
Bump google.golang.org/grpc to google v1.72.1

Kubernetes-commit: 444e2b4eb079727d7cdd81ad25041502656370b8
2025-05-20 16:20:14 +00:00
Davanum Srinivas 37c73ce85e Bump google.golang.org/grpc v1.72.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 9b3830fba234bc4a4f09a1ad4417e4d18b74d6dc
2025-05-18 12:52:05 -04:00
Kubernetes Publisher 024a115a50 Merge pull request #128419 from liggitt/etcd-3.6
etcd 3.6 client update

Kubernetes-commit: 09ca440a450e9103a8f835f598c09237dba6ecbb
2025-05-16 04:24:02 +00:00
Jordan Liggitt 0e6b45feb2 bump etcd client to 3.6
hack/pin-dependency.sh go.etcd.io/etcd/api/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/client/pkg/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/client/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/pkg/v3 v3.6.0
hack/pin-dependency.sh go.etcd.io/etcd/server/v3 v3.6.0

hack/pin-dependency.sh github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0

hack/update-vendor.sh

Kubernetes-commit: cf0bbf1171e918d5d7ba1d3c83b5f347fc8333b0
2025-05-15 21:19:11 -04:00
Kubernetes Publisher 79a12c13b6 Merge pull request #131456 from BenTheElder/staging-dep-approvers
enable dep-approvers for staging go.mod/go.sum

Kubernetes-commit: 616d6d4e75df54841ad2a27f68b7d88c207f4203
2025-04-24 19:14:31 -07:00
Benjamin Elder e9adc1de9b enable dep-approvers for staging go.mod/go.sum
NOTE: to use filters, _all_ entries must be under filters https://go.k8s.io/owners/#filters

Kubernetes-commit: 187b43d5ada2321bf1ef0c8f0d1f4af83c4e9386
2025-04-24 15:38:41 -07:00
Kubernetes Publisher c9a9c280d8 Merge pull request #131103 from ahrtr/etcd_sdk_20250328
Bump etcd 3.5.21 sdk

Kubernetes-commit: f4d1686120d2367dd4c00df53e93dad51c414435
2025-04-01 11:20:43 +00:00
Benjamin Wang b796cc09a7 bump etcd 3.5.21 sdk
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>

Kubernetes-commit: f3b80a858225178e3f7a3ae07bd1b9894e7b3456
2025-03-28 14:30:47 +00:00
Kubernetes Publisher 87ee4e17ab Merge pull request #130556 from sreeram-venkitesh/kep-4960-container-stop-signals
KEP 4960: Container Stop Signals

Kubernetes-commit: ff25881bc1fe9da1dda4ec82d294b92078ae2763
2025-03-24 16:36:32 -07:00
Sreeram 8c42f5033f Generated files
Kubernetes-commit: d6d9a354d7df9ad331ffe7e6212767cf8f90016c
2025-03-25 02:06:29 +05:30
Sreeram ea06df2aba CRI API changes
Kubernetes-commit: cc466aa355f9e47709a108dd6774ad4aa716a984
2025-03-25 01:59:48 +05:30
Kubernetes Publisher 74299efb05 Merge pull request #130701 from roycaihw/psi-metrics
Surface Pressure Stall Information (PSI) metrics

Kubernetes-commit: 62555cadc741a8aef31acab05e9ed60f897edb1b
2025-03-24 10:38:33 -07:00
Haowei Cai f27583b1f6 generated
Kubernetes-commit: 914a4ba8bfa36c0a491c9be919cb0b5231781387
2025-03-20 19:29:22 +00:00
Haowei Cai 26564a8ebb Extend CRI API to support PSI
Kubernetes-commit: 77118d4ca062fe6dc75765d447feb3e8dbd49ba7
2025-03-20 19:28:20 +00:00
Kubernetes Publisher 1b6a6cdbe3 Merge pull request #130250 from marosset/withdraw-windows-hostnetwork
Withdraw alpha support for HostNetwork containers on Windows

Kubernetes-commit: 917a5569810e626f20b06951ed0e3cbf9b618470
2025-03-17 11:59:48 -07:00
Mark Rossett 475a74171c update cri-api comments for Windows HostProcess withdrawal
Kubernetes-commit: 9837a61528f8d4de4cb1556f39bfa22d2e9e3924
2025-01-31 13:51:46 -08:00
Kubernetes Publisher 0df2b7e54a Merge pull request #128123 from felipeagger/feat/add-updatepodsandbox-cri-method
[FG:InPlacePodVerticalScaling] Add UpdatePodSandboxResources CRI method

Kubernetes-commit: 555efba04ae5dd451cdb083d9c660f2843496980
2025-03-14 23:07:46 -07:00
Filipe Xavier 6477f0b2fc make kubelet call updatePodSandboxResources on PodResizeAction
Kubernetes-commit: ce4de97c2e38ab424437c9d8e3b73a804317cdff
2024-11-06 09:21:36 -03:00
Filipe Xavier e492eeb947 update cri-api runtime interface and cri-client add new method
Kubernetes-commit: b27c303ac24fac02ef39ec9ec36fbdfc2767086e
2024-11-06 08:59:43 -03:00
Filipe Xavier ec103ed2cd update proto files to add new method UpdatePodSandboxResources
Kubernetes-commit: 8f11574f3d4f79cbe08050667710f935530cb7d7
2024-11-06 08:48:31 -03:00
Kubernetes Publisher ab383b8165 Merge pull request #130135 from saschagrunert/image-volume-beta
[KEP-4639] Graduate image volume sources to beta

Kubernetes-commit: 7b6c56e5fb530c80e3510977a752be5ce6e23a27
2025-03-12 18:03:58 -07:00
Sascha Grunert 7a2da85915 Graduate image volume sources to beta
Graduate the feature to beta, by:

- Allowing `subPath`/`subPathExpr` for image volumes
- Modifying the CRI to pass down the (resolved) sub path
- Adding metrics which are outlined in the KEP

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Kubernetes-commit: f9e5dd84ad4df476b02bd7237b2e2d05d6d79f7b
2025-02-13 12:18:57 +01:00
Kubernetes Publisher b73f9b8832 Merge pull request #130569 from dims/update-to-latest-cadvisor-v0.52.0
Update to latest cadvisor @ v0.52.1 and new opencontainer/cgroups and drops opencontainers/runc

Kubernetes-commit: 0eaee48ecb8669dc65bfdf9a3583326ab88fc39d
2025-03-08 02:13:45 +00:00
Davanum Srinivas fa468a43a6 update to v1.22.0-rc.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 97a54dc4b04b7d2938d11c5ae9a6233348e854ef
2025-03-07 13:45:34 -05:00
Davanum Srinivas 2926326974 update to latest cadvisor @ v0.52.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 5ecddb65715af7e2afc4f3cbb1abe393bfb4346a
2025-03-04 14:29:08 -05:00
Kubernetes Publisher ea585b6121 Merge pull request #128919 from dashpole/update_otel
Update go.opentelemetry.io dependencies to v1.33.0/v0.58.0

Kubernetes-commit: eea2f78e61fe91bb8fcd3c4a357ea3a10d1389db
2025-03-02 00:43:08 +00:00
David Ashpole db089582e0 update go.opentelemetry.io dependencies to v1.33.0/v0.58.0
Kubernetes-commit: 29c219dcebe30be99d6917623f8d8707a47194c1
2025-03-01 19:17:16 +00:00
Kubernetes Publisher d7138e69de Merge pull request #130512 from HirazawaUi/Clarify-cri-fields
Clarify the behavior when the host_port value is set to 0 in CRI

Kubernetes-commit: b669e6cc9a6e877c8e54f0f7fd1cf6fe9f43d9a8
2025-03-01 09:32:55 -08:00
HirazawaUi e7dc3e2a36 Clarify host_port field in CRI
Kubernetes-commit: d5c072117dbe97893e48d8d73f097e722bfecfe4
2025-03-01 16:36:47 +08:00
Kubernetes Publisher 084fa1d9b4 Merge pull request #130474 from dims/bump-x/crypto-and-x/oauth2
Bump x/oauth2 and x/crypto

Kubernetes-commit: 01ed8ed4ff0a0cbea99370c7a268019829d19e82
2025-02-28 20:45:29 +00:00
Kubernetes Publisher ab0a76fc7f Merge pull request #129688 from cpanato/update-main-go124
[go] Bump images, dependencies and versions to go 1.24.0

Kubernetes-commit: b8c95e1954ef222988c0dfe5b45d5cc96c09bcb8
2025-02-27 20:47:36 +00:00
Davanum Srinivas 1eafc8aa6a Bump x/oauth2 and x/crypto
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 0fede7b8a2fb4c7f120876c9ef1e826f8ef28da2
2025-02-27 10:59:37 -05:00
cpanato af7dda6f27 bump go.mod to set min go1.24
Signed-off-by: cpanato <ctadeu@gmail.com>

Kubernetes-commit: 88300c406b9199ed017e1bada29951fc18e66ae1
2025-02-25 13:21:52 +01:00
Kubernetes Publisher 3dd84b8b2b Merge pull request #130187 from mansikulkarni96/129084
fix:  Sweep and fix stat, lstat, evalsymlink usage for go1.23 on Windows

Kubernetes-commit: ef54ac803b712137871c1a1f8d635d50e69ffa6c
2025-02-23 00:27:41 +00:00
Jordan Liggitt 911d575a66 Drop winsymlink go 1.23 workaround
(cherry picked from commit 3990b6324d0427eaf9ff970da2be02711567ef5f)

Kubernetes-commit: 1f642c79c3192994e76bbe8e7360fd661cd21ab4
2025-02-06 12:45:52 -05:00
Kubernetes Publisher 82e1e9174d Merge pull request #129789 from SergeyKanzhelev/updateCriApiReadme
update of CRI API readme file

Kubernetes-commit: 2973b4b99a4f6cdadf27e9510fa6dcc9e14b7a63
2025-01-29 08:03:23 -08:00
Sergey Kanzhelev 2cf5e70cdc update of CRI API readme file
Kubernetes-commit: 9ac25f1d9ed148c7baddc9b5377d2899ec9f285f
2025-01-23 20:25:49 +00:00
Kubernetes Publisher a2aeca5361 Merge pull request #129633 from skitt/revert-go-difflib-go-spew
Revert to go-difflib and go-spew releases

Kubernetes-commit: 6d570c923f66a1f214d0c3ba3eddd9a0cd0fae68
2025-01-15 21:05:34 +00:00
Stephen Kitt c86ceca943 Revert to go-difflib and go-spew releases
The last dependency pulling in the tips of go-difflib and go-spew has
reverted to the last release of both projects, so k/k can revert to
the releases too. As can be seen from the contents of vendor, this
doesn't result in any actual change in the code.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 3986472b3c7202716f92e586ccfaa4b4fe573dc5
2025-01-15 09:07:27 +01:00
Kubernetes Publisher 8e082e5222 Merge pull request #129349 from dims/bump-x/net-to-v0.33.0
Bump x/net to v0.33.0

Kubernetes-commit: b7ef173c59065f9a5f68eb514ef0483c6f3887ae
2025-01-06 21:02:09 +00:00
Davanum Srinivas e3c49c7b13 Bump x/net to v0.33.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 0b6e3718340fa7e3846cf9b7d5a0f7a684a6fa5a
2024-12-20 14:30:57 -05:00
Kubernetes Publisher 3506b127d6 Merge pull request #129195 from dims/update-x/crypto/ssh-dependency
Update x/crypto/ssh dependency to v0.31.0

Kubernetes-commit: b21ab179c74a270cd276d2dbb5f4b55730838096
2024-12-13 10:30:09 +00:00
Davanum Srinivas 6cd0073498 Update x/crypto/ssh dependency
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 80735180ab2c61232dcc4646e693ddcaeaf96ca3
2024-12-12 20:46:15 -05:00
Kubernetes Publisher 10194c6137 Merge pull request #129054 from pohly/remove-import-name
remove import doc comments

Kubernetes-commit: e8615e27125518f0ed0ba06244b7ecee21451bb0
2024-12-12 10:26:22 +00:00
Kubernetes Publisher 46160de87e Merge pull request #128902 from champly/fix-params-typo
Fix CRI StopPodSandbox params typo

Kubernetes-commit: 263383e28d43d6bd8fc321f878aca3695d84358f
2024-12-12 10:26:21 +00:00
Kubernetes Publisher 8692b5171d Merge pull request #129103 from liggitt/drop-winreadlinkvolume
Drop use of winreadlinkvolume godebug option

Kubernetes-commit: bfe431b53e600c9a36c46eef0f6ecfcf37265d60
2024-12-06 19:35:57 +00:00
Jordan Liggitt 0b7644a8ee Drop use of winreadlinkvolume godebug option
Kubernetes-commit: 3046fe23d4fe4ba86713ffd61bf0e07156b2b7c3
2024-12-06 02:40:53 -05:00
Kubernetes Publisher 1296bbc164 Merge pull request #129083 from liggitt/go1.23windows
Revert to go1.22 windows filesystem stdlib behavior

Kubernetes-commit: 6fc64a261c1dca857a5a7fd1bc87fae38dbe1c8a
2024-12-04 23:03:10 +00:00
Jordan Liggitt 164b929318 Revert to go1.22 windows filesystem stdlib behavior
Kubernetes-commit: 3878a3a6de64660e356a35f70471c27a09698090
2024-12-04 09:52:56 -05:00
Patrick Ohly 0cc9ad5ea7 remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".

Kubernetes-commit: 8a908e0c0bd96a3455edf7e3b5f5af90564e65b0
2024-12-02 14:43:58 +01:00
champly 0a817130c0 fix: params typo
Signed-off-by: champly <champly@outlook.com>

Kubernetes-commit: 4a876e21bce30f4aa0444456a354aae2ef85e0d4
2024-11-21 11:10:48 +08:00
Kubernetes Publisher f9fb3fa094 Merge pull request #128593 from jpbetz/bump-cel-123
Introduce CEL two variable comprehensions

Kubernetes-commit: dc01fa9d2b6632dc932eb760573659608add1b8f
2024-11-07 03:45:20 +00:00
Joe Betz 5dce3594bd hack/pin-dependency.sh github.com/google/cel-go v0.22.0
Kubernetes-commit: b0180a9a376caee4a12cbf549b3187d21cbdc07d
2024-11-05 19:21:09 -05:00
14 changed files with 10998 additions and 45267 deletions

View File

@ -1,7 +1,15 @@
# Contributing guidelines
Do not open pull requests directly against this repository, they will be ignored. Instead, please open pull requests against [kubernetes/kubernetes](https://git.k8s.io/kubernetes/). Please follow the same [contributing guide](https://git.k8s.io/kubernetes/CONTRIBUTING.md) you would follow for any other pull request made to kubernetes/kubernetes.
Do not open pull requests directly against this repository, they will be ignored.
Instead, please open pull requests against [kubernetes/kubernetes](https://git.k8s.io/kubernetes/).
Please follow the same [contributing guide](https://git.k8s.io/kubernetes/CONTRIBUTING.md)
you would follow for any other pull request made to kubernetes/kubernetes.
This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/cri-api](https://git.k8s.io/kubernetes/staging/src/k8s.io/cri-api) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot).
Issues related to CRI API can be filed at [kubernetes/kubernetes repository](https://github.com/kubernetes/kubernetes/issues).
For issues in specific implementations of CRI API (e.g. container runtime) - follow processes of the specific runtime.
For support, ask your Kubernetes vendor or ask at the [forum](https://discuss.kubernetes.io/).
This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/cri-api](https://git.k8s.io/kubernetes/staging/src/k8s.io/cri-api)
by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot).
Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/sig-architecture/staging.md) for more information.

39
OWNERS
View File

@ -3,17 +3,28 @@
# Disable inheritance as this is owned by sig-node (should mirror same contents as pkg/kubelet/OWNERS)
options:
no_parent_owners: true
approvers:
- dims
- feiskyer
- sig-node-approvers
- api-approvers
- sig-node-cri-approvers
reviewers:
- sig-node-reviewers
- dims
labels:
- sig/node
- area/kubelet
emeritus_approvers:
- resouer
filters:
# to use filters all entries must be under filters https://go.k8s.io/owners/#filters
# use .* for approvers that should have all files
".*":
approvers:
- dims
- feiskyer
- sig-node-approvers
- api-approvers
- sig-node-cri-approvers
reviewers:
- sig-node-reviewers
- dims
labels:
- sig/node
- area/kubelet
emeritus_approvers:
- resouer
# go.{mod,sum} files relate to go dependencies, and should be reviewed by the
# dep-approvers
"go\\.(mod|sum)$":
approvers:
- dep-approvers
reviewers:
- dep-reviewers

115
README.md
View File

@ -17,89 +17,40 @@ to be Kubernetes-centric. We try to avoid it, but there may be logic within a co
runtime that optimizes for the order or specific parameters of call(s) that the kubelet
makes.
## Version skew policy
## Version skew policy and feature development
On a single Node there may be installed multiple components implementing
different versions of CRI API.
Please read about:
For example, on a single node there might be:
- [CRI API version skew policy](https://kubernetes.dev/docs/code/cri-api-version-skew-policy/)
- [Kubernetes feature development and container runtimes](https://kubernetes.dev/docs/code/cri-api-dev-policies/)
- _Kubelet_ may call into _Container Runtime_ (e.g. [containerd](https://containerd.io))
and _Image Service Proxy_ (e.g. [stargz-snapshotter](https://github.com/containerd/stargz-snapshotter)).
_Container Runtime_ may be versioned with the OS Image, _Kubelet_ is installed
by system administrator and _Image Service proxy_ is versioned by the third party vendor.
- _Image Service Proxy_ calls into _Container Runtime_.
- _CRI tools_ (e.g. [crictl](https://kubernetes.io/docs/tasks/debug/debug-cluster/crictl/))
may be installed by end user to troubleshoot, same as a third party daemonsets.
All of them are used to call into the _Container Runtime_ to collect container information.
## Community, discussion, contribution, and support
So on a single node it may happen that _Container Runtime_ is serving a newer
version'd kubelet and older versioned crictl. This is a supported scenario within
the version skew policy.
Learn how to engage with the Kubernetes community on the [community
page](https://www.k8s.dev/community/).
### Version Skew Policy for CRI API
You can reach the maintainers of this repository at:
CRI API has two versions:
- Major semantic version (known versions are `v1alpha2` ([removed in 1.26](https://kubernetes.io/blog/2022/12/09/kubernetes-v1-26-release/#cri-v1alpha2-removed)), `v1`).
- Kubernetes version (for example: `@1.23`). Note, the `cri-api` Golang library is versioned as `0.23` as it doesn't guarantee Go types backward compatibility.
- Slack: #sig-node (on https://kubernetes.slack.com -- get an
invite at [slack.kubernetes.io](https://slack.kubernetes.io))
- Mailing List:
https://groups.google.com/a/kubernetes.io/g/sig-node
Major semantic version (e.g. `v1`) is used to introduce breaking changes
and major new features that are incompatible with the current API.
Issues can be filed at https://github.com/kubernetes/kubernetes/issues. See [CONTRIBUTING.md](CONTRIBUTING.md).
Kubernetes version is used to indicate a specific feature set implemented
on top of the major semantic version. All changes made without the change
of a major semantic version API must be backward and forward compatible.
### Code of Conduct
- _Kubelet_ must work with the older _Container Runtime_ if it implements
the same semantic version of CRI API (e.g. `v1`) of up to three Kubernetes minor
versions back. New features implemented in CRI API must be gracefully degraded.
For example, _Kubelet_ of version 1.26 must work with _Container Runtime_
implementing `k8s.io/cri-api@v0.23.0`+.
- _Kubelet_ must work with _Container Runtime_ if it implements
the same semantic version of CRI API (e.g. `v1`) of up to
three minor versions up. New features implemented in CRI API must not change
behavior of old method calls and response values. For example, _Kubelet_ of
version 1.22 must work with _Container Runtime_ implementing `k8s.io/cri-api@v0.25.5`.
Participation in the Kubernetes community is governed by the [Kubernetes
Code of Conduct](code-of-conduct.md).
### Contribution Guidelines
## Versioning
This library contains go classes generated from the CRI API protocol buffers and gRPC API.
The library versioned as `0.XX` as Kubernetes doesn't provide any guarantees
on backward compatibility of Go wrappers between versions. However CRI API itself
(protocol buffers and gRPC API) is marked as stable `v1` version and it is
backward compatible between versions.
Versions like `v0.<minor>.<patch>` (e.g. `v0.25.5`) are considered stable.
It is discouraged to introduce CRI API changes in patch releases and recommended
to use versions like `v0.<minor>.0`.
All alpha and beta versions (e.g. `k8s.io/cri-api@v0.26.0-beta.0`) should be
backward and forward compatible.
## Feature development
Some features development requires changes in CRI API and corresponding changes
in _Container Runtime_. Coordinating between Kubernetes branches and release
versions and _Container Runtime_ versions is not always trivial.
The recommended feature development flow is following:
- Review proposed CRI API changes during the KEP review stage.
Some field names and types may not be spelled out exactly at this stage.
- Locally implement a prototype that implement changes in both - Kubernetes and Container Runtime.
- Submit a Pull Request for Kubernetes implementing CRI API changes alongside the feature code.
Feature must be developed to degrade gracefully when used with older Container Runtime
according to the Version Skew policy.
- Once PR is merged, wait for the next Kubernetes release tag being produced.
Find the corresponding CRI API tag (e.g. `k8s.io/cri-api@v0.26.0-beta.0`).
- This tag can be used to implement the feature in Container Runtime. It is recommended
to switch to the stable tag like (`k8s.io/cri-api@v0.26.0`) once available.
See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. Please note that [kubernetes/cri-api](https://github.com/kubernetes/cri-api)
is a readonly mirror repository, all development is done at [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes).
## Change history
Here is the change history of the Container Runtime Interface protocol:
Here is the change history of the Container Runtime Interface protocol. The change history is maintained manually:
### v1.20
@ -263,25 +214,11 @@ No changes
- [[KEP-4639] Add OCI VolumeSource CRI API](https://github.com/kubernetes/kubernetes/pull/125659)
- Added `image` field to the type `Mount` to represent the OCI VolumeSource
### v1.32
## Community, discussion, contribution, and support
`git diff v1.31.0 v1.32.0 -- staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto`
Learn how to engage with the Kubernetes community on the [community
page](http://kubernetes.io/community/).
You can reach the maintainers of this repository at:
- Slack: #sig-node (on https://kubernetes.slack.com -- get an
invite at [slack.kubernetes.io](https://slack.kubernetes.io))
- Mailing List:
https://groups.google.com/forum/#!forum/kubernetes-sig-node
### Code of Conduct
Participation in the Kubernetes community is governed by the [Kubernetes
Code of Conduct](code-of-conduct.md).
### Contribution Guidelines
See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. Please note that [kubernetes/cri-api](https://github.com/kubernetes/cri-api)
is a readonly mirror repository, all development is done at [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes).
- [CRI: Add field to support CPU affinity on Windows](https://github.com/kubernetes/kubernetes/pull/124285)
- CRI field `affinity_cpus` to `WindowsContainerResources` struct to support CPU affinity on Windows.
This field will be used by Windows CPU manager to set the logical processors to affinitize
for a particular container down to containerd/hcsshim.

2
doc.go
View File

@ -14,4 +14,4 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package criapi // import "k8s.io/cri-api"
package criapi

27
go.mod
View File

@ -2,26 +2,27 @@
module k8s.io/cri-api
go 1.23.0
go 1.24.0
godebug default=go1.23
godebug default=go1.24
require (
github.com/gogo/protobuf v1.3.2
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.65.0
github.com/stretchr/testify v1.10.0
google.golang.org/grpc v1.72.1
google.golang.org/protobuf v1.36.5
)
require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/protobuf v1.35.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

95
go.sum
View File

@ -1,12 +1,16 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/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/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/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/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/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
@ -15,52 +19,37 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
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/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
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.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
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.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
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.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
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-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
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.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

File diff suppressed because it is too large Load Diff

View File

@ -20,16 +20,6 @@ syntax = "proto3";
package runtime.v1;
option go_package = "k8s.io/cri-api/pkg/apis/runtime/v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.stringer_all) = true;
option (gogoproto.goproto_getters_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_unrecognized_all) = false;
// Runtime service defines the public APIs for remote container runtimes
service RuntimeService {
// Version returns the runtime name, runtime version, and runtime API version.
@ -140,6 +130,13 @@ service RuntimeService {
// The Kubelet will not re-request the RuntimeConfiguration after startup, and CRI implementations should
// avoid updating them without a full node reboot.
rpc RuntimeConfig(RuntimeConfigRequest) returns (RuntimeConfigResponse) {}
// UpdatePodSandboxResources synchronously updates the PodSandboxConfig with
// the pod-level resource configuration. This method is called _after_ the
// Kubelet reconfigures the pod-level cgroups.
// This request is treated as best effort, and failure will not block the
// Kubelet with proceeding with a resize.
rpc UpdatePodSandboxResources(UpdatePodSandboxResourcesRequest) returns (UpdatePodSandboxResourcesResponse) {}
}
// ImageService defines the public APIs for managing images.
@ -201,7 +198,16 @@ message PortMapping {
Protocol protocol = 1;
// Port number within the container. Default: 0 (not specified).
int32 container_port = 2;
// Port number on the host. Default: 0 (not specified).
// Port number on the host to map the container port to.
//
// * Valid host port range is 1-65535.
// * The value 0 has explicit semantic meaning: it indicates NO host port should be allocated.
// * The value 0 does NOT indicate dynamic port allocation. Future implementations
// of dynamic allocation will use different values/semantics.
// * Implementations MUST handle the case where this field is explicitly set to 0,
// This field SHOULD be omitted when no port is required.
//
// Default: If omitted, container port will not be exposed on the host.
int32 host_port = 3;
// Host IP.
string host_ip = 4;
@ -248,13 +254,19 @@ message Mount {
bool recursive_read_only = 8;
// Mount an image reference (image ID, with or without digest), which is a
// special use case for image volume mounts. If this field is set, then
// host_path should be unset. All OCI mounts are per feature definition
// readonly. The kubelet does an PullImage RPC and evaluates the returned
// host_path should be unset. All image mounts are per feature definition
// readonly (noexec). The kubelet does an PullImage RPC and evaluates the returned
// PullImageResponse.image_ref value, which is then set to the
// ImageSpec.image field. Runtimes are expected to mount the image as
// required.
// Introduced in the OCI Volume Source KEP: https://kep.k8s.io/4639
// Introduced in the Image Volume Source KEP: https://kep.k8s.io/4639
ImageSpec image = 9;
// Specific image sub path to be used from inside the image instead of its
// root, only necessary if the above image field is set. If the sub path is
// not empty and does not exist in the image, then runtimes should fail and
// return an error.
// Introduced in the Image Volume Source KEP beta graduation: https://kep.k8s.io/4639
string image_sub_path = 10;
}
// IDMapping describes host to container ID mappings for a pod sandbox.
@ -726,6 +738,8 @@ message LinuxPodSandboxStats {
ProcessUsage process = 4;
// Stats of containers in the measured pod sandbox.
repeated ContainerStats containers = 5;
// IO usage gathered for the pod sandbox.
IoUsage io = 6;
}
// WindowsPodSandboxStats provides the resource usage statistics for a pod sandbox on windows
@ -989,7 +1003,7 @@ message LinuxContainerUser {
// WindowsNamespaceOption provides options for Windows namespaces.
message WindowsNamespaceOption {
// Network namespace for this container/sandbox.
// Namespaces currently set by the kubelet: POD, NODE
// This is currently never set by the kubelet
NamespaceMode network = 1;
}
@ -1164,6 +1178,78 @@ message ContainerConfig {
// CDI devices for the container.
repeated CDIDevice CDI_devices = 17;
// The custom stop signal for the container
Signal stop_signal = 18;
}
enum Signal {
RUNTIME_DEFAULT = 0;
SIGABRT = 1;
SIGALRM = 2;
SIGBUS = 3;
SIGCHLD = 4;
SIGCLD = 5;
SIGCONT = 6;
SIGFPE = 7;
SIGHUP = 8;
SIGILL = 9;
SIGINT = 10;
SIGIO = 11;
SIGIOT = 12;
SIGKILL = 13;
SIGPIPE = 14;
SIGPOLL = 15;
SIGPROF = 16;
SIGPWR = 17;
SIGQUIT = 18;
SIGSEGV = 19;
SIGSTKFLT = 20;
SIGSTOP = 21;
SIGSYS = 22;
SIGTERM = 23;
SIGTRAP = 24;
SIGTSTP = 25;
SIGTTIN = 26;
SIGTTOU = 27;
SIGURG = 28;
SIGUSR1 = 29;
SIGUSR2 = 30;
SIGVTALRM = 31;
SIGWINCH = 32;
SIGXCPU = 33;
SIGXFSZ = 34;
SIGRTMIN = 35;
SIGRTMINPLUS1 = 36;
SIGRTMINPLUS2 = 37;
SIGRTMINPLUS3 = 38;
SIGRTMINPLUS4 = 39;
SIGRTMINPLUS5 = 40;
SIGRTMINPLUS6 = 41;
SIGRTMINPLUS7 = 42;
SIGRTMINPLUS8 = 43;
SIGRTMINPLUS9 = 44;
SIGRTMINPLUS10 = 45;
SIGRTMINPLUS11 = 46;
SIGRTMINPLUS12 = 47;
SIGRTMINPLUS13 = 48;
SIGRTMINPLUS14 = 49;
SIGRTMINPLUS15 = 50;
SIGRTMAXMINUS14 = 51;
SIGRTMAXMINUS13 = 52;
SIGRTMAXMINUS12 = 53;
SIGRTMAXMINUS11 = 54;
SIGRTMAXMINUS10 = 55;
SIGRTMAXMINUS9 = 56;
SIGRTMAXMINUS8 = 57;
SIGRTMAXMINUS7 = 58;
SIGRTMAXMINUS6 = 59;
SIGRTMAXMINUS5 = 60;
SIGRTMAXMINUS4 = 61;
SIGRTMAXMINUS3 = 62;
SIGRTMAXMINUS2 = 63;
SIGRTMAXMINUS1 = 64;
SIGRTMAX = 65;
}
message CreateContainerRequest {
@ -1337,6 +1423,9 @@ message ContainerStatus {
string image_id = 17;
// User identities initially attached to the container
ContainerUser user = 18;
// Returns the stop signal used by the container runtime to terminate the container
Signal stop_signal = 19;
}
message ContainerStatusResponse {
@ -1771,6 +1860,8 @@ message ContainerStats {
FilesystemUsage writable_layer = 4;
// Swap usage gathered from the container.
SwapUsage swap = 5;
// IO usage gathered from the container.
IoUsage io = 6;
}
// WindowsContainerStats provides the resource usage statistics for a container specific for Windows
@ -1785,6 +1876,27 @@ message WindowsContainerStats {
WindowsFilesystemUsage writable_layer = 4;
}
// PSI statistics for an individual resource.
message PsiStats {
// PSI data for all tasks in the cgroup.
PsiData Full = 1;
// PSI data for some tasks in the cgroup.
PsiData Some = 2;
}
// PSI data for an individual resource.
message PsiData {
// Total time duration for tasks in the cgroup have waited due to congestion.
// Unit: nanoseconds.
uint64 Total = 1;
// The average (in %) tasks have waited due to congestion over a 10 second window.
double Avg10 = 2;
// The average (in %) tasks have waited due to congestion over a 60 second window.
double Avg60 = 3;
// The average (in %) tasks have waited due to congestion over a 300 second window.
double Avg300 = 4;
}
// CpuUsage provides the CPU usage information.
message CpuUsage {
// Timestamp in nanoseconds at which the information were collected. Must be > 0.
@ -1794,6 +1906,8 @@ message CpuUsage {
// Total CPU usage (sum of all cores) averaged over the sample window.
// The "core" unit can be interpreted as CPU core-nanoseconds per second.
UInt64Value usage_nano_cores = 3;
// CPU PSI statistics.
PsiStats psi = 4;
}
// WindowsCpuUsage provides the CPU usage information specific to Windows
@ -1823,6 +1937,15 @@ message MemoryUsage {
UInt64Value page_faults = 6;
// Cumulative number of major page faults.
UInt64Value major_page_faults = 7;
// Memory PSI statistics.
PsiStats psi = 8;
}
message IoUsage {
// Timestamp in nanoseconds at which the information were collected. Must be > 0.
int64 timestamp = 1;
// IO PSI statistics.
PsiStats psi = 2;
}
message SwapUsage {
@ -1982,3 +2105,14 @@ enum CgroupDriver {
CGROUPFS = 1;
}
message UpdatePodSandboxResourcesRequest {
// ID of the PodSandbox to update.
string pod_sandbox_id = 1;
// Optional overhead represents the overheads associated with this sandbox
LinuxContainerResources overhead = 2;
// Optional resources represents the sum of container resources for this sandbox
LinuxContainerResources resources = 3;
}
message UpdatePodSandboxResourcesResponse {}

File diff suppressed because it is too large Load Diff

View File

@ -72,7 +72,7 @@ type PodSandboxManager interface {
RunPodSandbox(ctx context.Context, config *runtimeapi.PodSandboxConfig, runtimeHandler string) (string, error)
// StopPodSandbox stops the sandbox. If there are any running containers in the
// sandbox, they should be force terminated.
StopPodSandbox(pctx context.Context, odSandboxID string) error
StopPodSandbox(ctx context.Context, podSandboxID string) error
// RemovePodSandbox removes the sandbox. If there are running containers in the
// sandbox, they should be forcibly removed.
RemovePodSandbox(ctx context.Context, podSandboxID string) error
@ -82,6 +82,12 @@ type PodSandboxManager interface {
ListPodSandbox(ctx context.Context, filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error)
// PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.
PortForward(ctx context.Context, request *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
// UpdatePodSandboxResources synchronously updates the PodSandboxConfig with
// the pod-level resource configuration. This method is called _after_ the
// Kubelet reconfigures the pod-level cgroups.
// This request is treated as best effort, and failure will not block the
// Kubelet with proceeding with a resize.
UpdatePodSandboxResources(ctx context.Context, request *runtimeapi.UpdatePodSandboxResourcesRequest) (*runtimeapi.UpdatePodSandboxResourcesResponse, error)
}
// ContainerStatsManager contains methods for retrieving the container

View File

@ -114,7 +114,7 @@ func NewFakeImageService() *FakeImageService {
func (r *FakeImageService) makeFakeImage(image *runtimeapi.ImageSpec) *runtimeapi.Image {
return &runtimeapi.Image{
Id: image.Image,
Size_: r.FakeImageSize,
Size: r.FakeImageSize,
Spec: image,
RepoTags: []string{image.Image},
Pinned: r.Pinned[image.Image],

View File

@ -23,6 +23,7 @@ import (
"sync"
"time"
"google.golang.org/protobuf/proto"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
)
@ -302,8 +303,8 @@ func (r *FakeRuntimeService) PodSandboxStatus(_ context.Context, podSandboxID st
return nil, fmt.Errorf("pod sandbox %q not found", podSandboxID)
}
status := s.PodSandboxStatus
return &runtimeapi.PodSandboxStatusResponse{Status: &status}, nil
status := proto.Clone(&s.PodSandboxStatus).(*runtimeapi.PodSandboxStatus)
return &runtimeapi.PodSandboxStatusResponse{Status: status}, nil
}
// ListPodSandbox returns the list of pod sandboxes in the FakeRuntimeService.
@ -511,8 +512,8 @@ func (r *FakeRuntimeService) ContainerStatus(_ context.Context, containerID stri
return nil, fmt.Errorf("container %q not found", containerID)
}
status := c.ContainerStatus
return &runtimeapi.ContainerStatusResponse{Status: &status}, nil
status := proto.Clone(&c.ContainerStatus).(*runtimeapi.ContainerStatus)
return &runtimeapi.ContainerStatusResponse{Status: status}, nil
}
// UpdateContainerResources returns the container resource in the FakeRuntimeService.
@ -794,3 +795,16 @@ func (r *FakeRuntimeService) RuntimeConfig(_ context.Context) (*runtimeapi.Runti
return &runtimeapi.RuntimeConfigResponse{Linux: r.FakeLinuxConfiguration}, nil
}
// UpdatePodSandboxResources returns the container resource in the FakeRuntimeService.
func (r *FakeRuntimeService) UpdatePodSandboxResources(context.Context, *runtimeapi.UpdatePodSandboxResourcesRequest) (*runtimeapi.UpdatePodSandboxResourcesResponse, error) {
r.Lock()
defer r.Unlock()
r.Called = append(r.Called, "UpdatePodSandboxResources")
if err := r.popError("UpdatePodSandboxResources"); err != nil {
return nil, err
}
return &runtimeapi.UpdatePodSandboxResourcesResponse{}, nil
}

View File

@ -16,4 +16,4 @@ limitations under the License.
// Package errors provides helper functions for use by the kubelet
// to deal with CRI errors.
package errors // import "k8s.io/cri-api/pkg/errors"
package errors

View File

@ -32,6 +32,9 @@ var (
// ErrRROUnsupported - Unable to enforce recursive readonly mounts
ErrRROUnsupported = errors.New("RROUnsupported")
// ErrImageVolumeMountFailed - Unable to mount an image volume.
ErrImageVolumeMountFailed = errors.New("ImageVolumeMountFailed")
)
// IsNotFound returns a boolean indicating whether the error