Compare commits
62 Commits
kubernetes
...
master
Author | SHA1 | Date |
---|---|---|
|
479df36517 | |
|
9c7cf2cf4a | |
|
5c9c4b4282 | |
|
700f3347df | |
|
a6a8ce6af0 | |
|
7d025a3cd8 | |
|
e761fb674a | |
|
e190f6d532 | |
|
86e083d23d | |
|
790a200999 | |
|
37c73ce85e | |
|
024a115a50 | |
|
0e6b45feb2 | |
|
79a12c13b6 | |
|
e9adc1de9b | |
|
c9a9c280d8 | |
|
b796cc09a7 | |
|
87ee4e17ab | |
|
8c42f5033f | |
|
ea06df2aba | |
|
74299efb05 | |
|
f27583b1f6 | |
|
26564a8ebb | |
|
1b6a6cdbe3 | |
|
475a74171c | |
|
0df2b7e54a | |
|
6477f0b2fc | |
|
e492eeb947 | |
|
ec103ed2cd | |
|
ab383b8165 | |
|
7a2da85915 | |
|
b73f9b8832 | |
|
fa468a43a6 | |
|
2926326974 | |
|
ea585b6121 | |
|
db089582e0 | |
|
d7138e69de | |
|
e7dc3e2a36 | |
|
084fa1d9b4 | |
|
ab0a76fc7f | |
|
1eafc8aa6a | |
|
af7dda6f27 | |
|
3dd84b8b2b | |
|
911d575a66 | |
|
82e1e9174d | |
|
2cf5e70cdc | |
|
a2aeca5361 | |
|
c86ceca943 | |
|
8e082e5222 | |
|
e3c49c7b13 | |
|
3506b127d6 | |
|
6cd0073498 | |
|
10194c6137 | |
|
46160de87e | |
|
8692b5171d | |
|
0b7644a8ee | |
|
1296bbc164 | |
|
164b929318 | |
|
0cc9ad5ea7 | |
|
0a817130c0 | |
|
f9fb3fa094 | |
|
5dce3594bd |
|
@ -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
39
OWNERS
|
@ -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
115
README.md
|
@ -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
2
doc.go
|
@ -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
27
go.mod
|
@ -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
95
go.sum
|
@ -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
|
@ -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
|
@ -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
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue