Compare commits

...

177 Commits

Author SHA1 Message Date
Kubernetes Publisher 4181acbe82 Merge pull request #133570 from BenTheElder/pr131351
Clarify staging repository READMEs

Kubernetes-commit: 8082e9ab157b280c740a623ae9d73679b9ee95a4
2025-08-16 07:17:13 +00:00
Benjamin Elder 3f2038cdd5 clarify that staging repos are automatically published
Kubernetes-commit: e49f6116f9eec5d48f2c8913e598fef496644d01
2025-08-15 14:33:07 -07:00
Benjamin Elder 41474976ca add pointer to CONTRIBUTING.md for more details on contributing, clarify read-only
Kubernetes-commit: ada2ed8487708056ff11bd2413da1073558e6d7c
2025-08-15 10:13:18 -07:00
Benjamin Elder 0c80555342 link to what a staging repository is
Kubernetes-commit: 011d50019758a7405c6ff37f0fdbd44dacb607b5
2025-08-15 10:10:26 -07:00
sAchin-680 46fc11a3c0 docs: clarify that this is a staging repository and not for direct contributions
Signed-off-by: sAchin-680 <mrmister680@gmail.com>

Kubernetes-commit: 7c43e6d2fdbf88f8d92559dac3cabb23da2a2957
2025-04-17 17:51:45 +05:30
Kubernetes Publisher 925cb1b0b1 Merge pull request #133275 from liggitt/dra-api
Add / update kubelet and DRA API owners

Kubernetes-commit: 144d1987df2da8d96064c4255e4d8b0339771e42
2025-07-29 20:14:47 +00:00
Jordan Liggitt af8a887450 Add / update kubelet and DRA API owners
Kubernetes-commit: 6e9b60e3fd80403d4c92f56494daf78dea124138
2025-07-29 08:08:35 -04:00
Kubernetes Publisher da40a40b6b Merge pull request #133226 from ivanvc/bump-etcd-to-3.6.4
Bump etcd sdk to v3.6.4

Kubernetes-commit: d33916baa473d089d33c9fe336bd172cebdb3b6e
2025-07-27 11:26:17 +00:00
Ivan Valdes 5717d42094 Bump etcd sdk to v3.6.4
Kubernetes-commit: 57ceb56c6fa74df9ead49afcd40daaa76de3f673
2025-07-25 14:09:41 -07:00
Kubernetes Publisher 1e11384ce9 Merge pull request #130606 from Jpsassine/dra_device_health_status
Expose DRA device health in PodStatus

Kubernetes-commit: 72f9a9260a676cb6553dd9a628a39a173bdb06f0
2025-07-25 07:16:57 +00:00
Kubernetes Publisher 28e34b2552 Merge pull request #132942 from thockin/kyaml
Add KYAML support to kubectl

Kubernetes-commit: 1451dd1b0873e801e082f3a06a52685bcd68dcac
2025-07-25 03:29:23 +00:00
Kubernetes Publisher 37e9a52015 Merge pull request #132935 from benluddy/cbor-bump-custom-marshalers
KEP-4222: Adopt text and JSON transcoding support for CBOR.

Kubernetes-commit: dfc0998baa4d6c2cd630aa3c5b8def4e9b1fcd8e
2025-07-24 23:28:41 +00:00
Kubernetes Publisher 44b1bb21d1 Merge pull request #132773 from saschagrunert/protoc-plugin
Convert `k8s.io/kubelet/pkg/apis/pluginregistration` from gogo to protoc

Kubernetes-commit: 1bc48d707cc1404cc684341c804a5e966c3367f7
2025-07-24 23:28:40 +00:00
Tim Hockin a14829b677 Re-vendor sigs.k8s.io/yaml @ v1.6.0
Kubernetes-commit: 8182a27f3b0769cefe1bcebfb938a7bafd51c88e
2025-07-24 11:46:03 -07:00
Kubernetes Publisher f32abbb129 Merge pull request #132700 from pohly/dra-kubelet-grpc-v1
DRA kubelet: add v1 gRPC

Kubernetes-commit: ca569e152d734112a2400afa84371ebb399786ba
2025-07-24 03:23:59 +00:00
Kubernetes Publisher a468151cb3 Merge pull request #133028 from saschagrunert/deviceplugin-proto
Convert `k8s.io/kubelet/pkg/apis/deviceplugin` from gogo to protoc

Kubernetes-commit: 47d9d86326a0b56d40c84ad4d68df073c15bba28
2025-07-22 01:42:48 +00:00
Sascha Grunert 3c7be0577a Convert `k8s.io/kubelet/pkg/apis/deviceplugin` from gogo to protoc
Use standard protoc for the device plugin API instead of gogo.

Part of kubernetes#96564

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

Kubernetes-commit: 3026020b44a097a6f95a884e1e7f966c12675c0f
2025-07-17 13:47:44 +02:00
Kubernetes Publisher 91d07e0e87 Merge pull request #132771 from aramase/aramase/f/kep_4412_with_2535
Enable image pull credential verification with service account–based credential providers

Kubernetes-commit: 1160ce69e1e43557313a5359c3873489c2eafe46
2025-07-19 21:40:10 +00:00
Kubernetes Publisher 0272147844 Merge pull request #133027 from saschagrunert/podresources-proto
Convert `k8s.io/kubelet/pkg/apis/podresources` from gogo to protoc

Kubernetes-commit: 4b263baea18efe86177d63a1c00234cc692afa2e
2025-07-18 21:39:56 +00:00
Kubernetes Publisher ca0bf778ee Merge pull request #133010 from cici37/promote-Cel
Bump cel-go to v0.26.0

Kubernetes-commit: c72ff99928c6edbec1619d78f66e1f5f660d24c3
2025-07-18 01:52:22 +00:00
Sascha Grunert 27761cabf9 Convert `k8s.io/kubelet/pkg/apis/podresources` from gogo to protoc
Use standard protoc for the pod resources instead of gogo.

Part of kubernetes#96564

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

Kubernetes-commit: 532d48fe6adebcd4be43979ff189140f2d047f30
2025-07-17 13:33:46 +02:00
Cici Huang 646d6be365 Update cel-go to v0.26.0
Kubernetes-commit: cedcbfb94c35fb7e268555f2dd3185a4f805ad05
2025-07-16 08:07:00 +00:00
Kubernetes Publisher ac2b4c22fe Merge pull request #133020 from pohly/apimachinery-list-map-keys
support optional listMapKeys in server-side apply

Kubernetes-commit: d33af7f7efc7ff5d8813a85290189883167a5226
2025-07-17 17:52:30 +00:00
Jordan Liggitt 98b1f72f34 sigs.k8s.io/structured-merge-diff/v6 v6.3.0
Kubernetes-commit: 4d34975a46658efd90274c5fe05d46732e04ca67
2025-07-16 16:57:41 -04:00
Kubernetes Publisher 1eb06f25c2 Merge pull request #132617 from aramase/aramase/f/kep_4412_pod_cache_key_type
Add ServiceAccountTokenCacheType support to credential provider plugin

Kubernetes-commit: 394f4127675b19417be09295cb766674175ed776
2025-07-15 21:41:00 +00:00
Kubernetes Publisher 1533e6cdf2 Merge pull request #132871 from dims/bump-k8s.io/kube-openapi-to-latest-SHA-f3f2b991d03b
Bump k8s.io/kube-openapi to latest SHA (f3f2b991d03b) and sigs.k8s.io/structured-merge-diff/{v4 => v6}

Kubernetes-commit: 48e04d0d6c43cfc4729857775252b89b68d65b87
2025-07-15 09:54:35 +00:00
Kubernetes Publisher 7b85a43a87 Merge pull request #132341 from dashpole/graduate_kubelet_tracing
Promote KubeletTracing featuregate to GA

Kubernetes-commit: 8790d5b819cfc3b8edc9408b8a392b8734910ea2
2025-07-15 01:40:21 +00:00
Davanum Srinivas 0774ca2465 Bump k8s.io/kube-openapi to latest SHA (f3f2b991d03b)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: ebc1ccc491c944fa0633f147698e0dc02675051d
2025-07-10 09:21:52 -04:00
Anish Ramasekar 472567c8b2 Add ServiceAccount coordinates to ImagePullCredentials v1alpha1
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: f1728bd584a5651e17c5e3f43885b75449f25391
2025-07-09 12:02:22 -05:00
Sascha Grunert 3f57b9b21b Convert kubelet plugin manager from gogo to protoc
Use standard protoc for the kubelet plugin manager instead of gogo.

Part of https://github.com/kubernetes/kubernetes/issues/96564

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

Kubernetes-commit: c889ee17a2f86e0357348b72c52bd36c7dbe8682
2025-07-07 10:48:01 +02:00
Anish Ramasekar 1894255e90 kubelet: Add CacheType field to ServiceAccountTokenAttributes with validation
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 03db2278d526956809080ef919a931f982ec4bb7
2025-07-03 14:24:05 -07:00
Patrick Ohly db9675bce2 DRA kubelet: add v1 gRPC
The API is a direct copy of v1beta1, with v1beta1 replaced by v1.
The interoperability support is the same that was used for v1alpha4.
Adding it "reverts" the removal of the v1alpha4 support in
a57f15e0816ecbef48f91b318c070070e7cbb84e, except that now v1beta1 is the legacy
API which needs conversion. If kubelet and the plugin both support v1, no
conversion is needed.

Kubernetes-commit: f141907ddd89998e821eb1047885722c8ba8922b
2025-07-03 11:31:20 +02:00
Kubernetes Publisher bbd1495a9a Merge pull request #132675 from dims/bump-sigs-k8s-io-json-no-code-changes
Bump sigs.k8s.io/json to latest - no code changes

Kubernetes-commit: e47ac3eb6faa97874658dc281c72b5623f994801
2025-07-03 01:53:28 +00:00
Kubernetes Publisher 3f36ffe508 Merge pull request #132677 from dims/update-github.com/emicklei/go-restful/v3-to-v3.12.2
Update github.com/emicklei/go-restful/v3 to v3.12.2

Kubernetes-commit: 305c0e06c99ff9df013edd804294217a04e4dd31
2025-07-02 21:49:57 +00:00
Kubernetes Publisher 5b8a21b871 Merge pull request #132676 from dims/bump-go.yaml.in/yaml/v3-to-v3.0.4
Bump go.yaml.in/yaml/v3 to v3.0.4

Kubernetes-commit: 01c03ae9cf7b1371c8bc2bdf12d9244e63e83750
2025-07-02 17:55:03 +00:00
Davanum Srinivas c55cd031b0 Update github.com/emicklei/go-restful/v3 to v3.12.2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: b44b0fbf1299c6821033076352b91914d2efef67
2025-07-02 08:00:43 -04:00
Davanum Srinivas 2ee42e8fb7 Bump go.yaml.in/yaml/v3 to v3.0.4
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 58e620cc4403d30f9fb6aab245cfb47db17957de
2025-07-02 07:37:06 -04:00
Davanum Srinivas 42560ecbdd Bump sigs.k8s.io/json to latest - no code changes
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 00f8cbae6b8fd3799a1a044abcefdbb572d35b27
2025-07-02 07:32:24 -04:00
Kubernetes Publisher 9fb507f00c Merge pull request #132654 from Jefftree/b-openapi
Bump kube-openapi

Kubernetes-commit: db49c25956df36c777213251c4a47d6d9ee1c5ea
2025-07-01 21:54:39 +00:00
Jefftree 02bc5ab467 Update vendor
Kubernetes-commit: d04ee27c98ba91680ac6c6a8ade9e33d7ee44569
2025-07-01 15:23:58 +00:00
Jefftree bb49f8beab pin kube-openapi to v0.0.0-20250628140032-d90c4fd18f59
Kubernetes-commit: b41d375b8881f25ff5fe7775b4dedaba1eaa3f02
2025-07-01 15:21:22 +00:00
Kubernetes Publisher bfc52b8273 Merge pull request #132633 from estesp/fix-concurrent-map-write-logline
fix: kubelet CRI portforward concurrent map write on error

Kubernetes-commit: 02325c22c0474ddad4b980af3760678c75dbdfcd
2025-07-01 06:01:51 +00:00
Phil Estes f8c45c332f fix: kubelet CRI portforward concurrent map write on error
Changing this from value printing to just the pointer value fixes a
known issue with possible "concurrent map write" errors from the Go
runtime when this error occurs. This problem surfaces when the map
within the struct `h.conn` is iterated over, but can be modified by
other threads while this error is being logged.

Phil Estes <estesp@gmail.com>

Kubernetes-commit: fa87098ae30c69b86060a085e22fc8bcba3ab97f
2025-06-30 17:00:27 -04:00
Kubernetes Publisher 0c944fc5e6 Merge pull request #132574 from pohly/dra-kubelet-v1alpha4-removal
DRA kubelet: remove v1alpha4

Kubernetes-commit: e7b945737e9325f076844dfb5c11bb44dbc940f1
2025-06-30 14:01:01 +00:00
Kubernetes Publisher ee9dc3d6e6 Merge pull request #131992 from lalitc375/master
Deprecate StreamingConnectionIdleTimeout field, that is not being us…

Kubernetes-commit: 6720f62d828efc7ca55647c42e98079baa74dbb2
2025-06-27 22:09:42 +00:00
Patrick Ohly b1b8e2064b DRA kubelet: remove v1alpha4
v1alpha4 was added in 1.31 and superseded by v1beta1 in 1.32. Since that
release, plugins are also required to advertise the supported gRPC services
during registration. In practice, all known DRA drivers use the helper code
from 1.32 or newer and thus don't need the legacy support.

Kubernetes-commit: a57f15e0816ecbef48f91b318c070070e7cbb84e
2025-06-27 10:03:04 +02:00
Patrick Ohly 4defd3ee14 DRA kubelet: API clarification
It's not okay to drop a claim from the response just because it encountered no
error. We want to be sure that a DRA driver really looked at the claim.

Kubernetes-commit: 005cef332da41990d08bee826262dd71fa74f522
2025-06-27 09:30:28 +02:00
Kubernetes Publisher 7e87660cbe Merge pull request #132357 from dims/drop-usage-of-forked-copies-of-goyaml.v2-and-goyaml.v3
Drop usage of forked copies of goyaml.v2 and goyaml.v3

Kubernetes-commit: c1afec6a0b15ca1ed853c1321ac2c972488bf5b8
2025-06-25 18:14:21 +00:00
Kubernetes Publisher 9331a783e2 Merge pull request #132504 from jpbetz/name-formats
Introduce OpenAPI format support for k8s-short-name and k8s-long-name

Kubernetes-commit: 1d932bd6cc951b9182d07d701946aebaf667df94
2025-06-25 18:14:20 +00:00
Davanum Srinivas af334a43a6 switch to latest sigs.k8s.io/yaml v1.5.0 (run update-gofmt.sh as well)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: c5b4b133ce3252ee19b7167eb69a99d88fdefda8
2025-06-25 08:03:06 -04:00
Ben Luddy c1c723b9ba Bump to github.com/fxamacker/cbor/v2 v2.9.0.
Kubernetes-commit: 917659269af60f8ca960deeb0991df93e5ad1635
2025-06-24 14:25:43 -04:00
Joe Betz e5d04356ad Bump to latest kube-openapi
Kubernetes-commit: dc323756cea2d1ebe32d7acb5a14a1769c14486f
2025-06-24 09:24:27 -04:00
David Ashpole 090c10d80f remove usage of KubeletTracing featuregate from kubelet
Kubernetes-commit: 5a20c38da61b2714f1b320219c6b0b4fe0c3c37e
2025-06-18 17:58:03 +00:00
John-Paul Sassine e6033dfbf2 feat(kubelet): Add ResourceHealthStatus for DRA pods
This change introduces the ability for the Kubelet to monitor and report
the health of devices allocated via Dynamic Resource Allocation (DRA).
This addresses a key part of KEP-4680 by providing visibility into
device failures, which helps users and controllers diagnose pod failures.

The implementation includes:
- A new `v1alpha1.NodeHealth` gRPC service with a `WatchResources`
  stream that DRA plugins can optionally implement.
- A health information cache within the Kubelet's DRA manager to track
  the last known health of each device and handle plugin disconnections.
- An asynchronous update mechanism that triggers a pod sync when a
  device's health changes.
- A new `allocatedResourcesStatus` field in `v1.ContainerStatus` to
  expose the device health information to users via the Pod API.

Update vendor

KEP-4680: Fix lint, boilerplate, and codegen issues

Add another e2e test, add TODO for KEP4680 & update test infra helpers

Add Feature Gate e2e test

Fixing presubmits

Fix var names, feature gating, and nits

Fix DRA Health gRPC API according to review feedback

Kubernetes-commit: b7de71f9ce74e99dde61ee138608df8edc5486bd
2025-06-17 20:49:12 +00:00
Davanum Srinivas 255cf0f9e8 Drop usage of forked copies of goyaml.v2 and goyaml.v3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 3827d3bc4f1c17ac816b37422dbd449c276e9ff0
2025-06-17 11:00:27 -04:00
Kubernetes Publisher 36e6498109 Merge pull request #132269 from dims/update-to-latest-github.com/modern-go/reflect2
Update to latest github.com/modern-go/reflect2

Kubernetes-commit: d55b119d34883bbad2a3436dcb6c62339d963031
2025-06-12 20:48:08 +00:00
Davanum Srinivas d908300b36 Update to latest github.com/modern-go/reflect2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 3908550c0dc189cfa9de38a84bee508fa0659463
2025-06-12 11:20:39 -04:00
Kubernetes Publisher 0c5bb6862a Merge pull request #132239 from dims/update-to-etcd-3.6.1-in-vendor
Update to etcd v3.6.1 in vendor/

Kubernetes-commit: 568f7300c9811f5c07a5b2a786fb1d043306c35c
2025-06-12 00:37:31 +00:00
Davanum Srinivas bc5666e87e Update to etcd v3.6.1 in vendor/
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 5a2844a766bb0113b969b4519350c962d8dd8428
2025-06-11 16:46:03 -04:00
Kubernetes Publisher d639b0c762 Merge pull request #132209 from dims/update-github.com/spf13/cobra-v1.9.1eksctl
update github.com/spf13/cobra v1.9.1

Kubernetes-commit: dc19f0b6b9cd14ece6b1929cb4e7ea2c9d322b95
2025-06-10 20:39:56 +00:00
Davanum Srinivas 9a8e34b385 update github.com/spf13/cobra v1.9.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 449320a54a2dac04f953d5f6401d875ea9b7e8de
2025-06-10 10:50:54 -04:00
Kubernetes Publisher 6341803436 Merge pull request #132103 from nojnhuh/typed-ring-buffer
Replace queue.FIFOs with k8s.io/utils/buffer.Ring

Kubernetes-commit: 5090812df4fb6cf09a9181635d90c2e154eab8cc
2025-06-06 20:56:49 +00:00
Jon Huhn 52b9a9200b Update k8s.io/utils for new generic ring buffer
Kubernetes-commit: 8cdbbf5cdaef7e37cfd432e9044aa52f4d42adcd
2025-06-04 12:09:53 -05:00
Lalit Chauhan c3d7806c38 Deprecate StreamingConnectionIdleTimeout field, that is not being used for a long time
Kubernetes-commit: 6a654e5be0c78eb516e3a6caf9f91ab7ffb3e686
2025-05-27 23:36:24 +00:00
Kubernetes Publisher 422028d547 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:29:22 +00:00
Davanum Srinivas 1e50e4369e 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 97b7420a1a 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:23:15 +00:00
Davanum Srinivas 51a008f3f9 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 91135debfd Merge pull request #128419 from liggitt/etcd-3.6
etcd 3.6 client update

Kubernetes-commit: 09ca440a450e9103a8f835f598c09237dba6ecbb
2025-05-16 04:27:08 +00:00
Jordan Liggitt 789ad24877 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 8419bc34b9 Merge pull request #131170 from azych/fix_goroutine_leak
Fix goroutine leak

Kubernetes-commit: 35b4016d222936e6acd71239d9f3ab128c05baa1
2025-05-05 00:02:52 +00:00
Kubernetes Publisher 4a6cccaf70 Merge pull request #131595 from aojea/utils_fake_clock
update k8s.io/utils to bring fakeClock.Waiters()

Kubernetes-commit: e3e1f80c0110c847acf4381b1790c1c667395010
2025-05-03 04:07:28 +00:00
Antonio Ojea 16ea44e324 update k8s.io/utils to bring fakeClock.Waiters()
Change-Id: I7e25338df225c2c27457403fbc2f158d08638f87

Kubernetes-commit: c2c003a71fc52fa79c2fff0109afad58573d0216
2025-05-02 11:21:11 +00:00
Kubernetes Publisher 69a343db6f Merge pull request #130989 from liggitt/creationTimestamp-omitzero
Omit null creationTimestamp

Kubernetes-commit: 01899a7c86337b05a16a4155c9351cf947beaee9
2025-05-03 00:11:00 +00:00
Artur Zych ecad826127 replace context.TODO with context.Background in tests
Kubernetes-commit: ffe235d2dd3577fb71d0c9ff51b7c337eba10e76
2025-04-10 11:38:01 +02:00
Artur Zych 0bcbcadd33 add goleak to kubelet vendor via hack/update-vendor.sh
Kubernetes-commit: 4bd0c024e9d999e6051b4fa7a24ede61a7724324
2025-04-05 00:34:46 +02:00
Artur Zych bb2324b47b add missing header in httpstream_test.go; whitespace in imports
Kubernetes-commit: 161b44d04ede1d423fdf4a7e101f19005eab4b17
2025-04-05 00:09:52 +02:00
Artur Zych a1589230c6 add unit tests to verify the fix
Kubernetes-commit: 79150d1ecf16833524f9795d9621e5cd9acd54a4
2025-04-04 13:55:24 +02:00
Jordan Liggitt 870ea5c0c6 bump cbor to add omitzero support
Kubernetes-commit: bc6051717137cef288b82305588e675de4a32c0d
2025-03-25 12:27:43 -04:00
Jordan Liggitt 6312d4ffc1 bump structured-merge-diff to add omitzero support
Kubernetes-commit: 06b0784062f68566daa8eed83c475b738dcf620c
2025-03-24 16:34:01 -04:00
Kubernetes Publisher 9784a8d9cb Merge pull request #131527 from carlory/cleanup-kubelet-UserNamespaces
Fix incorrect  feature gate name UserNamespaceSupport for kubelet apis

Kubernetes-commit: e3b9541b235e47e7afd7edef403e1187f1e62a16
2025-04-29 09:18:17 -07:00
carlory 138f347175 Update UserNamespaceSupport feature gate name
Kubernetes-commit: a56378d9fcb936a52a98e7ddbf1c3749db5d4b20
2025-04-29 16:15:41 +08:00
Kubernetes Publisher c57578d1f5 Merge pull request #131434 from pacoxu/fsnotify
bump fsnotify v1.9.0

Kubernetes-commit: 1b509a888327c0a7bcbae21b78b1bf3c447cc666
2025-04-25 20:00:22 +00:00
Kubernetes Publisher a23e4377a3 Merge pull request #131444 from erdii/update-cel-go
chore: update github.com/google/cel-go dependency to v0.25.0

Kubernetes-commit: e9379e92db19d826d46edd502dd3a61609b32c52
2025-04-25 11:57:48 +00:00
Josh Gwosdz b4d8fb32a6 chore: update github.com/google/cel-go dependency to v0.25.0
Signed-off-by: Josh Gwosdz <jgwosdz@redhat.com>

Kubernetes-commit: 7a24c4ce5d96aab2e9a33c4d62617cfb1c83c9f8
2025-04-24 14:59:35 +02:00
Paco Xu 9aefbc1d21 bump fsnotify v1.9.0
Kubernetes-commit: a2281f97bb06233ece3f601f73a7ac1137433610
2025-04-24 17:01:00 +08:00
Kubernetes Publisher 0f989a9793 Merge pull request #131061 from aramase/aramase/c/kep_4412_add_unique_req
clarify mutual exclusivity of service account annotation keys in godoc

Kubernetes-commit: ea04d665dade19bdfa548b1257b58f80e36e4e17
2025-04-24 00:13:56 +00:00
Kubernetes Publisher 6fd894d356 Merge pull request #130995 from xigang/utils
bump k8s.io/utils for improvements

Kubernetes-commit: 43a7d3be12425cc80ca6ad3599809a19728c5566
2025-04-24 00:13:55 +00:00
Kubernetes Publisher 8c3b3a28a0 Merge pull request #131204 from dims/move-to-released-version-of-prometheus/client_golang-v1.22.0-from-rc.0
Move to released version of prometheus/client_golang v1.22.0 from rc.0

Kubernetes-commit: 92af6ab6926f192a3d4543a1d6fa39f20edad3ea
2025-04-08 23:11:09 +00:00
Davanum Srinivas 61dae0523b Move to released version of prometheus/client_golang v1.22.0 from rc.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 2ef4a8426c2c1b6e3495de08c4686382a752f8f7
2025-04-08 08:35:18 -04:00
Kubernetes Publisher 342ae89ec3 Merge pull request #131103 from ahrtr/etcd_sdk_20250328
Bump etcd 3.5.21 sdk

Kubernetes-commit: f4d1686120d2367dd4c00df53e93dad51c414435
2025-04-01 11:23:13 +00:00
Benjamin Wang b83c32f9bd 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
Anish Ramasekar 560bf1d9f1 clarify mutual exclusivity of service account annotation keys in godoc
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: f7e82d8059d29a279740a03ca2d9a76615632d5d
2025-03-25 17:30:42 -07:00
Kubernetes Publisher 533c0cb7a6 Merge pull request #130701 from roycaihw/psi-metrics
Surface Pressure Stall Information (PSI) metrics

Kubernetes-commit: 62555cadc741a8aef31acab05e9ed60f897edb1b
2025-03-24 19:02:37 +00:00
xigang 34bc5342f5 bump k8s.io/utils
Kubernetes-commit: fe14689f221a968806b771b226581efb834654cd
2025-03-22 10:14:01 +08:00
Kubernetes Publisher cd9f99aa1a Merge pull request #129296 from carlory/fg-CPUManager
Remove general available feature-gate CPUManager

Kubernetes-commit: 3eb5fa2b1b44aa7e188af9f13a04f60cfc8421a5
2025-03-21 11:10:34 +00:00
Haowei Cai f5162a40ca API definition for PSI metrics
Kubernetes-commit: c7fc9d5f91aed676dcae15679eca42b646302377
2025-03-20 19:25:38 +00:00
Aaina26 c7defa9550 fixed the formatting
Kubernetes-commit: 42d3716d7270d10f3570e189cb476a4495111095
2025-02-04 10:53:53 +05:30
Aaina26 3fee2d405f Fixed go routine leak in kubelet tests
Kubernetes-commit: 268033a5116b93383a0cd9ec535e804313e5c948
2025-02-02 00:16:52 +05:30
carlory 2459d5bcd7 Remove general available feature-gate CPUManager
Signed-off-by: carlory <baofa.fan@daocloud.io>

Kubernetes-commit: 0882efaf8e6b6a7dcef325e28b19bbea3ad6e646
2024-12-19 14:30:07 +08:00
Kubernetes Publisher 6abc4fc14c Merge pull request #129872 from seans3/websocket-https-proxy
WebSocket HTTPS Proxy support

Kubernetes-commit: 6f13ba03dac1865174b4edf2b43f6a0f453a8ac7
2025-03-21 07:47:56 +00:00
Kubernetes Publisher 7395334ab6 Merge pull request #130535 from ffromani/cpumanager-policy-options-ga
node: kep-2625: cpu manager policy options GA

Kubernetes-commit: 6bc352f6a9317b34cc52ac3094a441787efcc18a
2025-03-20 22:03:54 +00:00
Francesco Romani 91db061239 node: kep-2625: cpu manager policy options GA
Move the support for CPUManager Policy Options to GA

Signed-off-by: Francesco Romani <fromani@redhat.com>

Kubernetes-commit: 3c7ed00e2248da6a7825be93638d0ef28019ab0d
2025-03-03 11:00:30 +01:00
Kubernetes Publisher 06e060fb2b Merge pull request #130028 from AkihiroSuda/subids-per-pod
kubelet: config: add userNamespaces.idsPerPod

Kubernetes-commit: 4467dd3d6c21e88258fd9eefe9b512a5e86829c2
2025-03-19 18:04:06 +00:00
Akihiro Suda 9685938ad2 kubelet: config: add userNamespaces.idsPerPod
IDsPerPod is the mapping length of subids for UserNS.
The length must be multiple of 65536.
Default: 65536

Implements kubernetes/enhancements PR 5020 (addendum to KEP-127)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>

Kubernetes-commit: 1592bfa4a81182ffb2ad599d600778e92564e3c0
2025-02-07 16:25:52 +09:00
Kubernetes Publisher 64ed7a97e5 Merge pull request #130906 from serathius/streaming-validation
Update kube-openapi and integrate streaming tags validation

Kubernetes-commit: 32b1819423de505da855cf7544e871a04e63d6ed
2025-03-19 06:16:38 +00:00
Marek Siarkowicz 49a48a4192 Update kube-openapi and integrate streaming tags validation
Kubernetes-commit: 75a4d136abac241f728407515e3d0d8305594675
2025-03-18 21:26:22 +01:00
Kubernetes Publisher 94245cf615 Merge pull request #128152 from stlaz/ensure-secret-images
Multi-tenancy in accessing node images via Pod API

Kubernetes-commit: fcb2418f7b6cbeda85191f70d99cd4b90e84e32f
2025-03-17 18:14:55 +00:00
Sean Sullivan bc1642e747 Websocket HTTPS proxy support
Kubernetes-commit: f73945aae56b51078318199ff2f0ecae91bc489e
2025-01-29 03:56:55 +00:00
Stanislav Láznička d47f656667 make update
Kubernetes-commit: 0ca233384622f8e5080f38db6b8a4c9e70db6dfa
2024-10-09 15:02:13 +02:00
Stanislav Láznička c9a655749b kubelet: modify KubeletConfiguration API with image pull policies
Also adds PreloadedImagesVerificationAllowlist to API exceptions list
for missing list type as this is not a part of the REST API.

Kubernetes-commit: 47827f4d9a51d3bcc0ed0a6893969d00d45cce22
2024-10-15 17:04:36 +02:00
Stanislav Láznička 317a26d34c imagepullmanager: add v1alpha1 config API
Kubernetes-commit: 37e0fd50aac2a1860839ece6f256b74c4f73a012
2024-10-09 14:38:25 +02:00
Kubernetes Publisher de5a54b8fc Merge pull request #130693 from novahe/fix/test-cases
Fix test cases that may potentially cause a panic.

Kubernetes-commit: 336a32a270997731873b6d8b616f4ae91d903fcf
2025-03-13 14:09:35 +00:00
Kubernetes Publisher 53d3609209 Merge pull request #128372 from aramase/aramase/f/kep_4412_alpha_impl
KSA token for Kubelet image credential providers alpha

Kubernetes-commit: e0ab1a16adc67936d6810b54a4295dbce47df829
2025-03-12 10:11:03 +00:00
novahe 670a59a8dc Fix test cases that may potentially cause a panic.
Kubernetes-commit: 9e53371ddaaeab4083fde45e43c803071238e686
2025-03-11 17:41:37 +08:00
Anish Ramasekar 32b1076ae4 Add service account token and annotation to v1 CredentialProviderRequest
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: dd7b9f6171bd94e18a6dfd25f10bf6388f3ea3bd
2024-10-25 12:59:51 -07:00
Anish Ramasekar acdd50b0ce Add TokenAttributes field to v1 CredentialProvider
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: ba2eecca0d25425d0705972bce8af886af56ecf4
2024-10-17 11:46:24 -07:00
Kubernetes Publisher d6f6b9cc90 Merge pull request #130555 from thockin/k_k_randfill
Use randfill in k/k

Kubernetes-commit: 0f2bde7745f3b4eadcf317bc5056dfeb96859bd3
2025-03-09 14:18:46 +00:00
Tim Hockin 9173e4f132 Vendor randfill
Kubernetes-commit: 0ce4268b1fe4f78d77249e329b0349b9d2dd2c65
2025-03-03 23:46:48 -08:00
Kubernetes Publisher 7ae82ac4fd 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:16:28 +00:00
Davanum Srinivas 5461a44d58 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 0c40803dd0 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 0ede351260 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:45:30 +00:00
David Ashpole ca68df85aa 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 29f30242a0 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:47:58 +00:00
Kubernetes Publisher de9b8ac21f 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:50:10 +00:00
Davanum Srinivas 655eeb60b7 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
Kubernetes Publisher 11db14cceb Merge pull request #127577 from vaibhav2107/eviction-hard
Added the MergeDefaultEvictionSettings Kubelet Config

Kubernetes-commit: 1b4c3483cea4aae55d2eb815a0ff855b587c9a67
2025-02-26 22:04:51 +00:00
cpanato c218b2b151 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 420e17846e Merge pull request #130118 from lucasrattz/update-anp
Bump konnectivity-client to v0.31.2

Kubernetes-commit: 7c59b07533ba4bca1766c10763d8b4a6d7ad00c4
2025-02-24 16:52:05 +00:00
Kubernetes Publisher 45b0967fe5 Merge pull request #130359 from my-git9/assertion1
fix wrong assertion on tests

Kubernetes-commit: 06d81cfc7a485487375814fd8d5cefdf644c2d28
2025-02-24 16:52:04 +00:00
Kubernetes Publisher 154a9faf37 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:30:06 +00:00
xin.li d3edd9ebb6 fix wrong assertion on tests
Signed-off-by: xin.li <xin.li@daocloud.io>

Kubernetes-commit: bc4ae15d77beab23f321bf6547f82c04ba27c3fa
2025-02-22 12:39:01 +08:00
Lucas Rattz 16b6f18fc1 Bump konnectivity-client to v0.31.2
Kubernetes-commit: f8728b62228faec0048e55100747d7aee92d14ca
2025-02-12 18:47:51 +00:00
Jordan Liggitt cfae0306c4 Drop winsymlink go 1.23 workaround
(cherry picked from commit 3990b6324d0427eaf9ff970da2be02711567ef5f)

Kubernetes-commit: 1f642c79c3192994e76bbe8e7360fd661cd21ab4
2025-02-06 12:45:52 -05:00
Kubernetes Publisher b6cc6f91b3 Merge pull request #130249 from seans3/bump-websockets-version
Update gorilla/websockets library from 1.5.0 to latest 1.5.3

Kubernetes-commit: 728dc0d8c7a4d68157b2106330b65abcd5faac87
2025-02-19 04:34:07 +00:00
Sean Sullivan e15397de45 Update gorilla/websockets library from 1.5.0 to latest 1.5.3
Kubernetes-commit: 3100bbab2f7f013b08910f28d8a3debc28a57ea9
2025-02-19 00:26:21 +00:00
Kubernetes Publisher d8d4232658 Merge pull request #130049 from aojea/avoid_ginkgo_dep
reduce dependencies in apimachinery net testing utils

Kubernetes-commit: 670b98bf9229bb1f193571949871f794f7b11ec3
2025-02-11 12:40:40 +00:00
Antonio Ojea d870510758 reduce dependencies in apimachinery net testing utils
Consumers of the kubernetes golang API and clients must use
k8s.io/api,apimachinery,client-go. This is also require to download all
the necessary dependencies.

The apimachinery code contains a testing util for proxies that is used
in client-go and in the kubectl e2e. Since the tests on e2e require
ginkgo and we want to ensure this testing library is not used in
production, we cast the interface to match one of those libraries, but
the problem is that this forces consumers of apimachinery to also
download the ginkgo library.

Since NewHTTPProxyHandler receives a testing.TB interface, there is no
need to cast the interface, if someone wants to use it by implementing a
testing interface it is already aware of the risks.

Kubernetes-commit: af3b9e613d3b76b826369153760a069aabb4cf7f
2025-02-08 15:27:20 +00:00
Kubernetes Publisher ee29692d77 Merge pull request #129844 from cici37/bumCEL
Bump cel-go to v0.23.2

Kubernetes-commit: 28ba942659a6fb8c8b9a22234176250fe004af06
2025-02-04 05:27:24 +00:00
Cici Huang d17576c375 Bump cel-go to v0.23.2.
Kubernetes-commit: c1e0443232f9c6da9119ae71e8bd7d7ef8271088
2025-01-27 18:43:12 +00:00
Kubernetes Publisher 49ceb660b7 Merge pull request #129732 from dims/switch-to-v2.6.3-of-gopkg.in/go-jose/go-jose.v2
Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3 and github.com/coreos/go-oidc @ v2.3.0

Kubernetes-commit: a444a5bfedb2807632447bfb8350bd41fd1a3d77
2025-01-23 01:00:24 +00:00
Kubernetes Publisher 2d53950087 Merge pull request #127709 from pohly/log-client-go-rest
client-go/rest: finish context support

Kubernetes-commit: 427cd18f726be3e3c4f657258dc17a97beca92d5
2025-01-22 21:39:14 +00:00
Davanum Srinivas 51f8fbabf6 update github.com/coreos/go-oidc to v2.3.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: faf30b30679e51f45ed70c714a0e9937d226329a
2025-01-22 13:41:04 -05:00
Davanum Srinivas 10675b7c91 Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: c9e81cd84ca12d0a60c8e11eb318c13f657217c1
2025-01-21 09:21:27 -05:00
Kubernetes Publisher 46f9668b67 Merge pull request #129669 from aramase/aramase/f/credential_provider_config_dup_validation
credential provider config: validate duplicate names early and preserve provider order

Kubernetes-commit: b480e3130f0efc432dc87e3888db9bfa0b44f003
2025-01-18 04:55:06 +00:00
Anish Ramasekar e29f7ad7db update credential provider godoc with unique provider name req
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: 92e35e7618ff30e1c8e79f5efb3788dfedf24bb3
2025-01-16 14:54:37 -08:00
Kubernetes Publisher 87f23a11a4 Merge pull request #129549 from kannon92/documentation-eviction-transition-duration
add documentation that 0s duration will be overwritten for 5m

Kubernetes-commit: a1bbf17d734a087597376c5b6a2e39d77d9004d8
2025-01-16 21:01:47 +00:00
Kubernetes Publisher c03408a1f6 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:08:26 +00:00
Stephen Kitt 8c01922ec6 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 f7ea3e0d87 Merge pull request #129622 from dims/update-to-latest-kustomize-v5.6.0
Update to latest kustomize v5.6.0 to drop `github.com/asaskevich/govalidator`

Kubernetes-commit: 42811635adc4840a6769d7a9f7fd47be8df99c43
2025-01-15 00:57:57 +00:00
Davanum Srinivas 67acc934db Drop github.com/asaskevich/govalidator
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 43d86c2a3ef056789c67b0f80bd1ebfcd375a0d4
2025-01-14 13:33:54 -05:00
Kubernetes Publisher b44cc5efdf Merge pull request #129595 from aravindhp/nlq-env-vars
kubelet: use env vars in node log query PS command

Kubernetes-commit: 3d842767073f7abcd8f1edc7daae4cc4b1f2763a
2025-01-14 22:47:16 +00:00
Kevin Hannon 44bca84fc0 add documentation that 0s duration will be overwritten for 5m
Kubernetes-commit: 0899cf892d4c675102ba85e6e916c7d6c9d5eb1d
2025-01-09 09:49:35 -05:00
vaibhav2107 2b1c54bf39 Added the mergeDefaultEvictionSettings Kubelet Config
Kubernetes-commit: a97c6a70451b9c3c9665235f5bd322895a895706
2024-09-24 01:54:07 +05:30
Patrick Ohly e0a2fc1008 client-go/rest: backoff with context support
The BackoffManager interface sleeps without considering the caller's context,
i.e. cancellation is not supported. This alone is reason enough to deprecate it
and to replace it with an interface that supports a context parameter.

The other reason is that contextual logging needs that parameter.

Kubernetes-commit: b15a1943d51adfb8c5e0185d58d25e038c3d6ade
2024-09-02 20:18:47 +02:00
Aravindh Puthiyaparambil c1ed15a27c kubelet: use env vars in node log query PS command
- Use environment variables to pass string arguments in the node log
  query PS command
- Split getLoggingCmd into getLoggingCmdEnv and getLoggingCmdArgs
  for better modularization

Kubernetes-commit: 12345a14c345c6b1992db5130b8c219956cb0439
2024-08-06 15:46:15 -07:00
Kubernetes Publisher 2f2015237d 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:04:40 +00:00
Kubernetes Publisher 00bd735f1e Merge pull request #128872 from alvaroaleman/generics
Use generic btree in watchcache

Kubernetes-commit: 8f8c94a04d00e59d286fe4387197bc62c6a4f374
2025-01-03 17:04:13 +00:00
Alvaro Aleman 7c65529f69 Update github.com/google/btree
Kubernetes-commit: a97ed3c98bcd2c520260aa04c516a24e975e7d69
2025-01-02 19:44:07 -05:00
Davanum Srinivas 8c22cce8b2 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 5d033ba9cb Merge pull request #129213 from Jefftree/k-openapi
Bump kube-openapi

Kubernetes-commit: 13eb074ddd231d127709f0410185eeca68a69c8a
2024-12-14 02:32:12 +00:00
Jefftree 5e297f9842 bump kube-openapi
Kubernetes-commit: 3269f4bb94c58dfe577621c42f88ea06fbdd79a7
2024-12-13 20:50:49 +00:00
Kubernetes Publisher a6391d70fa 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:32:31 +00:00
Kubernetes Publisher a2e888ad8f Merge pull request #128844 from cheftako/updateANP
Bump konnectivity-client to v0.31.1

Kubernetes-commit: f7b1d107c6127781ef2a4d11381e59198151f1e2
2024-12-13 06:27:44 +00:00
Davanum Srinivas dfa1a1af68 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 407b35e566 Merge pull request #129054 from pohly/remove-import-name
remove import doc comments

Kubernetes-commit: e8615e27125518f0ed0ba06244b7ecee21451bb0
2024-12-12 10:28:42 +00:00
Kubernetes Publisher adde6e3b0f Merge pull request #128621 from kmala/master
update the github.com/golang-jwt/jwt/v4 dependency

Kubernetes-commit: a892f0fd80c548c4caedc35933bb441572135c35
2024-12-12 06:37:26 +00:00
Kubernetes Publisher 063633232e Merge pull request #129103 from liggitt/drop-winreadlinkvolume
Drop use of winreadlinkvolume godebug option

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

Kubernetes-commit: 6fc64a261c1dca857a5a7fd1bc87fae38dbe1c8a
2024-12-04 23:05:42 +00:00
Jordan Liggitt 715a6f9fed Revert to go1.22 windows filesystem stdlib behavior
Kubernetes-commit: 3878a3a6de64660e356a35f70471c27a09698090
2024-12-04 09:52:56 -05:00
Patrick Ohly 74b7ed0014 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
Walter Fender f740326692 Bump konnectivity-client to v0.31.1
Bump konnectivity-client to v0.31.1
Includes a feature which allows KNP server count to be determined by
lease.

Kubernetes-commit: 588408df1cd733f1bceeb69632b010b83e1f21df
2024-11-18 14:10:03 -08:00
Kubernetes Publisher 9b49cff505 Merge pull request #128764 from pohly/dra-kubelet-grpc-api-package-name
DRA kubelet: use unique protobuf package name

Kubernetes-commit: 420c6982ef2ff7c7adce40fdb629ce03cdaba6e4
2024-11-13 05:51:58 +00:00
Patrick Ohly b469d38af2 DRA kubelet: use unique protobuf package name
As mentioned in https://protobuf.dev/programming-guides/style, package names
"should be unique". For generated API pb files, Kubernetes uses
"k8s.io.api.<api group>.<version>". The same approach is now used for the
kubelet DRA v1beta1 API. This can be changed without a breaking change because
the API is still unreleased.

This avoids a conflict between the DevicePlugin and the DRA API when both get
used by kubelet:

    2024/11/10 12:51:40 proto: duplicate proto type registered: v1beta1.Device

The exact impact of that conflict is unknown but it seems better to
pro-actively avoid the problem.

Kubernetes-commit: 6c27e8dc8f789fd9daf11f6fc367adf586f727b5
2024-11-12 17:22:05 +01:00
Keerthan Reddy Mala bc5a391783 update the github.com/golang-jwt/jwt/v4 dependency
Kubernetes-commit: 7e977d824cf2740c4ce7f71fdaeecd39f4bb04b1
2024-11-06 11:02:32 -08:00
71 changed files with 7016 additions and 16614 deletions

View File

@ -1,3 +1,8 @@
> ⚠️ **This is an automatically published [staged repository](https://git.k8s.io/kubernetes/staging#external-repository-staging-area) for Kubernetes**.
> Contributions, including issues and pull requests, should be made to the main Kubernetes repository: [https://github.com/kubernetes/kubernetes](https://github.com/kubernetes/kubernetes).
> This repository is read-only for importing, and not used for direct contributions.
> See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.
# kubelet
Implements [KEP 14 - Moving ComponentConfig API types to staging repos](https://git.k8s.io/enhancements/keps/sig-cluster-lifecycle/wgs/115-componentconfig/README.md#kubelet-changes)

View File

@ -18,4 +18,4 @@ limitations under the License.
// +k8s:openapi-gen=true
// +groupName=kubelet.config.k8s.io
package v1 // import "k8s.io/kubelet/config/v1"
package v1

View File

@ -20,6 +20,23 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ServiceAccountTokenCacheType is the type of cache key used for caching credentials returned by the plugin
// when the service account token is used.
type ServiceAccountTokenCacheType string
const (
// TokenServiceAccountTokenCacheType means the kubelet will cache returned credentials
// on a per-token basis. This should be set if the returned credential's lifetime is limited
// to the input service account token's lifetime.
// For example, this must be used when returning the input service account token directly as a pull credential.
TokenServiceAccountTokenCacheType ServiceAccountTokenCacheType = "Token"
// ServiceAccountServiceAccountTokenCacheType means the kubelet will cache returned credentials
// on a per-serviceaccount basis. This should be set if the plugin's credential retrieval logic
// depends only on the service account and not on pod-specific claims.
// Use this when the returned credential is valid for all pods using the same service account.
ServiceAccountServiceAccountTokenCacheType ServiceAccountTokenCacheType = "ServiceAccount"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CredentialProviderConfig is the configuration containing information about
@ -32,7 +49,7 @@ type CredentialProviderConfig struct {
// Multiple providers may match against a single image, in which case credentials
// from all providers will be returned to the kubelet. If multiple providers are called
// for a single image, the results are combined. If providers return overlapping
// auth keys, the value from the provider earlier in this list is used.
// auth keys, the value from the provider earlier in this list is attempted first.
Providers []CredentialProvider `json:"providers"`
}
@ -42,6 +59,7 @@ type CredentialProvider struct {
// name is the required name of the credential provider. It must match the name of the
// provider executable as seen by the kubelet. The executable must be in the kubelet's
// bin directory (set by the --image-credential-provider-bin-dir flag).
// Required to be unique across all providers.
Name string `json:"name"`
// matchImages is a required list of strings used to match against images in order to
@ -87,6 +105,80 @@ type CredentialProvider struct {
// to pass argument to the plugin.
// +optional
Env []ExecEnvVar `json:"env,omitempty"`
// tokenAttributes is the configuration for the service account token that will be passed to the plugin.
// The credential provider opts in to using service account tokens for image pull by setting this field.
// When this field is set, kubelet will generate a service account token bound to the pod for which the
// image is being pulled and pass to the plugin as part of CredentialProviderRequest along with other
// attributes required by the plugin.
//
// The service account metadata and token attributes will be used as a dimension to cache
// the credentials in kubelet. The cache key is generated by combining the service account metadata
// (namespace, name, UID, and annotations key+value for the keys defined in
// serviceAccountTokenAttribute.requiredServiceAccountAnnotationKeys and serviceAccountTokenAttribute.optionalServiceAccountAnnotationKeys).
// The pod metadata (namespace, name, UID) that are in the service account token are not used as a dimension
// to cache the credentials in kubelet. This means workloads that are using the same service account
// could end up using the same credentials for image pull. For plugins that don't want this behavior, or
// plugins that operate in pass-through mode; i.e., they return the service account token as-is, they
// can set the credentialProviderResponse.cacheDuration to 0. This will disable the caching of
// credentials in kubelet and the plugin will be invoked for every image pull. This does result in
// token generation overhead for every image pull, but it is the only way to ensure that the
// credentials are not shared across pods (even if they are using the same service account).
// +optional
TokenAttributes *ServiceAccountTokenAttributes `json:"tokenAttributes,omitempty"`
}
// ServiceAccountTokenAttributes is the configuration for the service account token that will be passed to the plugin.
type ServiceAccountTokenAttributes struct {
// serviceAccountTokenAudience is the intended audience for the projected service account token.
// +required
ServiceAccountTokenAudience string `json:"serviceAccountTokenAudience"`
// cacheType indicates the type of cache key use for caching the credentials returned by the plugin
// when the service account token is used.
// The most conservative option is to set this to "Token", which means the kubelet will cache returned credentials
// on a per-token basis. This should be set if the returned credential's lifetime is limited to the service account
// token's lifetime.
// If the plugin's credential retrieval logic depends only on the service account and not on pod-specific claims,
// then the plugin can set this to "ServiceAccount". In this case, the kubelet will cache returned credentials
// on a per-serviceaccount basis. Use this when the returned credential is valid for all pods using the same service account.
// +required
CacheType ServiceAccountTokenCacheType `json:"cacheType"`
// requireServiceAccount indicates whether the plugin requires the pod to have a service account.
// If set to true, kubelet will only invoke the plugin if the pod has a service account.
// If set to false, kubelet will invoke the plugin even if the pod does not have a service account
// and will not include a token in the CredentialProviderRequest in that scenario. This is useful for plugins that
// are used to pull images for pods without service accounts (e.g., static pods).
// +required
RequireServiceAccount *bool `json:"requireServiceAccount"`
// requiredServiceAccountAnnotationKeys is the list of annotation keys that the plugin is interested in
// and that are required to be present in the service account.
// The keys defined in this list will be extracted from the corresponding service account and passed
// to the plugin as part of the CredentialProviderRequest. If any of the keys defined in this list
// are not present in the service account, kubelet will not invoke the plugin and will return an error.
// This field is optional and may be empty. Plugins may use this field to extract
// additional information required to fetch credentials or allow workloads to opt in to
// using service account tokens for image pull.
// If non-empty, requireServiceAccount must be set to true.
// Keys in this list must be unique.
// This list needs to be mutually exclusive with optionalServiceAccountAnnotationKeys.
// +optional
// +listType=set
RequiredServiceAccountAnnotationKeys []string `json:"requiredServiceAccountAnnotationKeys,omitempty"`
// optionalServiceAccountAnnotationKeys is the list of annotation keys that the plugin is interested in
// and that are optional to be present in the service account.
// The keys defined in this list will be extracted from the corresponding service account and passed
// to the plugin as part of the CredentialProviderRequest. The plugin is responsible for validating
// the existence of annotations and their values.
// This field is optional and may be empty. Plugins may use this field to extract
// additional information required to fetch credentials.
// Keys in this list must be unique.
// +optional
// +listType=set
OptionalServiceAccountAnnotationKeys []string `json:"optionalServiceAccountAnnotationKeys,omitempty"`
}
// ExecEnvVar is used for setting environment variables when executing an exec-based

View File

@ -49,6 +49,11 @@ func (in *CredentialProvider) DeepCopyInto(out *CredentialProvider) {
*out = make([]ExecEnvVar, len(*in))
copy(*out, *in)
}
if in.TokenAttributes != nil {
in, out := &in.TokenAttributes, &out.TokenAttributes
*out = new(ServiceAccountTokenAttributes)
(*in).DeepCopyInto(*out)
}
return
}
@ -109,3 +114,34 @@ func (in *ExecEnvVar) DeepCopy() *ExecEnvVar {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceAccountTokenAttributes) DeepCopyInto(out *ServiceAccountTokenAttributes) {
*out = *in
if in.RequireServiceAccount != nil {
in, out := &in.RequireServiceAccount, &out.RequireServiceAccount
*out = new(bool)
**out = **in
}
if in.RequiredServiceAccountAnnotationKeys != nil {
in, out := &in.RequiredServiceAccountAnnotationKeys, &out.RequiredServiceAccountAnnotationKeys
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.OptionalServiceAccountAnnotationKeys != nil {
in, out := &in.OptionalServiceAccountAnnotationKeys, &out.OptionalServiceAccountAnnotationKeys
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountTokenAttributes.
func (in *ServiceAccountTokenAttributes) DeepCopy() *ServiceAccountTokenAttributes {
if in == nil {
return nil
}
out := new(ServiceAccountTokenAttributes)
in.DeepCopyInto(out)
return out
}

View File

@ -18,4 +18,4 @@ limitations under the License.
// +k8s:openapi-gen=true
// +groupName=kubelet.config.k8s.io
package v1alpha1 // import "k8s.io/kubelet/config/v1alpha1"
package v1alpha1

View File

@ -38,6 +38,8 @@ var (
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&CredentialProviderConfig{},
&ImagePullIntent{},
&ImagePulledRecord{},
)
return nil
}

View File

@ -32,7 +32,7 @@ type CredentialProviderConfig struct {
// Multiple providers may match against a single image, in which case credentials
// from all providers will be returned to the kubelet. If multiple providers are called
// for a single image, the results are combined. If providers return overlapping
// auth keys, the value from the provider earlier in this list is used.
// auth keys, the value from the provider earlier in this list is attempted first.
Providers []CredentialProvider `json:"providers"`
}
@ -42,6 +42,7 @@ type CredentialProvider struct {
// name is the required name of the credential provider. It must match the name of the
// provider executable as seen by the kubelet. The executable must be in the kubelet's
// bin directory (set by the --image-credential-provider-bin-dir flag).
// Required to be unique across all providers.
Name string `json:"name"`
// matchImages is a required list of strings used to match against images in order to
@ -95,3 +96,89 @@ type ExecEnvVar struct {
Name string `json:"name"`
Value string `json:"value"`
}
// ImagePullIntent is a record of the kubelet attempting to pull an image.
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImagePullIntent struct {
metav1.TypeMeta `json:",inline"`
// Image is the image spec from a Container's `image` field.
// The filename is a SHA-256 hash of this value. This is to avoid filename-unsafe
// characters like ':' and '/'.
Image string `json:"image"`
}
// ImagePullRecord is a record of an image that was pulled by the kubelet.
//
// If there are no records in the `kubernetesSecrets` field and both `nodeWideCredentials`
// and `anonymous` are `false`, credentials must be re-checked the next time an
// image represented by this record is being requested.
//
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type ImagePulledRecord struct {
metav1.TypeMeta `json:",inline"`
// LastUpdatedTime is the time of the last update to this record
LastUpdatedTime metav1.Time `json:"lastUpdatedTime"`
// ImageRef is a reference to the image represented by this file as received
// from the CRI.
// The filename is a SHA-256 hash of this value. This is to avoid filename-unsafe
// characters like ':' and '/'.
ImageRef string `json:"imageRef"`
// CredentialMapping maps `image` to the set of credentials that it was
// previously pulled with.
// `image` in this case is the content of a pod's container `image` field that's
// got its tag/digest removed.
//
// Example:
// Container requests the `hello-world:latest@sha256:91fb4b041da273d5a3273b6d587d62d518300a6ad268b28628f74997b93171b2` image:
// "credentialMapping": {
// "hello-world": { "nodePodsAccessible": true }
// }
CredentialMapping map[string]ImagePullCredentials `json:"credentialMapping,omitempty"`
}
// ImagePullCredentials describe credentials that can be used to pull an image.
type ImagePullCredentials struct {
// KuberneteSecretCoordinates is an index of coordinates of all the kubernetes
// secrets that were used to pull the image.
// +optional
// +listType=set
KubernetesSecrets []ImagePullSecret `json:"kubernetesSecrets"`
// KubernetesServiceAccounts is an index of coordinates of all the kubernetes
// service accounts that were used to pull the image.
// +optional
// +listType=set
KubernetesServiceAccounts []ImagePullServiceAccount `json:"kubernetesServiceAccounts,omitempty"`
// NodePodsAccessible is a flag denoting the pull credentials are accessible
// by all the pods on the node, or that no credentials are needed for the pull.
//
// If true, it is mutually exclusive with the `kubernetesSecrets` field.
// +optional
NodePodsAccessible bool `json:"nodePodsAccessible,omitempty"`
}
// ImagePullSecret is a representation of a Kubernetes secret object coordinates along
// with a credential hash of the pull secret credentials this object contains.
type ImagePullSecret struct {
UID string `json:"uid"`
Namespace string `json:"namespace"`
Name string `json:"name"`
// CredentialHash is a SHA-256 retrieved by hashing the image pull credentials
// content of the secret specified by the UID/Namespace/Name coordinates.
CredentialHash string `json:"credentialHash"`
}
// ImagePullServiceAccount is a representation of a Kubernetes service account object coordinates
// for which the kubelet sent service account token to the credential provider plugin for image pull credentials.
type ImagePullServiceAccount struct {
UID string `json:"uid"`
Namespace string `json:"namespace"`
Name string `json:"name"`
}

View File

@ -109,3 +109,119 @@ func (in *ExecEnvVar) DeepCopy() *ExecEnvVar {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullCredentials) DeepCopyInto(out *ImagePullCredentials) {
*out = *in
if in.KubernetesSecrets != nil {
in, out := &in.KubernetesSecrets, &out.KubernetesSecrets
*out = make([]ImagePullSecret, len(*in))
copy(*out, *in)
}
if in.KubernetesServiceAccounts != nil {
in, out := &in.KubernetesServiceAccounts, &out.KubernetesServiceAccounts
*out = make([]ImagePullServiceAccount, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullCredentials.
func (in *ImagePullCredentials) DeepCopy() *ImagePullCredentials {
if in == nil {
return nil
}
out := new(ImagePullCredentials)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullIntent) DeepCopyInto(out *ImagePullIntent) {
*out = *in
out.TypeMeta = in.TypeMeta
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullIntent.
func (in *ImagePullIntent) DeepCopy() *ImagePullIntent {
if in == nil {
return nil
}
out := new(ImagePullIntent)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ImagePullIntent) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullSecret) DeepCopyInto(out *ImagePullSecret) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullSecret.
func (in *ImagePullSecret) DeepCopy() *ImagePullSecret {
if in == nil {
return nil
}
out := new(ImagePullSecret)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullServiceAccount) DeepCopyInto(out *ImagePullServiceAccount) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullServiceAccount.
func (in *ImagePullServiceAccount) DeepCopy() *ImagePullServiceAccount {
if in == nil {
return nil
}
out := new(ImagePullServiceAccount)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePulledRecord) DeepCopyInto(out *ImagePulledRecord) {
*out = *in
out.TypeMeta = in.TypeMeta
in.LastUpdatedTime.DeepCopyInto(&out.LastUpdatedTime)
if in.CredentialMapping != nil {
in, out := &in.CredentialMapping, &out.CredentialMapping
*out = make(map[string]ImagePullCredentials, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePulledRecord.
func (in *ImagePulledRecord) DeepCopy() *ImagePulledRecord {
if in == nil {
return nil
}
out := new(ImagePulledRecord)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ImagePulledRecord) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}

View File

@ -18,4 +18,4 @@ limitations under the License.
// +k8s:openapi-gen=true
// +groupName=kubelet.config.k8s.io
package v1beta1 // import "k8s.io/kubelet/config/v1beta1"
package v1beta1

View File

@ -83,6 +83,25 @@ const (
StaticMemoryManagerPolicy = "Static"
)
// ImagePullCredentialsVerificationPolicy is an enum for the policy that is enforced
// when pod is requesting an image that appears on the system
type ImagePullCredentialsVerificationPolicy string
const (
// NeverVerify will never require credential verification for images that
// already exist on the node
NeverVerify ImagePullCredentialsVerificationPolicy = "NeverVerify"
// NeverVerifyPreloadedImages does not require credential verification for images
// pulled outside the kubelet process
NeverVerifyPreloadedImages ImagePullCredentialsVerificationPolicy = "NeverVerifyPreloadedImages"
// NeverVerifyAllowlistedImages does not require credential verification for
// a list of images that were pulled outside the kubelet process
NeverVerifyAllowlistedImages ImagePullCredentialsVerificationPolicy = "NeverVerifyAllowlistedImages"
// AlwaysVerify requires credential verification for accessing any image on the
// node irregardless how it was pulled
AlwaysVerify ImagePullCredentialsVerificationPolicy = "AlwaysVerify"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// KubeletConfiguration contains the configuration for the Kubelet
@ -210,6 +229,28 @@ type KubeletConfiguration struct {
// Default: 10
// +optional
RegistryBurst int32 `json:"registryBurst,omitempty"`
// imagePullCredentialsVerificationPolicy determines how credentials should be
// verified when pod requests an image that is already present on the node:
// - NeverVerify
// - anyone on a node can use any image present on the node
// - NeverVerifyPreloadedImages
// - images that were pulled to the node by something else than the kubelet
// can be used without reverifying pull credentials
// - NeverVerifyAllowlistedImages
// - like "NeverVerifyPreloadedImages" but only node images from
// `preloadedImagesVerificationAllowlist` don't require reverification
// - AlwaysVerify
// - all images require credential reverification
// +optional
ImagePullCredentialsVerificationPolicy ImagePullCredentialsVerificationPolicy `json:"imagePullCredentialsVerificationPolicy,omitempty"`
// preloadedImagesVerificationAllowlist specifies a list of images that are
// exempted from credential reverification for the "NeverVerifyAllowlistedImages"
// `imagePullCredentialsVerificationPolicy`.
// The list accepts a full path segment wildcard suffix "/*".
// Only use image specs without an image tag or digest.
// +optional
// +listType=set
PreloadedImagesVerificationAllowlist []string `json:"preloadedImagesVerificationAllowlist,omitempty"`
// eventRecordQPS is the maximum event creations per second. If 0, there
// is no limit enforced. The value cannot be a negative number.
// Default: 50
@ -260,6 +301,7 @@ type KubeletConfiguration struct {
ClusterDNS []string `json:"clusterDNS,omitempty"`
// streamingConnectionIdleTimeout is the maximum time a streaming connection
// can be idle before the connection is automatically closed.
// Deprecated: no longer has any effect.
// Default: "4h"
// +optional
StreamingConnectionIdleTimeout metav1.Duration `json:"streamingConnectionIdleTimeout,omitempty"`
@ -350,7 +392,6 @@ type KubeletConfiguration struct {
// +optional
CgroupDriver string `json:"cgroupDriver,omitempty"`
// cpuManagerPolicy is the name of the policy to use.
// Requires the CPUManager feature gate to be enabled.
// Default: "None"
// +optional
CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"`
@ -365,12 +406,10 @@ type KubeletConfiguration struct {
SingleProcessOOMKill *bool `json:"singleProcessOOMKill,omitempty"`
// cpuManagerPolicyOptions is a set of key=value which allows to set extra options
// to fine tune the behaviour of the cpu manager policies.
// Requires both the "CPUManager" and "CPUManagerPolicyOptions" feature gates to be enabled.
// Default: nil
// +optional
CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"`
// cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager.
// Requires the CPUManager feature gate to be enabled.
// Default: "10s"
// +optional
CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"`
@ -530,6 +569,7 @@ type KubeletConfiguration struct {
EvictionSoftGracePeriod map[string]string `json:"evictionSoftGracePeriod,omitempty"`
// evictionPressureTransitionPeriod is the duration for which the kubelet has to wait
// before transitioning out of an eviction pressure condition.
// A duration of 0s will be converted to the default value of 5m
// Default: "5m"
// +optional
EvictionPressureTransitionPeriod metav1.Duration `json:"evictionPressureTransitionPeriod,omitempty"`
@ -546,6 +586,16 @@ type KubeletConfiguration struct {
// Default: nil
// +optional
EvictionMinimumReclaim map[string]string `json:"evictionMinimumReclaim,omitempty"`
// mergeDefaultEvictionSettings indicates that defaults for the evictionHard, evictionSoft, evictionSoftGracePeriod, and evictionMinimumReclaim
// fields should be merged into values specified for those fields in this configuration.
// Signals specified in this configuration take precedence.
// Signals not specified in this configuration inherit their defaults.
// If false, and if any signal is specified in this configuration then other signals that
// are not specified in this configuration will be set to 0.
// It applies to merging the fields for which the default exists, and currently only evictionHard has default values.
// Default: false
// +optional
MergeDefaultEvictionSettings *bool `json:"mergeDefaultEvictionSettings,omitempty"`
// podsPerCore is the maximum number of pods per core. Cannot exceed maxPods.
// The value must be a non-negative integer.
// If 0, there is no limit on the number of Pods.
@ -726,6 +776,8 @@ type KubeletConfiguration struct {
EnableSystemLogHandler *bool `json:"enableSystemLogHandler,omitempty"`
// enableSystemLogQuery enables the node log query feature on the /logs endpoint.
// EnableSystemLogHandler has to be enabled in addition for this feature to work.
// Enabling this feature has security implications. The recommendation is to enable it on a need basis for debugging
// purposes and disabling otherwise.
// Default: false
// +featureGate=NodeLogQuery
// +optional
@ -836,7 +888,6 @@ type KubeletConfiguration struct {
// Tracing specifies the versioned configuration for OpenTelemetry tracing clients.
// See https://kep.k8s.io/2832 for more details.
// Default: nil
// +featureGate=KubeletTracing
// +optional
Tracing *tracingapi.TracingConfiguration `json:"tracing,omitempty"`
@ -870,6 +921,11 @@ type KubeletConfiguration struct {
// Default: false
// +optional
FailCgroupV1 *bool `json:"failCgroupV1,omitempty"`
// UserNamespaces contains User Namespace configurations.
// +featureGate=UserNamespacesSupport
// +optional
UserNamespaces *UserNamespaces `json:"userNamespaces,omitempty"`
}
type KubeletAuthorizationMode string
@ -1001,7 +1057,7 @@ type CredentialProviderConfig struct {
// Multiple providers may match against a single image, in which case credentials
// from all providers will be returned to the kubelet. If multiple providers are called
// for a single image, the results are combined. If providers return overlapping
// auth keys, the value from the provider earlier in this list is used.
// auth keys, the value from the provider earlier in this list is attempted first.
Providers []CredentialProvider `json:"providers"`
}
@ -1011,6 +1067,7 @@ type CredentialProvider struct {
// name is the required name of the credential provider. It must match the name of the
// provider executable as seen by the kubelet. The executable must be in the kubelet's
// bin directory (set by the --image-credential-provider-bin-dir flag).
// Required to be unique across all providers.
Name string `json:"name"`
// matchImages is a required list of strings used to match against images in order to
@ -1064,3 +1121,17 @@ type ExecEnvVar struct {
Name string `json:"name"`
Value string `json:"value"`
}
// UserNamespaces contains User Namespace configurations.
type UserNamespaces struct {
// IDsPerPod is the mapping length of UIDs and GIDs.
// The length must be a multiple of 65536, and must be less than 1<<32.
// On non-linux such as windows, only null / absent is allowed.
//
// Changing the value may require recreating all containers on the node.
//
// Default: 65536
// +featureGate=UserNamespacesSupport
// +optional
IDsPerPod *int64 `json:"idsPerPod,omitempty"`
}

View File

@ -229,6 +229,11 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) {
*out = new(int32)
**out = **in
}
if in.PreloadedImagesVerificationAllowlist != nil {
in, out := &in.PreloadedImagesVerificationAllowlist, &out.PreloadedImagesVerificationAllowlist
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.EventRecordQPS != nil {
in, out := &in.EventRecordQPS, &out.EventRecordQPS
*out = new(int32)
@ -372,6 +377,11 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) {
(*out)[key] = val
}
}
if in.MergeDefaultEvictionSettings != nil {
in, out := &in.MergeDefaultEvictionSettings, &out.MergeDefaultEvictionSettings
*out = new(bool)
**out = **in
}
if in.EnableControllerAttachDetach != nil {
in, out := &in.EnableControllerAttachDetach, &out.EnableControllerAttachDetach
*out = new(bool)
@ -517,6 +527,11 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) {
*out = new(bool)
**out = **in
}
if in.UserNamespaces != nil {
in, out := &in.UserNamespaces, &out.UserNamespaces
*out = new(UserNamespaces)
(*in).DeepCopyInto(*out)
}
return
}
@ -674,3 +689,24 @@ func (in *ShutdownGracePeriodByPodPriority) DeepCopy() *ShutdownGracePeriodByPod
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UserNamespaces) DeepCopyInto(out *UserNamespaces) {
*out = *in
if in.IDsPerPod != nil {
in, out := &in.IDsPerPod, &out.IDsPerPod
*out = new(int64)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserNamespaces.
func (in *UserNamespaces) DeepCopy() *UserNamespaces {
if in == nil {
return nil
}
out := new(UserNamespaces)
in.DeepCopyInto(out)
return out
}

2
doc.go
View File

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

75
go.mod
View File

@ -2,64 +2,65 @@
module k8s.io/kubelet
go 1.23.0
go 1.24.0
godebug default=go1.23
godebug default=go1.24
require (
github.com/emicklei/go-restful/v3 v3.11.0
github.com/emicklei/go-restful/v3 v3.12.2
github.com/gogo/protobuf v1.3.2
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.65.0
k8s.io/api v0.0.0-20241108114318-6cc44b8953ae
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba
k8s.io/apiserver v0.0.0-20241108130139-3423727e46ef
k8s.io/client-go v0.0.0-20241108175443-37045084c2aa
k8s.io/component-base v0.0.0-20241108211412-55c45bc78189
k8s.io/cri-api v0.0.0-20241107034520-f9fb3fa09445
github.com/stretchr/testify v1.10.0
go.uber.org/goleak v1.3.0
google.golang.org/grpc v1.72.1
google.golang.org/protobuf v1.36.5
k8s.io/api v0.0.0-20250816062245-fa01e40890d0
k8s.io/apimachinery v0.0.0-20250816040907-f5dd29d6ada1
k8s.io/apiserver v0.0.0-20250816065047-dbf8da530473
k8s.io/client-go v0.0.0-20250816062719-0341f077c9d6
k8s.io/component-base v0.0.0-20250816064138-bbf5f29946df
k8s.io/cri-api v0.0.0-20250816040907-d8fa91b761d1
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
)
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/term v0.25.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.7.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/protobuf v1.35.1 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/term v0.30.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/time v0.9.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)

179
go.sum
View File

@ -6,44 +6,37 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
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/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/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=
github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
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/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
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.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
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/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
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/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
@ -52,10 +45,14 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
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/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
@ -63,46 +60,60 @@ github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVO
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM=
github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
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/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/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
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/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/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=
go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g=
go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI=
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=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
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=
@ -112,42 +123,40 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
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/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
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/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
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/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ=
golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
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/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
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/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
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-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
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=
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=
@ -157,27 +166,29 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20241108114318-6cc44b8953ae h1:XX7vEVBchw0xx4YJZ6OyPxOq3e5hX2PTZ5wu8dw0vco=
k8s.io/api v0.0.0-20241108114318-6cc44b8953ae/go.mod h1:jw6pQTESH9mdZL2vOK3twojvpPxipl5TpLZpPyl5ZYU=
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba h1:ghB5Iygt6Ge8UyIwW7C1kJx4kP7AUTCL9Qg6GCsUUOY=
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba/go.mod h1:HqhdaJUgQqky29T1V0o2yFkt/pZqLFIDyn9Zi/8rxoY=
k8s.io/apiserver v0.0.0-20241108130139-3423727e46ef h1:UW3dV3TMUzXorcaKhgq1jhq+aLv1ji2T2410tn34hEc=
k8s.io/apiserver v0.0.0-20241108130139-3423727e46ef/go.mod h1:hCAQocw78k5SHhJB9536jyiiaHDidMVbRjRipU0ywuw=
k8s.io/client-go v0.0.0-20241108175443-37045084c2aa h1:iY+s3vejL9yeoJGLOjh314JZtg76ZOjiIETKAnlTUfs=
k8s.io/client-go v0.0.0-20241108175443-37045084c2aa/go.mod h1:DojZKPG2ohOKreFao9yo2wFG1IL9OXebT+Q9ytnREY8=
k8s.io/component-base v0.0.0-20241108211412-55c45bc78189 h1:RnPIwV9hWuBPXAn69ozUt99OuP/KDuJTIoxYlaJRt4Q=
k8s.io/component-base v0.0.0-20241108211412-55c45bc78189/go.mod h1:MPazwHX0pvEjtMIsAy4TYw3vrMHUVe1sy4D1o1Xbcwc=
k8s.io/cri-api v0.0.0-20241107034520-f9fb3fa09445 h1:viGJ8xNMuoQl10Bto+w2IJieDd3pPZKQIQ98PgbwXog=
k8s.io/cri-api v0.0.0-20241107034520-f9fb3fa09445/go.mod h1:5WOp91NVV2mzTQRp732avavhFFItsWsQy8jO7DPv8d8=
k8s.io/api v0.0.0-20250816062245-fa01e40890d0 h1:WddRlAJwdWiTmGknuGqNHLxJ7RaF3bqjd933VhVCUes=
k8s.io/api v0.0.0-20250816062245-fa01e40890d0/go.mod h1:PyEssxRzobRLFX/lEYzx5NDkS4JYE20SOKUZjTH0nvI=
k8s.io/apimachinery v0.0.0-20250816040907-f5dd29d6ada1 h1:CyDLPRX8n0wju2WX8Bukq22Ucjz/XiXuS9WQvm/JBBI=
k8s.io/apimachinery v0.0.0-20250816040907-f5dd29d6ada1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
k8s.io/apiserver v0.0.0-20250816065047-dbf8da530473 h1:Fmygzv3VSpDzs9uD828iJF9UMLKoZUmOHJK3CkJUu6Q=
k8s.io/apiserver v0.0.0-20250816065047-dbf8da530473/go.mod h1:jJ1HN4uExyqZ1IAgn3rRcIRJ+a9sCfSV9fEUoGC8HV4=
k8s.io/client-go v0.0.0-20250816062719-0341f077c9d6 h1:9LKKgpQKzMGFGHGTjKbbNdW7beOdDbMZNTkEXWRSbPs=
k8s.io/client-go v0.0.0-20250816062719-0341f077c9d6/go.mod h1:7VxAeZExKZSEiiIaKgN5fzCEcBAeEk7K42u7LqPTESo=
k8s.io/component-base v0.0.0-20250816064138-bbf5f29946df h1:sJe8s1VNOpaiyhfYzHjB7Ji3HdrgqCNBz3DGYoTm9kY=
k8s.io/component-base v0.0.0-20250816064138-bbf5f29946df/go.mod h1:0QeGK6CVamDGXq+dvJFxmoGxkPuM2mdaiQCtCjGAuaY=
k8s.io/cri-api v0.0.0-20250816040907-d8fa91b761d1 h1:URYvn3H8kTQsxkJBO1GLWwptFD0+s1kfnFJJS8gbKmM=
k8s.io/cri-api v0.0.0-20250816040907-d8fa91b761d1/go.mod h1:4qVUjidMg7/Z9YGZpqIDygbkPWkg3mkS1PvOx/kpHTE=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y=
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4=
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA=
sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=

10
pkg/apis/OWNERS Normal file
View File

@ -0,0 +1,10 @@
# See the OWNERS docs at https://go.k8s.io/owners
# Disable inheritance as this is an api owners file
options:
no_parent_owners: true
approvers:
- api-approvers
labels:
- area/kubelet
- sig/node

View File

@ -1,10 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners
# Disable inheritance as this is an api owners file
options:
no_parent_owners: true
approvers:
- api-approvers
reviewers:
- sig-node-api-reviewers
- sig-auth-api-reviewers

View File

@ -17,4 +17,4 @@ limitations under the License.
// +k8s:deepcopy-gen=package
// +groupName=credentialprovider.kubelet.k8s.io
package credentialprovider // import "k8s.io/kubelet/pkg/apis/credentialprovider"
package credentialprovider

View File

@ -32,6 +32,17 @@ type CredentialProviderRequest struct {
// credential provider plugin request. Plugins may optionally parse the image
// to extract any information required to fetch credentials.
Image string
// serviceAccountToken is the service account token bound to the pod for which
// the image is being pulled. This token is only sent to the plugin if the
// tokenAttributes.serviceAccountTokenAudience field is configured in the kubelet's credential provider configuration.
ServiceAccountToken string
// serviceAccountAnnotations is a map of annotations on the service account bound to the
// pod for which the image is being pulled. The list of annotations in the service account
// that need to be passed to the plugin is configured in the kubelet's credential provider
// configuration.
ServiceAccountAnnotations map[string]string
}
type PluginCacheKeyType string

View File

@ -19,4 +19,4 @@ limitations under the License.
// +k8s:defaulter-gen=TypeMeta
// +groupName=credentialprovider.kubelet.k8s.io
package v1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1"
package v1

View File

@ -32,6 +32,18 @@ type CredentialProviderRequest struct {
// credential provider plugin request. Plugins may optionally parse the image
// to extract any information required to fetch credentials.
Image string `json:"image"`
// serviceAccountToken is the service account token bound to the pod for which
// the image is being pulled. This token is only sent to the plugin if the
// tokenAttributes.serviceAccountTokenAudience field is configured in the kubelet's credential
// provider configuration.
ServiceAccountToken string `json:"serviceAccountToken,omitempty" datapolicy:"token"`
// serviceAccountAnnotations is a map of annotations on the service account bound to the
// pod for which the image is being pulled. The list of annotations in the service account
// that need to be passed to the plugin is configured in the kubelet's credential provider
// configuration.
ServiceAccountAnnotations map[string]string `json:"serviceAccountAnnotations,omitempty"`
}
type PluginCacheKeyType string

View File

@ -94,6 +94,8 @@ func Convert_credentialprovider_AuthConfig_To_v1_AuthConfig(in *credentialprovid
func autoConvert_v1_CredentialProviderRequest_To_credentialprovider_CredentialProviderRequest(in *CredentialProviderRequest, out *credentialprovider.CredentialProviderRequest, s conversion.Scope) error {
out.Image = in.Image
out.ServiceAccountToken = in.ServiceAccountToken
out.ServiceAccountAnnotations = *(*map[string]string)(unsafe.Pointer(&in.ServiceAccountAnnotations))
return nil
}
@ -104,6 +106,8 @@ func Convert_v1_CredentialProviderRequest_To_credentialprovider_CredentialProvid
func autoConvert_credentialprovider_CredentialProviderRequest_To_v1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
out.Image = in.Image
out.ServiceAccountToken = in.ServiceAccountToken
out.ServiceAccountAnnotations = *(*map[string]string)(unsafe.Pointer(&in.ServiceAccountAnnotations))
return nil
}

View File

@ -46,6 +46,13 @@ func (in *AuthConfig) DeepCopy() *AuthConfig {
func (in *CredentialProviderRequest) DeepCopyInto(out *CredentialProviderRequest) {
*out = *in
out.TypeMeta = in.TypeMeta
if in.ServiceAccountAnnotations != nil {
in, out := &in.ServiceAccountAnnotations, &out.ServiceAccountAnnotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}

View File

@ -0,0 +1,27 @@
/*
Copyright 2025 The Kubernetes 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.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/kubelet/pkg/apis/credentialprovider"
)
func Convert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
// This conversion intentionally omits the serviceAccountToken and serviceAccountAnnotations fields which are only supported in v1 CredentialProviderRequest.
return autoConvert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(in, out, s)
}

View File

@ -19,4 +19,4 @@ limitations under the License.
// +k8s:defaulter-gen=TypeMeta
// +groupName=credentialprovider.kubelet.k8s.io
package v1alpha1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1"
package v1alpha1

View File

@ -52,11 +52,6 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*credentialprovider.CredentialProviderRequest)(nil), (*CredentialProviderRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(a.(*credentialprovider.CredentialProviderRequest), b.(*CredentialProviderRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*CredentialProviderResponse)(nil), (*credentialprovider.CredentialProviderResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(a.(*CredentialProviderResponse), b.(*credentialprovider.CredentialProviderResponse), scope)
}); err != nil {
@ -67,6 +62,11 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddConversionFunc((*credentialprovider.CredentialProviderRequest)(nil), (*CredentialProviderRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(a.(*credentialprovider.CredentialProviderRequest), b.(*CredentialProviderRequest), scope)
}); err != nil {
return err
}
return nil
}
@ -104,14 +104,11 @@ func Convert_v1alpha1_CredentialProviderRequest_To_credentialprovider_Credential
func autoConvert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
out.Image = in.Image
// WARNING: in.ServiceAccountToken requires manual conversion: does not exist in peer-type
// WARNING: in.ServiceAccountAnnotations requires manual conversion: does not exist in peer-type
return nil
}
// Convert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest is an autogenerated conversion function.
func Convert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
return autoConvert_credentialprovider_CredentialProviderRequest_To_v1alpha1_CredentialProviderRequest(in, out, s)
}
func autoConvert_v1alpha1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(in *CredentialProviderResponse, out *credentialprovider.CredentialProviderResponse, s conversion.Scope) error {
out.CacheKeyType = credentialprovider.PluginCacheKeyType(in.CacheKeyType)
out.CacheDuration = (*v1.Duration)(unsafe.Pointer(in.CacheDuration))

View File

@ -0,0 +1,27 @@
/*
Copyright 2025 The Kubernetes 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.
*/
package v1beta1
import (
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/kubelet/pkg/apis/credentialprovider"
)
func Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
// This conversion intentionally omits the serviceAccountToken and serviceAccountAnnotations fields which are only supported in v1 CredentialProviderRequest.
return autoConvert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in, out, s)
}

View File

@ -19,4 +19,4 @@ limitations under the License.
// +k8s:defaulter-gen=TypeMeta
// +groupName=credentialprovider.kubelet.k8s.io
package v1beta1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1"
package v1beta1

View File

@ -52,11 +52,6 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*credentialprovider.CredentialProviderRequest)(nil), (*CredentialProviderRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(a.(*credentialprovider.CredentialProviderRequest), b.(*CredentialProviderRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*CredentialProviderResponse)(nil), (*credentialprovider.CredentialProviderResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(a.(*CredentialProviderResponse), b.(*credentialprovider.CredentialProviderResponse), scope)
}); err != nil {
@ -67,6 +62,11 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddConversionFunc((*credentialprovider.CredentialProviderRequest)(nil), (*CredentialProviderRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(a.(*credentialprovider.CredentialProviderRequest), b.(*CredentialProviderRequest), scope)
}); err != nil {
return err
}
return nil
}
@ -104,14 +104,11 @@ func Convert_v1beta1_CredentialProviderRequest_To_credentialprovider_CredentialP
func autoConvert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
out.Image = in.Image
// WARNING: in.ServiceAccountToken requires manual conversion: does not exist in peer-type
// WARNING: in.ServiceAccountAnnotations requires manual conversion: does not exist in peer-type
return nil
}
// Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest is an autogenerated conversion function.
func Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error {
return autoConvert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in, out, s)
}
func autoConvert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(in *CredentialProviderResponse, out *credentialprovider.CredentialProviderResponse, s conversion.Scope) error {
out.CacheKeyType = credentialprovider.PluginCacheKeyType(in.CacheKeyType)
out.CacheDuration = (*v1.Duration)(unsafe.Pointer(in.CacheDuration))

View File

@ -46,6 +46,13 @@ func (in *AuthConfig) DeepCopy() *AuthConfig {
func (in *CredentialProviderRequest) DeepCopyInto(out *CredentialProviderRequest) {
*out = *in
out.TypeMeta = in.TypeMeta
if in.ServiceAccountAnnotations != nil {
in, out := &in.ServiceAccountAnnotations, &out.ServiceAccountAnnotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}

File diff suppressed because it is too large Load Diff

View File

@ -4,17 +4,6 @@ syntax = "proto3";
package deviceplugin; // This should have been v1alpha.
option go_package = "k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha";
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;
// Registration is the service advertised by the Kubelet
// Only when Kubelet answers with a success code to a Register Request
// may Device Plugins start their service

View File

@ -0,0 +1,313 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto
package v1alpha
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Registration_Register_FullMethodName = "/deviceplugin.Registration/Register"
)
// RegistrationClient is the client API for Registration service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Registration is the service advertised by the Kubelet
// Only when Kubelet answers with a success code to a Register Request
// may Device Plugins start their service
// Registration may fail when device plugin version is not supported by
// Kubelet or the registered resourceName is already taken by another
// active device plugin. Device plugin is expected to terminate upon registration failure
type RegistrationClient interface {
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error)
}
type registrationClient struct {
cc grpc.ClientConnInterface
}
func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
return &registrationClient{cc}
}
func (c *registrationClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Registration_Register_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegistrationServer is the server API for Registration service.
// All implementations must embed UnimplementedRegistrationServer
// for forward compatibility.
//
// Registration is the service advertised by the Kubelet
// Only when Kubelet answers with a success code to a Register Request
// may Device Plugins start their service
// Registration may fail when device plugin version is not supported by
// Kubelet or the registered resourceName is already taken by another
// active device plugin. Device plugin is expected to terminate upon registration failure
type RegistrationServer interface {
Register(context.Context, *RegisterRequest) (*Empty, error)
mustEmbedUnimplementedRegistrationServer()
}
// UnimplementedRegistrationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRegistrationServer struct{}
func (UnimplementedRegistrationServer) Register(context.Context, *RegisterRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
}
func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {}
func (UnimplementedRegistrationServer) testEmbeddedByValue() {}
// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegistrationServer will
// result in compilation errors.
type UnsafeRegistrationServer interface {
mustEmbedUnimplementedRegistrationServer()
}
func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) {
// If the following call pancis, it indicates UnimplementedRegistrationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Registration_ServiceDesc, srv)
}
func _Registration_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).Register(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_Register_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).Register(ctx, req.(*RegisterRequest))
}
return interceptor(ctx, in, info, handler)
}
// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Registration_ServiceDesc = grpc.ServiceDesc{
ServiceName: "deviceplugin.Registration",
HandlerType: (*RegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Register",
Handler: _Registration_Register_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto",
}
const (
DevicePlugin_ListAndWatch_FullMethodName = "/deviceplugin.DevicePlugin/ListAndWatch"
DevicePlugin_Allocate_FullMethodName = "/deviceplugin.DevicePlugin/Allocate"
)
// DevicePluginClient is the client API for DevicePlugin service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// DevicePlugin is the service advertised by Device Plugins
type DevicePluginClient interface {
// ListAndWatch returns a stream of List of Devices
// Whenever a Device state changes or a Device disappears, ListAndWatch
// returns the new list
ListAndWatch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListAndWatchResponse], error)
// Allocate is called during container creation so that the Device
// Plugin can run device specific operations and instruct Kubelet
// of the steps to make the Device available in the container
Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error)
}
type devicePluginClient struct {
cc grpc.ClientConnInterface
}
func NewDevicePluginClient(cc grpc.ClientConnInterface) DevicePluginClient {
return &devicePluginClient{cc}
}
func (c *devicePluginClient) ListAndWatch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListAndWatchResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DevicePlugin_ServiceDesc.Streams[0], DevicePlugin_ListAndWatch_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[Empty, ListAndWatchResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DevicePlugin_ListAndWatchClient = grpc.ServerStreamingClient[ListAndWatchResponse]
func (c *devicePluginClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AllocateResponse)
err := c.cc.Invoke(ctx, DevicePlugin_Allocate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// DevicePluginServer is the server API for DevicePlugin service.
// All implementations must embed UnimplementedDevicePluginServer
// for forward compatibility.
//
// DevicePlugin is the service advertised by Device Plugins
type DevicePluginServer interface {
// ListAndWatch returns a stream of List of Devices
// Whenever a Device state changes or a Device disappears, ListAndWatch
// returns the new list
ListAndWatch(*Empty, grpc.ServerStreamingServer[ListAndWatchResponse]) error
// Allocate is called during container creation so that the Device
// Plugin can run device specific operations and instruct Kubelet
// of the steps to make the Device available in the container
Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error)
mustEmbedUnimplementedDevicePluginServer()
}
// UnimplementedDevicePluginServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDevicePluginServer struct{}
func (UnimplementedDevicePluginServer) ListAndWatch(*Empty, grpc.ServerStreamingServer[ListAndWatchResponse]) error {
return status.Errorf(codes.Unimplemented, "method ListAndWatch not implemented")
}
func (UnimplementedDevicePluginServer) Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented")
}
func (UnimplementedDevicePluginServer) mustEmbedUnimplementedDevicePluginServer() {}
func (UnimplementedDevicePluginServer) testEmbeddedByValue() {}
// UnsafeDevicePluginServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DevicePluginServer will
// result in compilation errors.
type UnsafeDevicePluginServer interface {
mustEmbedUnimplementedDevicePluginServer()
}
func RegisterDevicePluginServer(s grpc.ServiceRegistrar, srv DevicePluginServer) {
// If the following call pancis, it indicates UnimplementedDevicePluginServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&DevicePlugin_ServiceDesc, srv)
}
func _DevicePlugin_ListAndWatch_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DevicePluginServer).ListAndWatch(m, &grpc.GenericServerStream[Empty, ListAndWatchResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DevicePlugin_ListAndWatchServer = grpc.ServerStreamingServer[ListAndWatchResponse]
func _DevicePlugin_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AllocateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DevicePluginServer).Allocate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DevicePlugin_Allocate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DevicePluginServer).Allocate(ctx, req.(*AllocateRequest))
}
return interceptor(ctx, in, info, handler)
}
// DevicePlugin_ServiceDesc is the grpc.ServiceDesc for DevicePlugin service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DevicePlugin_ServiceDesc = grpc.ServiceDesc{
ServiceName: "deviceplugin.DevicePlugin",
HandlerType: (*DevicePluginServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Allocate",
Handler: _DevicePlugin_Allocate_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "ListAndWatch",
Handler: _DevicePlugin_ListAndWatch_Handler,
ServerStreams: true,
},
},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -4,17 +4,6 @@ syntax = "proto3";
package v1beta1;
option go_package = "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1";
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;
// Registration is the service advertised by the Kubelet
// Only when Kubelet answers with a success code to a Register Request
// may Device Plugins start their service
@ -115,7 +104,7 @@ message Device {
// - PreStartContainer allows Device Plugin to run device specific operations on
// the Devices requested
message PreStartContainerRequest {
repeated string devices_ids = 1 [(gogoproto.customname) = "DevicesIDs"];
repeated string devices_ids = 1;
}
// PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest
@ -161,7 +150,7 @@ message AllocateRequest {
}
message ContainerAllocateRequest {
repeated string devices_ids = 1 [(gogoproto.customname) = "DevicesIDs"];
repeated string devices_ids = 1;
}
// CDIDevice specifies a CDI device information.
@ -195,7 +184,7 @@ message ContainerAllocateResponse {
// Container annotations to pass to the container runtime
map<string, string> annotations = 4;
// CDI devices for the container.
repeated CDIDevice cdi_devices = 5 [(gogoproto.customname) = "CDIDevices"];
repeated CDIDevice cdi_devices = 5;
}
// Mount specifies a host volume to mount into a container.

View File

@ -0,0 +1,447 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto
package v1beta1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Registration_Register_FullMethodName = "/v1beta1.Registration/Register"
)
// RegistrationClient is the client API for Registration service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Registration is the service advertised by the Kubelet
// Only when Kubelet answers with a success code to a Register Request
// may Device Plugins start their service
// Registration may fail when device plugin version is not supported by
// Kubelet or the registered resourceName is already taken by another
// active device plugin. Device plugin is expected to terminate upon registration failure
type RegistrationClient interface {
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error)
}
type registrationClient struct {
cc grpc.ClientConnInterface
}
func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
return &registrationClient{cc}
}
func (c *registrationClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*Empty, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Empty)
err := c.cc.Invoke(ctx, Registration_Register_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegistrationServer is the server API for Registration service.
// All implementations must embed UnimplementedRegistrationServer
// for forward compatibility.
//
// Registration is the service advertised by the Kubelet
// Only when Kubelet answers with a success code to a Register Request
// may Device Plugins start their service
// Registration may fail when device plugin version is not supported by
// Kubelet or the registered resourceName is already taken by another
// active device plugin. Device plugin is expected to terminate upon registration failure
type RegistrationServer interface {
Register(context.Context, *RegisterRequest) (*Empty, error)
mustEmbedUnimplementedRegistrationServer()
}
// UnimplementedRegistrationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRegistrationServer struct{}
func (UnimplementedRegistrationServer) Register(context.Context, *RegisterRequest) (*Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
}
func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {}
func (UnimplementedRegistrationServer) testEmbeddedByValue() {}
// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegistrationServer will
// result in compilation errors.
type UnsafeRegistrationServer interface {
mustEmbedUnimplementedRegistrationServer()
}
func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) {
// If the following call pancis, it indicates UnimplementedRegistrationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Registration_ServiceDesc, srv)
}
func _Registration_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegisterRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).Register(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_Register_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).Register(ctx, req.(*RegisterRequest))
}
return interceptor(ctx, in, info, handler)
}
// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Registration_ServiceDesc = grpc.ServiceDesc{
ServiceName: "v1beta1.Registration",
HandlerType: (*RegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Register",
Handler: _Registration_Register_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto",
}
const (
DevicePlugin_GetDevicePluginOptions_FullMethodName = "/v1beta1.DevicePlugin/GetDevicePluginOptions"
DevicePlugin_ListAndWatch_FullMethodName = "/v1beta1.DevicePlugin/ListAndWatch"
DevicePlugin_GetPreferredAllocation_FullMethodName = "/v1beta1.DevicePlugin/GetPreferredAllocation"
DevicePlugin_Allocate_FullMethodName = "/v1beta1.DevicePlugin/Allocate"
DevicePlugin_PreStartContainer_FullMethodName = "/v1beta1.DevicePlugin/PreStartContainer"
)
// DevicePluginClient is the client API for DevicePlugin service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// DevicePlugin is the service advertised by Device Plugins
type DevicePluginClient interface {
// GetDevicePluginOptions returns options to be communicated with Device
// Manager
GetDevicePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DevicePluginOptions, error)
// ListAndWatch returns a stream of List of Devices
// Whenever a Device state change or a Device disappears, ListAndWatch
// returns the new list
ListAndWatch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListAndWatchResponse], error)
// GetPreferredAllocation returns a preferred set of devices to allocate
// from a list of available ones. The resulting preferred allocation is not
// guaranteed to be the allocation ultimately performed by the
// devicemanager. It is only designed to help the devicemanager make a more
// informed allocation decision when possible.
GetPreferredAllocation(ctx context.Context, in *PreferredAllocationRequest, opts ...grpc.CallOption) (*PreferredAllocationResponse, error)
// Allocate is called during container creation so that the Device
// Plugin can run device specific operations and instruct Kubelet
// of the steps to make the Device available in the container
Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error)
// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
// before each container start. Device plugin can run device specific operations
// such as resetting the device before making devices available to the container
PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error)
}
type devicePluginClient struct {
cc grpc.ClientConnInterface
}
func NewDevicePluginClient(cc grpc.ClientConnInterface) DevicePluginClient {
return &devicePluginClient{cc}
}
func (c *devicePluginClient) GetDevicePluginOptions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DevicePluginOptions, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(DevicePluginOptions)
err := c.cc.Invoke(ctx, DevicePlugin_GetDevicePluginOptions_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *devicePluginClient) ListAndWatch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ListAndWatchResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DevicePlugin_ServiceDesc.Streams[0], DevicePlugin_ListAndWatch_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[Empty, ListAndWatchResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DevicePlugin_ListAndWatchClient = grpc.ServerStreamingClient[ListAndWatchResponse]
func (c *devicePluginClient) GetPreferredAllocation(ctx context.Context, in *PreferredAllocationRequest, opts ...grpc.CallOption) (*PreferredAllocationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PreferredAllocationResponse)
err := c.cc.Invoke(ctx, DevicePlugin_GetPreferredAllocation_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *devicePluginClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AllocateResponse)
err := c.cc.Invoke(ctx, DevicePlugin_Allocate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *devicePluginClient) PreStartContainer(ctx context.Context, in *PreStartContainerRequest, opts ...grpc.CallOption) (*PreStartContainerResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PreStartContainerResponse)
err := c.cc.Invoke(ctx, DevicePlugin_PreStartContainer_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// DevicePluginServer is the server API for DevicePlugin service.
// All implementations must embed UnimplementedDevicePluginServer
// for forward compatibility.
//
// DevicePlugin is the service advertised by Device Plugins
type DevicePluginServer interface {
// GetDevicePluginOptions returns options to be communicated with Device
// Manager
GetDevicePluginOptions(context.Context, *Empty) (*DevicePluginOptions, error)
// ListAndWatch returns a stream of List of Devices
// Whenever a Device state change or a Device disappears, ListAndWatch
// returns the new list
ListAndWatch(*Empty, grpc.ServerStreamingServer[ListAndWatchResponse]) error
// GetPreferredAllocation returns a preferred set of devices to allocate
// from a list of available ones. The resulting preferred allocation is not
// guaranteed to be the allocation ultimately performed by the
// devicemanager. It is only designed to help the devicemanager make a more
// informed allocation decision when possible.
GetPreferredAllocation(context.Context, *PreferredAllocationRequest) (*PreferredAllocationResponse, error)
// Allocate is called during container creation so that the Device
// Plugin can run device specific operations and instruct Kubelet
// of the steps to make the Device available in the container
Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error)
// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
// before each container start. Device plugin can run device specific operations
// such as resetting the device before making devices available to the container
PreStartContainer(context.Context, *PreStartContainerRequest) (*PreStartContainerResponse, error)
mustEmbedUnimplementedDevicePluginServer()
}
// UnimplementedDevicePluginServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDevicePluginServer struct{}
func (UnimplementedDevicePluginServer) GetDevicePluginOptions(context.Context, *Empty) (*DevicePluginOptions, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDevicePluginOptions not implemented")
}
func (UnimplementedDevicePluginServer) ListAndWatch(*Empty, grpc.ServerStreamingServer[ListAndWatchResponse]) error {
return status.Errorf(codes.Unimplemented, "method ListAndWatch not implemented")
}
func (UnimplementedDevicePluginServer) GetPreferredAllocation(context.Context, *PreferredAllocationRequest) (*PreferredAllocationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPreferredAllocation not implemented")
}
func (UnimplementedDevicePluginServer) Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented")
}
func (UnimplementedDevicePluginServer) PreStartContainer(context.Context, *PreStartContainerRequest) (*PreStartContainerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PreStartContainer not implemented")
}
func (UnimplementedDevicePluginServer) mustEmbedUnimplementedDevicePluginServer() {}
func (UnimplementedDevicePluginServer) testEmbeddedByValue() {}
// UnsafeDevicePluginServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DevicePluginServer will
// result in compilation errors.
type UnsafeDevicePluginServer interface {
mustEmbedUnimplementedDevicePluginServer()
}
func RegisterDevicePluginServer(s grpc.ServiceRegistrar, srv DevicePluginServer) {
// If the following call pancis, it indicates UnimplementedDevicePluginServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&DevicePlugin_ServiceDesc, srv)
}
func _DevicePlugin_GetDevicePluginOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DevicePluginServer).GetDevicePluginOptions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DevicePlugin_GetDevicePluginOptions_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DevicePluginServer).GetDevicePluginOptions(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _DevicePlugin_ListAndWatch_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(Empty)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DevicePluginServer).ListAndWatch(m, &grpc.GenericServerStream[Empty, ListAndWatchResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DevicePlugin_ListAndWatchServer = grpc.ServerStreamingServer[ListAndWatchResponse]
func _DevicePlugin_GetPreferredAllocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PreferredAllocationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DevicePluginServer).GetPreferredAllocation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DevicePlugin_GetPreferredAllocation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DevicePluginServer).GetPreferredAllocation(ctx, req.(*PreferredAllocationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DevicePlugin_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AllocateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DevicePluginServer).Allocate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DevicePlugin_Allocate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DevicePluginServer).Allocate(ctx, req.(*AllocateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DevicePlugin_PreStartContainer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PreStartContainerRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DevicePluginServer).PreStartContainer(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: DevicePlugin_PreStartContainer_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DevicePluginServer).PreStartContainer(ctx, req.(*PreStartContainerRequest))
}
return interceptor(ctx, in, info, handler)
}
// DevicePlugin_ServiceDesc is the grpc.ServiceDesc for DevicePlugin service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DevicePlugin_ServiceDesc = grpc.ServiceDesc{
ServiceName: "v1beta1.DevicePlugin",
HandlerType: (*DevicePluginServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetDevicePluginOptions",
Handler: _DevicePlugin_GetDevicePluginOptions_Handler,
},
{
MethodName: "GetPreferredAllocation",
Handler: _DevicePlugin_GetPreferredAllocation_Handler,
},
{
MethodName: "Allocate",
Handler: _DevicePlugin_Allocate_Handler,
},
{
MethodName: "PreStartContainer",
Handler: _DevicePlugin_PreStartContainer_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "ListAndWatch",
Handler: _DevicePlugin_ListAndWatch_Handler,
ServerStreams: true,
},
},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1/api.proto",
}

View File

@ -0,0 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners
labels:
- sig/node
- wg/device-management

View File

@ -0,0 +1,414 @@
/*
Copyright The Kubernetes 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.
*/
// Copyright 2025 The Kubernetes 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.36.4
// protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/dra-health/v1alpha1/api.proto
package v1alpha1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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)
)
// HealthStatus defines the possible health states of a device.
type HealthStatus int32
const (
// UNKNOWN indicates that the health of the device cannot be determined.
HealthStatus_UNKNOWN HealthStatus = 0
// HEALTHY indicates that the device is operating normally.
HealthStatus_HEALTHY HealthStatus = 1
// UNHEALTHY indicates that the device has reported a problem.
HealthStatus_UNHEALTHY HealthStatus = 2
)
// Enum value maps for HealthStatus.
var (
HealthStatus_name = map[int32]string{
0: "UNKNOWN",
1: "HEALTHY",
2: "UNHEALTHY",
}
HealthStatus_value = map[string]int32{
"UNKNOWN": 0,
"HEALTHY": 1,
"UNHEALTHY": 2,
}
)
func (x HealthStatus) Enum() *HealthStatus {
p := new(HealthStatus)
*p = x
return p
}
func (x HealthStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HealthStatus) Descriptor() protoreflect.EnumDescriptor {
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_enumTypes[0].Descriptor()
}
func (HealthStatus) Type() protoreflect.EnumType {
return &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_enumTypes[0]
}
func (x HealthStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HealthStatus.Descriptor instead.
func (HealthStatus) EnumDescriptor() ([]byte, []int) {
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescGZIP(), []int{0}
}
type NodeWatchResourcesRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeWatchResourcesRequest) Reset() {
*x = NodeWatchResourcesRequest{}
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeWatchResourcesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeWatchResourcesRequest) ProtoMessage() {}
func (x *NodeWatchResourcesRequest) ProtoReflect() protoreflect.Message {
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeWatchResourcesRequest.ProtoReflect.Descriptor instead.
func (*NodeWatchResourcesRequest) Descriptor() ([]byte, []int) {
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescGZIP(), []int{0}
}
// DeviceIdentifier uniquely identifies a device within the scope of a driver.
type DeviceIdentifier struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The pool which contains the device.
PoolName string `protobuf:"bytes,1,opt,name=pool_name,json=poolName,proto3" json:"pool_name,omitempty"`
// The unique name of the device within the pool.
DeviceName string `protobuf:"bytes,2,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceIdentifier) Reset() {
*x = DeviceIdentifier{}
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceIdentifier) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceIdentifier) ProtoMessage() {}
func (x *DeviceIdentifier) ProtoReflect() protoreflect.Message {
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeviceIdentifier.ProtoReflect.Descriptor instead.
func (*DeviceIdentifier) Descriptor() ([]byte, []int) {
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescGZIP(), []int{1}
}
func (x *DeviceIdentifier) GetPoolName() string {
if x != nil {
return x.PoolName
}
return ""
}
func (x *DeviceIdentifier) GetDeviceName() string {
if x != nil {
return x.DeviceName
}
return ""
}
// DeviceHealth represents the health of a single device.
type DeviceHealth struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The identifier for the device.
Device *DeviceIdentifier `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
// The health status of the device.
Health HealthStatus `protobuf:"varint,2,opt,name=health,proto3,enum=v1alpha1.HealthStatus" json:"health,omitempty"`
// The Unix time (in seconds) of when this health status was last determined by the plugin.
LastUpdatedTime int64 `protobuf:"varint,3,opt,name=last_updated_time,json=lastUpdatedTime,proto3" json:"last_updated_time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceHealth) Reset() {
*x = DeviceHealth{}
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceHealth) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceHealth) ProtoMessage() {}
func (x *DeviceHealth) ProtoReflect() protoreflect.Message {
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeviceHealth.ProtoReflect.Descriptor instead.
func (*DeviceHealth) Descriptor() ([]byte, []int) {
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescGZIP(), []int{2}
}
func (x *DeviceHealth) GetDevice() *DeviceIdentifier {
if x != nil {
return x.Device
}
return nil
}
func (x *DeviceHealth) GetHealth() HealthStatus {
if x != nil {
return x.Health
}
return HealthStatus_UNKNOWN
}
func (x *DeviceHealth) GetLastUpdatedTime() int64 {
if x != nil {
return x.LastUpdatedTime
}
return 0
}
// NodeWatchResourcesResponse contains a list of devices and their current health.
// This should be a complete list for the driver; Kubelet will reconcile this
// state with its internal cache. Any devices managed by the driver that are
// not in this list will be considered to have an "Unknown" health status after a timeout.
type NodeWatchResourcesResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Devices []*DeviceHealth `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeWatchResourcesResponse) Reset() {
*x = NodeWatchResourcesResponse{}
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeWatchResourcesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeWatchResourcesResponse) ProtoMessage() {}
func (x *NodeWatchResourcesResponse) ProtoReflect() protoreflect.Message {
mi := &file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeWatchResourcesResponse.ProtoReflect.Descriptor instead.
func (*NodeWatchResourcesResponse) Descriptor() ([]byte, []int) {
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescGZIP(), []int{3}
}
func (x *NodeWatchResourcesResponse) GetDevices() []*DeviceHealth {
if x != nil {
return x.Devices
}
return nil
}
var File_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto protoreflect.FileDescriptor
var file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDesc = string([]byte{
0x0a, 0x41, 0x73, 0x74, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x6b, 0x38,
0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x72, 0x61, 0x2d, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68,
0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x1b, 0x0a,
0x19, 0x4e, 0x6f, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x10, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1b,
0x0a, 0x09, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x9e, 0x01, 0x0a,
0x0c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x32, 0x0a,
0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x12, 0x2e, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61,
0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x68, 0x65, 0x61, 0x6c, 0x74,
0x68, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61,
0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x4e, 0x0a,
0x1a, 0x4e, 0x6f, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76,
0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65,
0x61, 0x6c, 0x74, 0x68, 0x52, 0x07, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2a, 0x37, 0x0a,
0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a,
0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45,
0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41,
0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x32, 0x78, 0x0a, 0x11, 0x44, 0x52, 0x41, 0x52, 0x65, 0x73,
0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x63, 0x0a, 0x12, 0x4e,
0x6f, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x73, 0x12, 0x23, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x64,
0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01,
0x42, 0x2d, 0x5a, 0x2b, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x6c,
0x65, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x72, 0x61, 0x2d,
0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
})
var (
file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescOnce sync.Once
file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescData []byte
)
func file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescGZIP() []byte {
file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescOnce.Do(func() {
file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDesc)))
})
return file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDescData
}
var file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_goTypes = []any{
(HealthStatus)(0), // 0: v1alpha1.HealthStatus
(*NodeWatchResourcesRequest)(nil), // 1: v1alpha1.NodeWatchResourcesRequest
(*DeviceIdentifier)(nil), // 2: v1alpha1.DeviceIdentifier
(*DeviceHealth)(nil), // 3: v1alpha1.DeviceHealth
(*NodeWatchResourcesResponse)(nil), // 4: v1alpha1.NodeWatchResourcesResponse
}
var file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_depIdxs = []int32{
2, // 0: v1alpha1.DeviceHealth.device:type_name -> v1alpha1.DeviceIdentifier
0, // 1: v1alpha1.DeviceHealth.health:type_name -> v1alpha1.HealthStatus
3, // 2: v1alpha1.NodeWatchResourcesResponse.devices:type_name -> v1alpha1.DeviceHealth
1, // 3: v1alpha1.DRAResourceHealth.NodeWatchResources:input_type -> v1alpha1.NodeWatchResourcesRequest
4, // 4: v1alpha1.DRAResourceHealth.NodeWatchResources:output_type -> v1alpha1.NodeWatchResourcesResponse
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
}
func init() { file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_init() }
func file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_init() {
if File_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDesc), len(file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_rawDesc)),
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_goTypes,
DependencyIndexes: file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_depIdxs,
EnumInfos: file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_enumTypes,
MessageInfos: file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_msgTypes,
}.Build()
File_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto = out.File
file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_goTypes = nil
file_staging_src_k8s_io_kubelet_pkg_apis_dra_health_v1alpha1_api_proto_depIdxs = nil
}

View File

@ -0,0 +1,67 @@
// Copyright 2025 The Kubernetes 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 v1alpha1;
option go_package = "k8s.io/kubelet/pkg/apis/dra-health/v1alpha1";
// DRAResourceHealth service is implemented by DRA plugins and called by Kubelet.
service DRAResourceHealth {
// NodeWatchResources allows a DRA plugin to stream health updates for its devices to Kubelet.
rpc NodeWatchResources(NodeWatchResourcesRequest) returns (stream NodeWatchResourcesResponse) {}
}
message NodeWatchResourcesRequest {
// Reserved for future use.
}
// HealthStatus defines the possible health states of a device.
enum HealthStatus {
// UNKNOWN indicates that the health of the device cannot be determined.
UNKNOWN = 0;
// HEALTHY indicates that the device is operating normally.
HEALTHY = 1;
// UNHEALTHY indicates that the device has reported a problem.
UNHEALTHY = 2;
}
// DeviceIdentifier uniquely identifies a device within the scope of a driver.
message DeviceIdentifier {
// The pool which contains the device.
string pool_name = 1;
// The unique name of the device within the pool.
string device_name = 2;
}
// DeviceHealth represents the health of a single device.
message DeviceHealth {
// The identifier for the device.
DeviceIdentifier device = 1;
// The health status of the device.
HealthStatus health = 2;
// The Unix time (in seconds) of when this health status was last determined by the plugin.
int64 last_updated_time = 3;
}
// NodeWatchResourcesResponse contains a list of devices and their current health.
// This should be a complete list for the driver; Kubelet will reconcile this
// state with its internal cache. Any devices managed by the driver that are
// not in this list will be considered to have an "Unknown" health status after a timeout.
message NodeWatchResourcesResponse {
repeated DeviceHealth devices = 1;
}

View File

@ -0,0 +1,160 @@
/*
Copyright The Kubernetes 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.
*/
// Copyright 2025 The Kubernetes 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-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/dra-health/v1alpha1/api.proto
package v1alpha1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
DRAResourceHealth_NodeWatchResources_FullMethodName = "/v1alpha1.DRAResourceHealth/NodeWatchResources"
)
// DRAResourceHealthClient is the client API for DRAResourceHealth service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// DRAResourceHealth service is implemented by DRA plugins and called by Kubelet.
type DRAResourceHealthClient interface {
// NodeWatchResources allows a DRA plugin to stream health updates for its devices to Kubelet.
NodeWatchResources(ctx context.Context, in *NodeWatchResourcesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NodeWatchResourcesResponse], error)
}
type dRAResourceHealthClient struct {
cc grpc.ClientConnInterface
}
func NewDRAResourceHealthClient(cc grpc.ClientConnInterface) DRAResourceHealthClient {
return &dRAResourceHealthClient{cc}
}
func (c *dRAResourceHealthClient) NodeWatchResources(ctx context.Context, in *NodeWatchResourcesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[NodeWatchResourcesResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &DRAResourceHealth_ServiceDesc.Streams[0], DRAResourceHealth_NodeWatchResources_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[NodeWatchResourcesRequest, NodeWatchResourcesResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DRAResourceHealth_NodeWatchResourcesClient = grpc.ServerStreamingClient[NodeWatchResourcesResponse]
// DRAResourceHealthServer is the server API for DRAResourceHealth service.
// All implementations must embed UnimplementedDRAResourceHealthServer
// for forward compatibility.
//
// DRAResourceHealth service is implemented by DRA plugins and called by Kubelet.
type DRAResourceHealthServer interface {
// NodeWatchResources allows a DRA plugin to stream health updates for its devices to Kubelet.
NodeWatchResources(*NodeWatchResourcesRequest, grpc.ServerStreamingServer[NodeWatchResourcesResponse]) error
mustEmbedUnimplementedDRAResourceHealthServer()
}
// UnimplementedDRAResourceHealthServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedDRAResourceHealthServer struct{}
func (UnimplementedDRAResourceHealthServer) NodeWatchResources(*NodeWatchResourcesRequest, grpc.ServerStreamingServer[NodeWatchResourcesResponse]) error {
return status.Errorf(codes.Unimplemented, "method NodeWatchResources not implemented")
}
func (UnimplementedDRAResourceHealthServer) mustEmbedUnimplementedDRAResourceHealthServer() {}
func (UnimplementedDRAResourceHealthServer) testEmbeddedByValue() {}
// UnsafeDRAResourceHealthServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DRAResourceHealthServer will
// result in compilation errors.
type UnsafeDRAResourceHealthServer interface {
mustEmbedUnimplementedDRAResourceHealthServer()
}
func RegisterDRAResourceHealthServer(s grpc.ServiceRegistrar, srv DRAResourceHealthServer) {
// If the following call pancis, it indicates UnimplementedDRAResourceHealthServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&DRAResourceHealth_ServiceDesc, srv)
}
func _DRAResourceHealth_NodeWatchResources_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(NodeWatchResourcesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DRAResourceHealthServer).NodeWatchResources(m, &grpc.GenericServerStream[NodeWatchResourcesRequest, NodeWatchResourcesResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DRAResourceHealth_NodeWatchResourcesServer = grpc.ServerStreamingServer[NodeWatchResourcesResponse]
// DRAResourceHealth_ServiceDesc is the grpc.ServiceDesc for DRAResourceHealth service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DRAResourceHealth_ServiceDesc = grpc.ServiceDesc{
ServiceName: "v1alpha1.DRAResourceHealth",
HandlerType: (*DRAResourceHealthServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "NodeWatchResources",
Handler: _DRAResourceHealth_NodeWatchResources_Handler,
ServerStreams: true,
},
},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/dra-health/v1alpha1/api.proto",
}

View File

@ -1,8 +1,5 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- klueska
- pohly
reviewers:
- klueska
- pohly

View File

@ -17,7 +17,7 @@ limitations under the License.
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api.proto
package v1alpha4
package v1
import (
context "context"
@ -326,7 +326,8 @@ func (m *NodeUnprepareResourcesRequest) GetClaims() []*Claim {
type NodeUnprepareResourcesResponse struct {
// The ResourceClaims for which preparation was reverted.
// The same rules as for NodePrepareResourcesResponse.claims
// apply.
// apply. In particular, all claims in the request must
// have an entry in the response, even if that entry is nil.
Claims map[string]*NodeUnprepareResourceResponse `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -485,58 +486,59 @@ func (m *Claim) GetName() string {
}
func init() {
proto.RegisterType((*NodePrepareResourcesRequest)(nil), "v1alpha3.NodePrepareResourcesRequest")
proto.RegisterType((*NodePrepareResourcesResponse)(nil), "v1alpha3.NodePrepareResourcesResponse")
proto.RegisterMapType((map[string]*NodePrepareResourceResponse)(nil), "v1alpha3.NodePrepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodePrepareResourceResponse)(nil), "v1alpha3.NodePrepareResourceResponse")
proto.RegisterType((*Device)(nil), "v1alpha3.Device")
proto.RegisterType((*NodeUnprepareResourcesRequest)(nil), "v1alpha3.NodeUnprepareResourcesRequest")
proto.RegisterType((*NodeUnprepareResourcesResponse)(nil), "v1alpha3.NodeUnprepareResourcesResponse")
proto.RegisterMapType((map[string]*NodeUnprepareResourceResponse)(nil), "v1alpha3.NodeUnprepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodeUnprepareResourceResponse)(nil), "v1alpha3.NodeUnprepareResourceResponse")
proto.RegisterType((*Claim)(nil), "v1alpha3.Claim")
proto.RegisterType((*NodePrepareResourcesRequest)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodePrepareResourcesRequest")
proto.RegisterType((*NodePrepareResourcesResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodePrepareResourcesResponse")
proto.RegisterMapType((map[string]*NodePrepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodePrepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodePrepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodePrepareResourceResponse")
proto.RegisterType((*Device)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.Device")
proto.RegisterType((*NodeUnprepareResourcesRequest)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodeUnprepareResourcesRequest")
proto.RegisterType((*NodeUnprepareResourcesResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodeUnprepareResourcesResponse")
proto.RegisterMapType((map[string]*NodeUnprepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodeUnprepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodeUnprepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.NodeUnprepareResourceResponse")
proto.RegisterType((*Claim)(nil), "k8s.io.kubelet.pkg.apis.dra.v1.Claim")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 566 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcb, 0x6e, 0xd3, 0x4c,
0x14, 0xce, 0x34, 0x97, 0xd6, 0x27, 0xf9, 0x7f, 0xa2, 0x51, 0x85, 0x42, 0x5a, 0x9c, 0xc8, 0x50,
0x12, 0x21, 0x11, 0x8b, 0xb4, 0xa0, 0x0a, 0xc4, 0x26, 0x0d, 0x88, 0x20, 0x54, 0x21, 0x8b, 0x6e,
0xd8, 0x04, 0xc7, 0x1e, 0x52, 0x2b, 0x97, 0x19, 0x66, 0xe2, 0x48, 0xdd, 0xf1, 0x08, 0xbc, 0x03,
0x2f, 0xd3, 0x05, 0x0b, 0xc4, 0x8a, 0x55, 0x44, 0xcd, 0x8b, 0x20, 0xcf, 0xd8, 0x49, 0x5a, 0x39,
0x4d, 0x25, 0x76, 0x73, 0xbe, 0x73, 0xf9, 0xce, 0x9c, 0xef, 0xcc, 0x80, 0x66, 0x33, 0xaf, 0xc1,
0x38, 0x9d, 0x50, 0xbc, 0x35, 0x7d, 0x6c, 0x0f, 0xd9, 0xa9, 0xbd, 0x5f, 0x7e, 0xd4, 0xf7, 0x26,
0xa7, 0x7e, 0xaf, 0xe1, 0xd0, 0x91, 0xd9, 0xa7, 0x7d, 0x6a, 0xca, 0x80, 0x9e, 0xff, 0x49, 0x5a,
0xd2, 0x90, 0x27, 0x95, 0x68, 0xbc, 0x82, 0x9d, 0x63, 0xea, 0x92, 0x77, 0x9c, 0x30, 0x9b, 0x13,
0x8b, 0x08, 0xea, 0x73, 0x87, 0x08, 0x8b, 0x7c, 0xf6, 0x89, 0x98, 0xe0, 0x1a, 0xe4, 0x9c, 0xa1,
0xed, 0x8d, 0x44, 0x09, 0x55, 0xd3, 0xf5, 0x7c, 0xf3, 0x56, 0x23, 0x26, 0x6a, 0x1c, 0x85, 0xb8,
0x15, 0xb9, 0x8d, 0xef, 0x08, 0x76, 0x93, 0x0b, 0x09, 0x46, 0xc7, 0x82, 0xe0, 0x37, 0x57, 0x2a,
0x35, 0x17, 0x95, 0xae, 0xcb, 0x53, 0x34, 0xe2, 0xe5, 0x78, 0xc2, 0xcf, 0x62, 0xb2, 0xf2, 0x47,
0xc8, 0x2f, 0xc1, 0xb8, 0x08, 0xe9, 0x01, 0x39, 0x2b, 0xa1, 0x2a, 0xaa, 0x6b, 0x56, 0x78, 0xc4,
0xcf, 0x21, 0x3b, 0xb5, 0x87, 0x3e, 0x29, 0x6d, 0x54, 0x51, 0x3d, 0xdf, 0xdc, 0xbb, 0x96, 0x2b,
0xa6, 0xb2, 0x54, 0xce, 0xb3, 0x8d, 0x43, 0x64, 0x74, 0x13, 0xc7, 0x32, 0xbf, 0xcc, 0x43, 0xd8,
0x74, 0xc9, 0xd4, 0x73, 0x48, 0x7c, 0x9b, 0xe2, 0x82, 0xa1, 0x2d, 0x1d, 0x56, 0x1c, 0x80, 0xb7,
0x21, 0x4b, 0x38, 0xa7, 0x5c, 0xf6, 0xa2, 0x59, 0xca, 0x30, 0xbe, 0x21, 0xc8, 0xa9, 0x48, 0x7c,
0x0f, 0xfe, 0xe3, 0x6a, 0xdc, 0xdd, 0xb1, 0x3d, 0x8a, 0x4a, 0x6a, 0x56, 0x21, 0x02, 0x8f, 0x43,
0x0c, 0xef, 0x80, 0xc6, 0x28, 0x1d, 0xca, 0x88, 0xa8, 0xd2, 0x56, 0x08, 0x84, 0x5e, 0x5c, 0x81,
0xbc, 0x62, 0x53, 0xee, 0xb4, 0x74, 0x83, 0x82, 0x64, 0xc0, 0x53, 0xf8, 0xdf, 0x71, 0xbd, 0x6e,
0x14, 0xe4, 0xb9, 0xa2, 0x94, 0x09, 0x39, 0x5a, 0xc5, 0x60, 0x56, 0x29, 0x1c, 0xb5, 0x3b, 0xaa,
0x93, 0x4e, 0x5b, 0x58, 0x05, 0xc7, 0xf5, 0x22, 0xcb, 0x15, 0xc6, 0x6b, 0xb8, 0x1b, 0x8e, 0xe1,
0x64, 0xcc, 0xfe, 0x75, 0x3f, 0x7e, 0x22, 0xd0, 0x57, 0x95, 0x8a, 0x86, 0xfa, 0xf6, 0x4a, 0xad,
0x83, 0xcb, 0xaa, 0xad, 0xce, 0x4c, 0xdc, 0x91, 0xde, 0xba, 0x1d, 0x79, 0x71, 0x79, 0x47, 0x6a,
0x6b, 0xd8, 0x92, 0xb6, 0xe4, 0xc9, 0x8a, 0xf1, 0xcc, 0xaf, 0x34, 0xd7, 0x1e, 0x2d, 0x6b, 0xff,
0x1e, 0xb2, 0xb2, 0x35, 0xbc, 0x0b, 0x9a, 0x54, 0x9c, 0xd9, 0x0e, 0x89, 0x42, 0x16, 0x00, 0xbe,
0x03, 0x69, 0xdf, 0x73, 0x95, 0xd8, 0xad, 0xcd, 0x60, 0x56, 0x49, 0x9f, 0x74, 0xda, 0x56, 0x88,
0x61, 0x0c, 0x99, 0x25, 0xa5, 0xe5, 0xb9, 0x39, 0x43, 0x90, 0x09, 0xbb, 0xc1, 0x7d, 0xd8, 0x4e,
0x7a, 0x51, 0x78, 0x6f, 0xdd, 0x8b, 0x93, 0x92, 0x96, 0x1f, 0xdc, 0xec, 0x61, 0x1a, 0x29, 0x3c,
0x82, 0xdb, 0xc9, 0xc2, 0xe0, 0xda, 0x7a, 0xe9, 0x14, 0x59, 0xfd, 0xa6, 0x1a, 0x1b, 0xa9, 0x56,
0xeb, 0xfc, 0x42, 0x47, 0xbf, 0x2e, 0xf4, 0xd4, 0x97, 0x40, 0x47, 0xe7, 0x81, 0x8e, 0x7e, 0x04,
0x3a, 0xfa, 0x1d, 0xe8, 0xe8, 0xeb, 0x1f, 0x3d, 0xf5, 0xe1, 0xfe, 0xe0, 0x50, 0x34, 0x3c, 0x6a,
0x0e, 0xfc, 0x1e, 0x19, 0x92, 0x89, 0xc9, 0x06, 0x7d, 0xd3, 0x66, 0x9e, 0x30, 0x5d, 0x6e, 0x9b,
0x11, 0xc9, 0x41, 0x2f, 0x27, 0x7f, 0xbd, 0xfd, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x91, 0xf3,
0x7a, 0xa9, 0x3b, 0x05, 0x00, 0x00,
// 589 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6f, 0xd3, 0x30,
0x1c, 0xad, 0xd7, 0xad, 0x23, 0xbf, 0x16, 0x34, 0x59, 0x13, 0x2a, 0xdd, 0x48, 0xab, 0x20, 0x50,
0x2f, 0x24, 0x5a, 0x11, 0x68, 0x62, 0x2b, 0x82, 0xae, 0x48, 0x94, 0xc3, 0x34, 0x02, 0xbb, 0x20,
0xc4, 0x48, 0x13, 0x13, 0xac, 0xfe, 0x71, 0xb0, 0x9b, 0x8a, 0xdd, 0xf8, 0x08, 0x48, 0x9c, 0x38,
0xf3, 0x39, 0xb8, 0xef, 0xc8, 0x91, 0xd3, 0xc4, 0xc2, 0x97, 0xe0, 0x84, 0x50, 0xec, 0xb4, 0x94,
0x29, 0x5d, 0x51, 0x27, 0x6e, 0xf6, 0xcf, 0xcf, 0xef, 0x3d, 0xfb, 0xf7, 0xe2, 0x80, 0xe6, 0x04,
0xd4, 0x0c, 0x38, 0x1b, 0x30, 0xac, 0x77, 0x36, 0x85, 0x49, 0x99, 0xd9, 0x09, 0xdb, 0xa4, 0x4b,
0x06, 0x66, 0xd0, 0xf1, 0x4d, 0x27, 0xa0, 0xc2, 0xf4, 0xb8, 0x63, 0x0e, 0x37, 0x4a, 0x37, 0x7d,
0x3a, 0x78, 0x13, 0xb6, 0x4d, 0x97, 0xf5, 0x2c, 0x9f, 0xf9, 0xcc, 0x92, 0xdb, 0xda, 0xe1, 0x6b,
0x39, 0x93, 0x13, 0x39, 0x52, 0x74, 0xc6, 0x0b, 0x58, 0xdb, 0x65, 0x1e, 0xd9, 0xe3, 0x24, 0x70,
0x38, 0xb1, 0x89, 0x60, 0x21, 0x77, 0x89, 0xb0, 0xc9, 0xdb, 0x90, 0x88, 0x01, 0xae, 0x43, 0xce,
0xed, 0x3a, 0xb4, 0x27, 0x8a, 0xa8, 0x92, 0xad, 0xe6, 0x6b, 0xd7, 0xcd, 0xb3, 0xe5, 0xcd, 0x9d,
0x18, 0x6d, 0x27, 0x9b, 0x8c, 0x9f, 0x08, 0xd6, 0xd3, 0xe9, 0x45, 0xc0, 0xfa, 0x82, 0xe0, 0x57,
0xa7, 0xf8, 0x1f, 0xcd, 0xe2, 0x3f, 0x8b, 0x4d, 0x89, 0x8b, 0x87, 0xfd, 0x01, 0x3f, 0x1c, 0x59,
0x28, 0x0d, 0x21, 0x3f, 0x51, 0xc6, 0x2b, 0x90, 0xed, 0x90, 0xc3, 0x22, 0xaa, 0xa0, 0xaa, 0x66,
0xc7, 0x43, 0xfc, 0x04, 0x96, 0x86, 0x4e, 0x37, 0x24, 0xc5, 0x85, 0x0a, 0xaa, 0xe6, 0x6b, 0x5b,
0x73, 0x38, 0x18, 0x19, 0xb0, 0x15, 0xd3, 0xdd, 0x85, 0x4d, 0x64, 0x84, 0xa9, 0x17, 0x3b, 0x3e,
0xf8, 0x7d, 0x58, 0xf6, 0xc8, 0x90, 0xba, 0x64, 0x74, 0xf2, 0x1b, 0xb3, 0x74, 0x9b, 0x12, 0x6e,
0x8f, 0xb6, 0xe1, 0x55, 0x58, 0x22, 0x9c, 0x33, 0x2e, 0x7d, 0x6b, 0xb6, 0x9a, 0x18, 0x9f, 0x11,
0xe4, 0x14, 0x12, 0x5f, 0x83, 0x8b, 0x5c, 0xb5, 0xf1, 0xa0, 0xef, 0xf4, 0x12, 0x21, 0xcd, 0x2e,
0x24, 0xc5, 0xdd, 0xb8, 0x86, 0xd7, 0x40, 0x0b, 0x18, 0xeb, 0x4a, 0x44, 0xc2, 0x74, 0x21, 0x2e,
0xc4, 0xab, 0xb8, 0x0c, 0x79, 0xa5, 0xa6, 0x96, 0xb3, 0x72, 0x19, 0x54, 0x49, 0x02, 0xee, 0xc0,
0x25, 0xd7, 0xa3, 0x07, 0x09, 0x88, 0x7a, 0xa2, 0xb8, 0x18, 0x6b, 0x34, 0x56, 0xa2, 0xe3, 0x72,
0x61, 0xa7, 0xd9, 0x52, 0x4e, 0x5a, 0x4d, 0x61, 0x17, 0x5c, 0x8f, 0x26, 0x33, 0x4f, 0x18, 0x2f,
0xe1, 0x6a, 0x7c, 0x39, 0xfb, 0xfd, 0xe0, 0xff, 0xe4, 0xee, 0x17, 0x02, 0x7d, 0x9a, 0x40, 0xd2,
0x80, 0xf6, 0x29, 0x85, 0xc7, 0xff, 0xd2, 0xf7, 0xe9, 0x7c, 0xa9, 0xd9, 0x7b, 0x37, 0x2b, 0x7b,
0x4f, 0xff, 0xce, 0x5e, 0x7d, 0x2e, 0x0f, 0x69, 0xe9, 0xbb, 0x3d, 0xe5, 0x82, 0xc7, 0xc7, 0x1f,
0xa7, 0x07, 0x4d, 0xa6, 0xe7, 0x19, 0x2c, 0x49, 0xc3, 0x78, 0x1d, 0x34, 0x99, 0x99, 0xc0, 0x71,
0x49, 0x02, 0xf9, 0x53, 0xc0, 0x57, 0x20, 0x1b, 0x52, 0x4f, 0xc5, 0xa5, 0xb1, 0x1c, 0x1d, 0x97,
0xb3, 0xfb, 0xad, 0xa6, 0x1d, 0xd7, 0x30, 0x86, 0xc5, 0x89, 0xac, 0xc8, 0x71, 0xed, 0xcb, 0x02,
0x68, 0x4d, 0xfb, 0xc1, 0x5e, 0x37, 0xf4, 0x69, 0x1f, 0x7f, 0x44, 0xb0, 0x9a, 0xf6, 0x15, 0xe3,
0xad, 0xf9, 0xbe, 0x7d, 0x19, 0x98, 0xd2, 0xf6, 0x79, 0x1e, 0x0e, 0x23, 0x83, 0x3f, 0x21, 0xb8,
0x9c, 0xde, 0x61, 0x5c, 0x9f, 0x37, 0x19, 0xca, 0xd9, 0xbd, 0xf3, 0x05, 0xcb, 0xc8, 0x34, 0xb6,
0x8f, 0x4e, 0x74, 0xf4, 0xed, 0x44, 0xcf, 0xbc, 0x8f, 0x74, 0x74, 0x14, 0xe9, 0xe8, 0x6b, 0xa4,
0xa3, 0xef, 0x91, 0x8e, 0x3e, 0xfc, 0xd0, 0x33, 0xcf, 0x93, 0x1f, 0x82, 0x95, 0xd0, 0x5b, 0x41,
0xc7, 0xb7, 0x62, 0x7a, 0xcb, 0xe3, 0x8e, 0x35, 0xdc, 0x68, 0xe7, 0xe4, 0x43, 0x7f, 0xeb, 0x77,
0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x9a, 0x7f, 0xfc, 0x44, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -547,10 +549,10 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// NodeClient is the client API for Node service.
// DRAPluginClient is the client API for DRAPlugin service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NodeClient interface {
type DRAPluginClient interface {
// NodePrepareResources prepares several ResourceClaims
// for use on the node. If an error is returned, the
// response is ignored. Failures for individual claims
@ -561,34 +563,34 @@ type NodeClient interface {
NodeUnprepareResources(ctx context.Context, in *NodeUnprepareResourcesRequest, opts ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error)
}
type nodeClient struct {
type dRAPluginClient struct {
cc *grpc.ClientConn
}
func NewNodeClient(cc *grpc.ClientConn) NodeClient {
return &nodeClient{cc}
func NewDRAPluginClient(cc *grpc.ClientConn) DRAPluginClient {
return &dRAPluginClient{cc}
}
func (c *nodeClient) NodePrepareResources(ctx context.Context, in *NodePrepareResourcesRequest, opts ...grpc.CallOption) (*NodePrepareResourcesResponse, error) {
func (c *dRAPluginClient) NodePrepareResources(ctx context.Context, in *NodePrepareResourcesRequest, opts ...grpc.CallOption) (*NodePrepareResourcesResponse, error) {
out := new(NodePrepareResourcesResponse)
err := c.cc.Invoke(ctx, "/v1alpha3.Node/NodePrepareResources", in, out, opts...)
err := c.cc.Invoke(ctx, "/k8s.io.kubelet.pkg.apis.dra.v1.DRAPlugin/NodePrepareResources", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *nodeClient) NodeUnprepareResources(ctx context.Context, in *NodeUnprepareResourcesRequest, opts ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) {
func (c *dRAPluginClient) NodeUnprepareResources(ctx context.Context, in *NodeUnprepareResourcesRequest, opts ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) {
out := new(NodeUnprepareResourcesResponse)
err := c.cc.Invoke(ctx, "/v1alpha3.Node/NodeUnprepareResources", in, out, opts...)
err := c.cc.Invoke(ctx, "/k8s.io.kubelet.pkg.apis.dra.v1.DRAPlugin/NodeUnprepareResources", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NodeServer is the server API for Node service.
type NodeServer interface {
// DRAPluginServer is the server API for DRAPlugin service.
type DRAPluginServer interface {
// NodePrepareResources prepares several ResourceClaims
// for use on the node. If an error is returned, the
// response is ignored. Failures for individual claims
@ -599,68 +601,68 @@ type NodeServer interface {
NodeUnprepareResources(context.Context, *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error)
}
// UnimplementedNodeServer can be embedded to have forward compatible implementations.
type UnimplementedNodeServer struct {
// UnimplementedDRAPluginServer can be embedded to have forward compatible implementations.
type UnimplementedDRAPluginServer struct {
}
func (*UnimplementedNodeServer) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest) (*NodePrepareResourcesResponse, error) {
func (*UnimplementedDRAPluginServer) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest) (*NodePrepareResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NodePrepareResources not implemented")
}
func (*UnimplementedNodeServer) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) {
func (*UnimplementedDRAPluginServer) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NodeUnprepareResources not implemented")
}
func RegisterNodeServer(s *grpc.Server, srv NodeServer) {
s.RegisterService(&_Node_serviceDesc, srv)
func RegisterDRAPluginServer(s *grpc.Server, srv DRAPluginServer) {
s.RegisterService(&_DRAPlugin_serviceDesc, srv)
}
func _Node_NodePrepareResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _DRAPlugin_NodePrepareResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NodePrepareResourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServer).NodePrepareResources(ctx, in)
return srv.(DRAPluginServer).NodePrepareResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1alpha3.Node/NodePrepareResources",
FullMethod: "/k8s.io.kubelet.pkg.apis.dra.v1.DRAPlugin/NodePrepareResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServer).NodePrepareResources(ctx, req.(*NodePrepareResourcesRequest))
return srv.(DRAPluginServer).NodePrepareResources(ctx, req.(*NodePrepareResourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Node_NodeUnprepareResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _DRAPlugin_NodeUnprepareResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NodeUnprepareResourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NodeServer).NodeUnprepareResources(ctx, in)
return srv.(DRAPluginServer).NodeUnprepareResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1alpha3.Node/NodeUnprepareResources",
FullMethod: "/k8s.io.kubelet.pkg.apis.dra.v1.DRAPlugin/NodeUnprepareResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NodeServer).NodeUnprepareResources(ctx, req.(*NodeUnprepareResourcesRequest))
return srv.(DRAPluginServer).NodeUnprepareResources(ctx, req.(*NodeUnprepareResourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Node_serviceDesc = grpc.ServiceDesc{
ServiceName: "v1alpha3.Node",
HandlerType: (*NodeServer)(nil),
var _DRAPlugin_serviceDesc = grpc.ServiceDesc{
ServiceName: "k8s.io.kubelet.pkg.apis.dra.v1.DRAPlugin",
HandlerType: (*DRAPluginServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "NodePrepareResources",
Handler: _Node_NodePrepareResources_Handler,
Handler: _DRAPlugin_NodePrepareResources_Handler,
},
{
MethodName: "NodeUnprepareResources",
Handler: _Node_NodeUnprepareResources_Handler,
Handler: _DRAPlugin_NodeUnprepareResources_Handler,
},
},
Streams: []grpc.StreamDesc{},

View File

@ -1,5 +1,5 @@
/*
Copyright 2023 The Kubernetes Authors.
Copyright 2024 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -18,8 +18,8 @@ limitations under the License.
syntax = "proto3";
package v1alpha3;
option go_package = "k8s.io/kubelet/pkg/apis/dra/v1alpha4";
package k8s.io.kubelet.pkg.apis.dra.v1;
option go_package = "k8s.io/kubelet/pkg/apis/dra/v1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
@ -31,7 +31,7 @@ option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_unrecognized_all) = false;
service Node {
service DRAPlugin {
// NodePrepareResources prepares several ResourceClaims
// for use on the node. If an error is returned, the
// response is ignored. Failures for individual claims
@ -95,7 +95,8 @@ message NodeUnprepareResourcesRequest {
message NodeUnprepareResourcesResponse {
// The ResourceClaims for which preparation was reverted.
// The same rules as for NodePrepareResourcesResponse.claims
// apply.
// apply. In particular, all claims in the request must
// have an entry in the response, even if that entry is nil.
map<string, NodeUnprepareResourceResponse> claims = 1;
}

View File

@ -14,17 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha4
package v1
const (
// NodeService should be listed in the "supported versions"
// DRAPluginService needs to be listed in the "supported versions"
// array during plugin registration by a DRA plugin which provides
// an implementation of the v1alpha3 Node service.
//
// This convention was introduced in Kubernetes 1.32. Older DRA
// plugins provide the implementation without advertising it.
//
// For historic reasons (= a mistake...) there is a mismatch between
// the package name and gRPC version.
NodeService = "v1alpha3.NodeService"
// an implementation of the v1 DRAPlugin service.
DRAPluginService = "v1.DRAPlugin"
)

View File

@ -1,187 +0,0 @@
/*
Copyright 2024 The Kubernetes 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.
*/
package v1alpha4
import (
context "context"
fmt "fmt"
grpc "google.golang.org/grpc"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubelet/pkg/apis/dra/v1beta1"
)
var (
localSchemeBuilder runtime.SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
// V1Beta1ServerWrapper implements the [NodeServer] interface by wrapping a [v1beta1.DRAPluginServer].
type V1Beta1ServerWrapper struct {
v1beta1.DRAPluginServer
}
var _ NodeServer = V1Beta1ServerWrapper{}
func (w V1Beta1ServerWrapper) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest) (*NodePrepareResourcesResponse, error) {
var convertedReq v1beta1.NodePrepareResourcesRequest
if err := Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
}
resp, err := w.DRAPluginServer.NodePrepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp NodePrepareResourcesResponse
if err := Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
}
return &convertedResp, nil
}
func (w V1Beta1ServerWrapper) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) {
var convertedReq v1beta1.NodeUnprepareResourcesRequest
if err := Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
}
resp, err := w.DRAPluginServer.NodeUnprepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp NodeUnprepareResourcesResponse
if err := Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
}
return &convertedResp, nil
}
// V1Alpha4ServerWrapper implements the [v1beta1.DRAPluginServer] interface by wrapping a [NodeServer].
type V1Alpha4ServerWrapper struct {
NodeServer
}
var _ v1beta1.DRAPluginServer = V1Alpha4ServerWrapper{}
func (w V1Alpha4ServerWrapper) NodePrepareResources(ctx context.Context, req *v1beta1.NodePrepareResourcesRequest) (*v1beta1.NodePrepareResourcesResponse, error) {
var convertedReq NodePrepareResourcesRequest
if err := Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
}
resp, err := w.NodeServer.NodePrepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp v1beta1.NodePrepareResourcesResponse
if err := Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
}
return &convertedResp, nil
}
func (w V1Alpha4ServerWrapper) NodeUnprepareResources(ctx context.Context, req *v1beta1.NodeUnprepareResourcesRequest) (*v1beta1.NodeUnprepareResourcesResponse, error) {
var convertedReq NodeUnprepareResourcesRequest
if err := Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
}
resp, err := w.NodeServer.NodeUnprepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp v1beta1.NodeUnprepareResourcesResponse
if err := Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
}
return &convertedResp, nil
}
// V1Beta1ClientWrapper implements the [NodeClient] interface by wrapping a [v1beta1.DRAPluginClient].
type V1Beta1ClientWrapper struct {
v1beta1.DRAPluginClient
}
var _ NodeClient = V1Beta1ClientWrapper{}
func (w V1Beta1ClientWrapper) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest, options ...grpc.CallOption) (*NodePrepareResourcesResponse, error) {
var convertedReq v1beta1.NodePrepareResourcesRequest
if err := Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
}
resp, err := w.DRAPluginClient.NodePrepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp NodePrepareResourcesResponse
if err := Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
}
return &convertedResp, nil
}
func (w V1Beta1ClientWrapper) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest, options ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) {
var convertedReq v1beta1.NodeUnprepareResourcesRequest
if err := Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1alpha4 to v1beta1: %w", err)
}
resp, err := w.DRAPluginClient.NodeUnprepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp NodeUnprepareResourcesResponse
if err := Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1beta1 to v1alpha4: %w", err)
}
return &convertedResp, nil
}
// V1Alpha4ClientWrapper implements the [v1beta1.DRAPluginClient] interface by wrapping a [NodeClient].
type V1Alpha4ClientWrapper struct {
NodeClient
}
var _ v1beta1.DRAPluginClient = V1Alpha4ClientWrapper{}
func (w V1Alpha4ClientWrapper) NodePrepareResources(ctx context.Context, req *v1beta1.NodePrepareResourcesRequest, options ...grpc.CallOption) (*v1beta1.NodePrepareResourcesResponse, error) {
var convertedReq NodePrepareResourcesRequest
if err := Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
}
resp, err := w.NodeClient.NodePrepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp v1beta1.NodePrepareResourcesResponse
if err := Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
}
return &convertedResp, nil
}
func (w V1Alpha4ClientWrapper) NodeUnprepareResources(ctx context.Context, req *v1beta1.NodeUnprepareResourcesRequest, options ...grpc.CallOption) (*v1beta1.NodeUnprepareResourcesResponse, error) {
var convertedReq NodeUnprepareResourcesRequest
if err := Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1beta1 to v1alpha4: %w", err)
}
resp, err := w.NodeClient.NodeUnprepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp v1beta1.NodeUnprepareResourcesResponse
if err := Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1alpha4 to v1beta1: %w", err)
}
return &convertedResp, nil
}

View File

@ -1,324 +0,0 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes 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 conversion-gen. DO NOT EDIT.
package v1alpha4
import (
unsafe "unsafe"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1beta1 "k8s.io/kubelet/pkg/apis/dra/v1beta1"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*Claim)(nil), (*v1beta1.Claim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_Claim_To_v1beta1_Claim(a.(*Claim), b.(*v1beta1.Claim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.Claim)(nil), (*Claim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_Claim_To_v1alpha4_Claim(a.(*v1beta1.Claim), b.(*Claim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*Device)(nil), (*v1beta1.Device)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_Device_To_v1beta1_Device(a.(*Device), b.(*v1beta1.Device), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.Device)(nil), (*Device)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_Device_To_v1alpha4_Device(a.(*v1beta1.Device), b.(*Device), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodePrepareResourceResponse)(nil), (*v1beta1.NodePrepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(a.(*NodePrepareResourceResponse), b.(*v1beta1.NodePrepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.NodePrepareResourceResponse)(nil), (*NodePrepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(a.(*v1beta1.NodePrepareResourceResponse), b.(*NodePrepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodePrepareResourcesRequest)(nil), (*v1beta1.NodePrepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(a.(*NodePrepareResourcesRequest), b.(*v1beta1.NodePrepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.NodePrepareResourcesRequest)(nil), (*NodePrepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(a.(*v1beta1.NodePrepareResourcesRequest), b.(*NodePrepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodePrepareResourcesResponse)(nil), (*v1beta1.NodePrepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(a.(*NodePrepareResourcesResponse), b.(*v1beta1.NodePrepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.NodePrepareResourcesResponse)(nil), (*NodePrepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(a.(*v1beta1.NodePrepareResourcesResponse), b.(*NodePrepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourceResponse)(nil), (*v1beta1.NodeUnprepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(a.(*NodeUnprepareResourceResponse), b.(*v1beta1.NodeUnprepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.NodeUnprepareResourceResponse)(nil), (*NodeUnprepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(a.(*v1beta1.NodeUnprepareResourceResponse), b.(*NodeUnprepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourcesRequest)(nil), (*v1beta1.NodeUnprepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(a.(*NodeUnprepareResourcesRequest), b.(*v1beta1.NodeUnprepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.NodeUnprepareResourcesRequest)(nil), (*NodeUnprepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(a.(*v1beta1.NodeUnprepareResourcesRequest), b.(*NodeUnprepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourcesResponse)(nil), (*v1beta1.NodeUnprepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(a.(*NodeUnprepareResourcesResponse), b.(*v1beta1.NodeUnprepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1beta1.NodeUnprepareResourcesResponse)(nil), (*NodeUnprepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(a.(*v1beta1.NodeUnprepareResourcesResponse), b.(*NodeUnprepareResourcesResponse), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha4_Claim_To_v1beta1_Claim(in *Claim, out *v1beta1.Claim, s conversion.Scope) error {
out.Namespace = in.Namespace
out.UID = in.UID
out.Name = in.Name
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_Claim_To_v1beta1_Claim is an autogenerated conversion function.
func Convert_v1alpha4_Claim_To_v1beta1_Claim(in *Claim, out *v1beta1.Claim, s conversion.Scope) error {
return autoConvert_v1alpha4_Claim_To_v1beta1_Claim(in, out, s)
}
func autoConvert_v1beta1_Claim_To_v1alpha4_Claim(in *v1beta1.Claim, out *Claim, s conversion.Scope) error {
out.Namespace = in.Namespace
out.UID = in.UID
out.Name = in.Name
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_Claim_To_v1alpha4_Claim is an autogenerated conversion function.
func Convert_v1beta1_Claim_To_v1alpha4_Claim(in *v1beta1.Claim, out *Claim, s conversion.Scope) error {
return autoConvert_v1beta1_Claim_To_v1alpha4_Claim(in, out, s)
}
func autoConvert_v1alpha4_Device_To_v1beta1_Device(in *Device, out *v1beta1.Device, s conversion.Scope) error {
out.RequestNames = *(*[]string)(unsafe.Pointer(&in.RequestNames))
out.PoolName = in.PoolName
out.DeviceName = in.DeviceName
out.CDIDeviceIDs = *(*[]string)(unsafe.Pointer(&in.CDIDeviceIDs))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_Device_To_v1beta1_Device is an autogenerated conversion function.
func Convert_v1alpha4_Device_To_v1beta1_Device(in *Device, out *v1beta1.Device, s conversion.Scope) error {
return autoConvert_v1alpha4_Device_To_v1beta1_Device(in, out, s)
}
func autoConvert_v1beta1_Device_To_v1alpha4_Device(in *v1beta1.Device, out *Device, s conversion.Scope) error {
out.RequestNames = *(*[]string)(unsafe.Pointer(&in.RequestNames))
out.PoolName = in.PoolName
out.DeviceName = in.DeviceName
out.CDIDeviceIDs = *(*[]string)(unsafe.Pointer(&in.CDIDeviceIDs))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_Device_To_v1alpha4_Device is an autogenerated conversion function.
func Convert_v1beta1_Device_To_v1alpha4_Device(in *v1beta1.Device, out *Device, s conversion.Scope) error {
return autoConvert_v1beta1_Device_To_v1alpha4_Device(in, out, s)
}
func autoConvert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in *NodePrepareResourceResponse, out *v1beta1.NodePrepareResourceResponse, s conversion.Scope) error {
out.Devices = *(*[]*v1beta1.Device)(unsafe.Pointer(&in.Devices))
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse is an autogenerated conversion function.
func Convert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in *NodePrepareResourceResponse, out *v1beta1.NodePrepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1alpha4_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in, out, s)
}
func autoConvert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(in *v1beta1.NodePrepareResourceResponse, out *NodePrepareResourceResponse, s conversion.Scope) error {
out.Devices = *(*[]*Device)(unsafe.Pointer(&in.Devices))
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse is an autogenerated conversion function.
func Convert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(in *v1beta1.NodePrepareResourceResponse, out *NodePrepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodePrepareResourceResponse_To_v1alpha4_NodePrepareResourceResponse(in, out, s)
}
func autoConvert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in *NodePrepareResourcesRequest, out *v1beta1.NodePrepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*v1beta1.Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest is an autogenerated conversion function.
func Convert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in *NodePrepareResourcesRequest, out *v1beta1.NodePrepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1alpha4_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in, out, s)
}
func autoConvert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(in *v1beta1.NodePrepareResourcesRequest, out *NodePrepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest is an autogenerated conversion function.
func Convert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(in *v1beta1.NodePrepareResourcesRequest, out *NodePrepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1beta1_NodePrepareResourcesRequest_To_v1alpha4_NodePrepareResourcesRequest(in, out, s)
}
func autoConvert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in *NodePrepareResourcesResponse, out *v1beta1.NodePrepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*v1beta1.NodePrepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse is an autogenerated conversion function.
func Convert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in *NodePrepareResourcesResponse, out *v1beta1.NodePrepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1alpha4_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in, out, s)
}
func autoConvert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(in *v1beta1.NodePrepareResourcesResponse, out *NodePrepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*NodePrepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse is an autogenerated conversion function.
func Convert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(in *v1beta1.NodePrepareResourcesResponse, out *NodePrepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodePrepareResourcesResponse_To_v1alpha4_NodePrepareResourcesResponse(in, out, s)
}
func autoConvert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in *NodeUnprepareResourceResponse, out *v1beta1.NodeUnprepareResourceResponse, s conversion.Scope) error {
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse is an autogenerated conversion function.
func Convert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in *NodeUnprepareResourceResponse, out *v1beta1.NodeUnprepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1alpha4_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in, out, s)
}
func autoConvert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(in *v1beta1.NodeUnprepareResourceResponse, out *NodeUnprepareResourceResponse, s conversion.Scope) error {
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse is an autogenerated conversion function.
func Convert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(in *v1beta1.NodeUnprepareResourceResponse, out *NodeUnprepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodeUnprepareResourceResponse_To_v1alpha4_NodeUnprepareResourceResponse(in, out, s)
}
func autoConvert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in *NodeUnprepareResourcesRequest, out *v1beta1.NodeUnprepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*v1beta1.Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest is an autogenerated conversion function.
func Convert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in *NodeUnprepareResourcesRequest, out *v1beta1.NodeUnprepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1alpha4_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in, out, s)
}
func autoConvert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(in *v1beta1.NodeUnprepareResourcesRequest, out *NodeUnprepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest is an autogenerated conversion function.
func Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(in *v1beta1.NodeUnprepareResourcesRequest, out *NodeUnprepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1beta1_NodeUnprepareResourcesRequest_To_v1alpha4_NodeUnprepareResourcesRequest(in, out, s)
}
func autoConvert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in *NodeUnprepareResourcesResponse, out *v1beta1.NodeUnprepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*v1beta1.NodeUnprepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse is an autogenerated conversion function.
func Convert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in *NodeUnprepareResourcesResponse, out *v1beta1.NodeUnprepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1alpha4_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in, out, s)
}
func autoConvert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(in *v1beta1.NodeUnprepareResourcesResponse, out *NodeUnprepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*NodeUnprepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse is an autogenerated conversion function.
func Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(in *v1beta1.NodeUnprepareResourcesResponse, out *NodeUnprepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodeUnprepareResourcesResponse_To_v1alpha4_NodeUnprepareResourcesResponse(in, out, s)
}

View File

@ -326,7 +326,8 @@ func (m *NodeUnprepareResourcesRequest) GetClaims() []*Claim {
type NodeUnprepareResourcesResponse struct {
// The ResourceClaims for which preparation was reverted.
// The same rules as for NodePrepareResourcesResponse.claims
// apply.
// apply. In particular, all claims in the request must
// have an entry in the response, even if that entry is nil.
Claims map[string]*NodeUnprepareResourceResponse `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -485,58 +486,59 @@ func (m *Claim) GetName() string {
}
func init() {
proto.RegisterType((*NodePrepareResourcesRequest)(nil), "v1beta1.NodePrepareResourcesRequest")
proto.RegisterType((*NodePrepareResourcesResponse)(nil), "v1beta1.NodePrepareResourcesResponse")
proto.RegisterMapType((map[string]*NodePrepareResourceResponse)(nil), "v1beta1.NodePrepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodePrepareResourceResponse)(nil), "v1beta1.NodePrepareResourceResponse")
proto.RegisterType((*Device)(nil), "v1beta1.Device")
proto.RegisterType((*NodeUnprepareResourcesRequest)(nil), "v1beta1.NodeUnprepareResourcesRequest")
proto.RegisterType((*NodeUnprepareResourcesResponse)(nil), "v1beta1.NodeUnprepareResourcesResponse")
proto.RegisterMapType((map[string]*NodeUnprepareResourceResponse)(nil), "v1beta1.NodeUnprepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodeUnprepareResourceResponse)(nil), "v1beta1.NodeUnprepareResourceResponse")
proto.RegisterType((*Claim)(nil), "v1beta1.Claim")
proto.RegisterType((*NodePrepareResourcesRequest)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodePrepareResourcesRequest")
proto.RegisterType((*NodePrepareResourcesResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodePrepareResourcesResponse")
proto.RegisterMapType((map[string]*NodePrepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodePrepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodePrepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodePrepareResourceResponse")
proto.RegisterType((*Device)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.Device")
proto.RegisterType((*NodeUnprepareResourcesRequest)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodeUnprepareResourcesRequest")
proto.RegisterType((*NodeUnprepareResourcesResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodeUnprepareResourcesResponse")
proto.RegisterMapType((map[string]*NodeUnprepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodeUnprepareResourcesResponse.ClaimsEntry")
proto.RegisterType((*NodeUnprepareResourceResponse)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.NodeUnprepareResourceResponse")
proto.RegisterType((*Claim)(nil), "k8s.io.kubelet.pkg.apis.dra.v1beta1.Claim")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 566 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xce, 0x36, 0x4d, 0x82, 0x27, 0xa1, 0x54, 0xab, 0x0a, 0x85, 0xb4, 0x38, 0x91, 0x5b, 0x42,
0x38, 0x10, 0x2b, 0xa9, 0x40, 0x55, 0xc5, 0xa5, 0x69, 0x2a, 0x14, 0x21, 0x55, 0xd5, 0x8a, 0x5e,
0x38, 0x10, 0x39, 0xf6, 0x12, 0x56, 0xf9, 0x59, 0xe3, 0xb5, 0x23, 0xf5, 0xc6, 0x23, 0xf0, 0x0e,
0xbc, 0x4c, 0xc5, 0xa9, 0x47, 0x4e, 0x85, 0x9a, 0x17, 0x41, 0xde, 0x75, 0x42, 0x5a, 0x39, 0x49,
0x25, 0x6e, 0x9e, 0x6f, 0x66, 0xbe, 0x6f, 0x77, 0xbe, 0x59, 0x83, 0x66, 0xb9, 0xac, 0xee, 0x7a,
0xdc, 0xe7, 0x38, 0x37, 0x69, 0xf4, 0xa8, 0x6f, 0x35, 0x4a, 0x2f, 0xfb, 0xcc, 0xff, 0x1c, 0xf4,
0xea, 0x36, 0x1f, 0x99, 0x7d, 0xde, 0xe7, 0xa6, 0xcc, 0xf7, 0x82, 0x4f, 0x32, 0x92, 0x81, 0xfc,
0x52, 0x7d, 0xc6, 0x09, 0x6c, 0x9f, 0x72, 0x87, 0x9e, 0x79, 0xd4, 0xb5, 0x3c, 0x4a, 0xa8, 0xe0,
0x81, 0x67, 0x53, 0x41, 0xe8, 0x97, 0x80, 0x0a, 0x1f, 0x57, 0x21, 0x6b, 0x0f, 0x2d, 0x36, 0x12,
0x45, 0x54, 0x49, 0xd7, 0xf2, 0xcd, 0x8d, 0x7a, 0xac, 0x53, 0x3f, 0x8e, 0x60, 0x12, 0x67, 0x8d,
0x1f, 0x08, 0x76, 0x92, 0x79, 0x84, 0xcb, 0xc7, 0x82, 0xe2, 0xce, 0x1d, 0xa2, 0xc6, 0x8c, 0x68,
0x59, 0x9b, 0x52, 0x11, 0x27, 0x63, 0xdf, 0xbb, 0x98, 0x6a, 0x95, 0xba, 0x90, 0x9f, 0x83, 0xf1,
0x26, 0xa4, 0x07, 0xf4, 0xa2, 0x88, 0x2a, 0xa8, 0xa6, 0x91, 0xe8, 0x13, 0x1f, 0x42, 0x66, 0x62,
0x0d, 0x03, 0x5a, 0x5c, 0xab, 0xa0, 0x5a, 0xbe, 0xb9, 0xb7, 0x4c, 0x6a, 0xaa, 0x44, 0x54, 0xcb,
0xe1, 0xda, 0x01, 0x32, 0x3e, 0x26, 0xce, 0x64, 0x76, 0x95, 0x17, 0x90, 0x73, 0xe8, 0x84, 0xd9,
0x74, 0x7a, 0x97, 0x47, 0x33, 0x81, 0xb6, 0xc4, 0xc9, 0x34, 0x8f, 0xb7, 0x20, 0x43, 0x3d, 0x8f,
0x7b, 0xf2, 0x24, 0x1a, 0x51, 0x81, 0xf1, 0x1d, 0x41, 0x56, 0x55, 0xe2, 0x5d, 0x78, 0xe8, 0xa9,
0x51, 0x77, 0xc7, 0xd6, 0x28, 0x66, 0xd4, 0x48, 0x21, 0x06, 0x4f, 0x23, 0x0c, 0x6f, 0x83, 0xe6,
0x72, 0x3e, 0x94, 0x15, 0x31, 0xd3, 0x83, 0x08, 0x88, 0xb2, 0xb8, 0x0c, 0x79, 0xa5, 0xa6, 0xd2,
0x69, 0x99, 0x06, 0x05, 0xc9, 0x82, 0xd7, 0xb0, 0x61, 0x3b, 0xac, 0x1b, 0x17, 0x31, 0x47, 0x14,
0xd7, 0x23, 0x8d, 0xd6, 0x66, 0x78, 0x5d, 0x2e, 0x1c, 0xb7, 0x3b, 0xea, 0x24, 0x9d, 0xb6, 0x20,
0x05, 0xdb, 0x61, 0x71, 0xe4, 0x08, 0xe3, 0x2d, 0x3c, 0x8d, 0xa6, 0x70, 0x3e, 0x76, 0xff, 0x73,
0x37, 0xae, 0x10, 0xe8, 0x8b, 0x98, 0xe2, 0x91, 0xbe, 0xbb, 0x43, 0xb5, 0x7f, 0xcb, 0xb2, 0xc5,
0x8d, 0x89, 0xfb, 0x61, 0xad, 0xda, 0x8f, 0x37, 0xb7, 0xf7, 0xa3, 0xba, 0x5c, 0x2c, 0x69, 0x43,
0x5e, 0x2d, 0x98, 0xcd, 0xec, 0x42, 0x33, 0xe3, 0xd1, 0xbc, 0xf1, 0xef, 0x21, 0x23, 0x4f, 0x86,
0x77, 0x40, 0x93, 0x76, 0xbb, 0x96, 0x4d, 0xe3, 0x92, 0x7f, 0x00, 0x7e, 0x02, 0xe9, 0x80, 0x39,
0xca, 0xe9, 0x56, 0x2e, 0xbc, 0x2e, 0xa7, 0xcf, 0x3b, 0x6d, 0x12, 0x61, 0x18, 0xc3, 0xfa, 0x9c,
0xcd, 0xf2, 0xbb, 0xf9, 0x0b, 0x81, 0xd6, 0x26, 0x47, 0x67, 0xc3, 0xa0, 0xcf, 0xc6, 0x98, 0xc2,
0x56, 0xd2, 0x8b, 0xc2, 0x7b, 0x2b, 0x1e, 0x9c, 0xf4, 0xb4, 0xf4, 0xec, 0x5e, 0xcf, 0xd2, 0x48,
0xe1, 0x01, 0x3c, 0x4e, 0xb6, 0x06, 0x57, 0x57, 0x7a, 0xa7, 0xa4, 0x9e, 0xdf, 0xd3, 0x63, 0x23,
0xd5, 0x3a, 0xba, 0xbc, 0xd1, 0xd1, 0xcf, 0x1b, 0x3d, 0xf5, 0x35, 0xd4, 0xd1, 0x65, 0xa8, 0xa3,
0xab, 0x50, 0x47, 0xbf, 0x43, 0x1d, 0x7d, 0xfb, 0xa3, 0xa7, 0x3e, 0xec, 0x0e, 0x0e, 0x44, 0x9d,
0x71, 0x73, 0x10, 0xf4, 0xe8, 0x90, 0xfa, 0xa6, 0x3b, 0xe8, 0x9b, 0x96, 0xcb, 0x84, 0xe9, 0x78,
0x96, 0x19, 0x6b, 0xf4, 0xb2, 0xf2, 0x77, 0xb7, 0xff, 0x37, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x02,
0xca, 0xce, 0x33, 0x05, 0x00, 0x00,
// 591 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0xcd, 0x26, 0x6d, 0x8a, 0x27, 0x01, 0x55, 0xab, 0x0a, 0x85, 0xb4, 0x38, 0x91, 0x7b, 0x89,
0x40, 0xd8, 0x6a, 0x10, 0xa8, 0xe2, 0xd4, 0x38, 0xe9, 0x21, 0x07, 0x4a, 0x65, 0x51, 0x84, 0xb8,
0x54, 0x8e, 0xbd, 0x18, 0x2b, 0x1f, 0x6b, 0xbc, 0x76, 0xa4, 0x82, 0x90, 0x10, 0x27, 0x8e, 0xfc,
0x01, 0x4e, 0xfd, 0x33, 0x3d, 0xc2, 0x8d, 0x53, 0x45, 0xcd, 0x1f, 0x41, 0xde, 0xdd, 0x84, 0x50,
0x39, 0x10, 0x35, 0x70, 0xdb, 0x79, 0x3b, 0x33, 0xef, 0x79, 0xf6, 0x79, 0x17, 0x14, 0x3b, 0xf0,
0xf5, 0x20, 0xa4, 0x11, 0xc5, 0xdb, 0xfd, 0x5d, 0xa6, 0xfb, 0x54, 0xef, 0xc7, 0x3d, 0x32, 0x20,
0x91, 0x1e, 0xf4, 0x3d, 0xdd, 0x0e, 0x7c, 0xa6, 0xbb, 0xa1, 0xad, 0x8f, 0x77, 0x7a, 0x24, 0xb2,
0x77, 0xaa, 0xf7, 0x3c, 0x3f, 0x7a, 0x15, 0xf7, 0x74, 0x87, 0x0e, 0x0d, 0x8f, 0x7a, 0xd4, 0xe0,
0xb5, 0xbd, 0xf8, 0x25, 0x8f, 0x78, 0xc0, 0x57, 0xa2, 0xa7, 0x66, 0xc3, 0xe6, 0x01, 0x75, 0xc9,
0x61, 0x48, 0x02, 0x3b, 0x24, 0x16, 0x61, 0x34, 0x0e, 0x1d, 0xc2, 0x2c, 0xf2, 0x3a, 0x26, 0x2c,
0xc2, 0x26, 0x14, 0x9d, 0x81, 0xed, 0x0f, 0x59, 0x05, 0xd5, 0x0b, 0x8d, 0x52, 0xf3, 0x8e, 0xbe,
0x80, 0x06, 0xbd, 0x9d, 0x96, 0x58, 0xb2, 0x52, 0xfb, 0x90, 0x87, 0xad, 0x6c, 0x0e, 0x16, 0xd0,
0x11, 0x23, 0x98, 0x5c, 0x22, 0x79, 0xbc, 0x10, 0xc9, 0x9f, 0x5a, 0x0a, 0x05, 0x6c, 0x7f, 0x14,
0x85, 0x27, 0x13, 0x1d, 0xd5, 0xb7, 0x50, 0x9a, 0x81, 0xf1, 0x3a, 0x14, 0xfa, 0xe4, 0xa4, 0x82,
0xea, 0xa8, 0xa1, 0x58, 0xe9, 0x12, 0x3f, 0x83, 0xd5, 0xb1, 0x3d, 0x88, 0x49, 0x25, 0x5f, 0x47,
0x8d, 0x52, 0x73, 0xef, 0xaa, 0x32, 0x26, 0x2a, 0x2c, 0xd1, 0xee, 0x51, 0x7e, 0x17, 0x69, 0x6f,
0x32, 0xe7, 0x3c, 0x1d, 0xc1, 0x3e, 0xac, 0xb9, 0x64, 0xec, 0x3b, 0x64, 0x32, 0x83, 0xbb, 0x0b,
0x91, 0x77, 0x78, 0x8d, 0x35, 0xa9, 0xc5, 0x1b, 0xb0, 0x4a, 0xc2, 0x90, 0x86, 0xfc, 0x0b, 0x14,
0x4b, 0x04, 0xda, 0x29, 0x82, 0xa2, 0xc8, 0xc4, 0xdb, 0x70, 0x3d, 0x14, 0x47, 0x7b, 0x3c, 0xb2,
0x87, 0x92, 0x4d, 0xb1, 0xca, 0x12, 0x3c, 0x48, 0x31, 0xbc, 0x09, 0x4a, 0x40, 0xe9, 0x80, 0x67,
0xc8, 0x4e, 0xd7, 0x52, 0x20, 0xdd, 0xc5, 0x35, 0x28, 0x09, 0x36, 0xb1, 0x5d, 0xe0, 0xdb, 0x20,
0x20, 0x9e, 0xf0, 0x10, 0x6e, 0x38, 0xae, 0x7f, 0x2c, 0x93, 0x7c, 0x97, 0x55, 0x56, 0x52, 0x0e,
0x73, 0x3d, 0x39, 0xaf, 0x95, 0xdb, 0x9d, 0xae, 0x50, 0xd2, 0xed, 0x30, 0xab, 0xec, 0xb8, 0xbe,
0x8c, 0x5c, 0xa6, 0x39, 0x70, 0x3b, 0x9d, 0xd0, 0xd1, 0x28, 0xf8, 0x8f, 0x5e, 0xfc, 0x98, 0x07,
0x75, 0x1e, 0x8b, 0x3c, 0x0a, 0xef, 0x12, 0xcd, 0x93, 0x85, 0x6d, 0x30, 0xbf, 0x69, 0xa6, 0x1f,
0xdf, 0xfd, 0xcd, 0x8f, 0xcf, 0x7f, 0xf7, 0xa3, 0x79, 0x75, 0x21, 0x59, 0x8e, 0x7c, 0x30, 0x67,
0xde, 0xd3, 0x41, 0x4c, 0xcd, 0x84, 0x66, 0xcd, 0xf4, 0x14, 0x56, 0xb9, 0x6a, 0xbc, 0x05, 0x0a,
0xb7, 0x50, 0x60, 0x3b, 0x44, 0xa6, 0xfc, 0x02, 0xf0, 0x2d, 0x28, 0xc4, 0xbe, 0x2b, 0xdc, 0x63,
0xae, 0x25, 0xe7, 0xb5, 0xc2, 0x51, 0xb7, 0x63, 0xa5, 0x18, 0xc6, 0xb0, 0x32, 0x63, 0x1d, 0xbe,
0x6e, 0x7e, 0xcd, 0x83, 0xd2, 0xb1, 0x5a, 0x87, 0x83, 0xd8, 0xf3, 0x47, 0xf8, 0x33, 0x82, 0x8d,
0xac, 0xdf, 0x1b, 0xef, 0x2d, 0x71, 0x33, 0x70, 0x13, 0x55, 0x5b, 0x4b, 0xdf, 0x2d, 0x5a, 0x0e,
0x9f, 0x22, 0xb8, 0x99, 0x7d, 0xe0, 0xd8, 0x5c, 0xca, 0x2d, 0x42, 0x63, 0xfb, 0x1f, 0x38, 0x4e,
0xcb, 0x99, 0xad, 0xb3, 0x0b, 0x15, 0x7d, 0xbb, 0x50, 0x73, 0xef, 0x13, 0x15, 0x9d, 0x25, 0x2a,
0xfa, 0x92, 0xa8, 0xe8, 0x7b, 0xa2, 0xa2, 0x4f, 0x3f, 0xd4, 0xdc, 0x0b, 0xf9, 0x98, 0x18, 0x92,
0xc3, 0x08, 0xfa, 0x9e, 0x91, 0x72, 0x18, 0x6e, 0x68, 0x1b, 0x92, 0xa3, 0x57, 0xe4, 0x8f, 0xc4,
0xfd, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xda, 0x25, 0x38, 0x7d, 0x85, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -571,7 +573,7 @@ func NewDRAPluginClient(cc *grpc.ClientConn) DRAPluginClient {
func (c *dRAPluginClient) NodePrepareResources(ctx context.Context, in *NodePrepareResourcesRequest, opts ...grpc.CallOption) (*NodePrepareResourcesResponse, error) {
out := new(NodePrepareResourcesResponse)
err := c.cc.Invoke(ctx, "/v1beta1.DRAPlugin/NodePrepareResources", in, out, opts...)
err := c.cc.Invoke(ctx, "/k8s.io.kubelet.pkg.apis.dra.v1beta1.DRAPlugin/NodePrepareResources", in, out, opts...)
if err != nil {
return nil, err
}
@ -580,7 +582,7 @@ func (c *dRAPluginClient) NodePrepareResources(ctx context.Context, in *NodePrep
func (c *dRAPluginClient) NodeUnprepareResources(ctx context.Context, in *NodeUnprepareResourcesRequest, opts ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) {
out := new(NodeUnprepareResourcesResponse)
err := c.cc.Invoke(ctx, "/v1beta1.DRAPlugin/NodeUnprepareResources", in, out, opts...)
err := c.cc.Invoke(ctx, "/k8s.io.kubelet.pkg.apis.dra.v1beta1.DRAPlugin/NodeUnprepareResources", in, out, opts...)
if err != nil {
return nil, err
}
@ -624,7 +626,7 @@ func _DRAPlugin_NodePrepareResources_Handler(srv interface{}, ctx context.Contex
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1beta1.DRAPlugin/NodePrepareResources",
FullMethod: "/k8s.io.kubelet.pkg.apis.dra.v1beta1.DRAPlugin/NodePrepareResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DRAPluginServer).NodePrepareResources(ctx, req.(*NodePrepareResourcesRequest))
@ -642,7 +644,7 @@ func _DRAPlugin_NodeUnprepareResources_Handler(srv interface{}, ctx context.Cont
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/v1beta1.DRAPlugin/NodeUnprepareResources",
FullMethod: "/k8s.io.kubelet.pkg.apis.dra.v1beta1.DRAPlugin/NodeUnprepareResources",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DRAPluginServer).NodeUnprepareResources(ctx, req.(*NodeUnprepareResourcesRequest))
@ -651,7 +653,7 @@ func _DRAPlugin_NodeUnprepareResources_Handler(srv interface{}, ctx context.Cont
}
var _DRAPlugin_serviceDesc = grpc.ServiceDesc{
ServiceName: "v1beta1.DRAPlugin",
ServiceName: "k8s.io.kubelet.pkg.apis.dra.v1beta1.DRAPlugin",
HandlerType: (*DRAPluginServer)(nil),
Methods: []grpc.MethodDesc{
{

View File

@ -18,7 +18,7 @@ limitations under the License.
syntax = "proto3";
package v1beta1;
package k8s.io.kubelet.pkg.apis.dra.v1beta1;
option go_package = "k8s.io/kubelet/pkg/apis/dra/v1beta1";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
@ -95,7 +95,8 @@ message NodeUnprepareResourcesRequest {
message NodeUnprepareResourcesResponse {
// The ResourceClaims for which preparation was reverted.
// The same rules as for NodePrepareResourcesResponse.claims
// apply.
// apply. In particular, all claims in the request must
// have an entry in the response, even if that entry is nil.
map<string, NodeUnprepareResourceResponse> claims = 1;
}

View File

@ -0,0 +1,188 @@
/*
Copyright 2024 The Kubernetes 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.
*/
package v1beta1
import (
context "context"
fmt "fmt"
grpc "google.golang.org/grpc"
"k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/kubelet/pkg/apis/dra/v1"
)
var (
localSchemeBuilder runtime.SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme
)
// V1ServerWrapper implements the [NodeServer] interface by wrapping a [v1.DRAPluginServer].
type V1ServerWrapper struct {
v1.DRAPluginServer
}
var _ DRAPluginServer = V1ServerWrapper{}
func (w V1ServerWrapper) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest) (*NodePrepareResourcesResponse, error) {
var convertedReq v1.NodePrepareResourcesRequest
if err := Convert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1beta1 to v1: %w", err)
}
resp, err := w.DRAPluginServer.NodePrepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp NodePrepareResourcesResponse
if err := Convert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1 to v1beta1: %w", err)
}
return &convertedResp, nil
}
func (w V1ServerWrapper) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) {
var convertedReq v1.NodeUnprepareResourcesRequest
if err := Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1beta1 to v1: %w", err)
}
resp, err := w.DRAPluginServer.NodeUnprepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp NodeUnprepareResourcesResponse
if err := Convert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1 to v1beta1: %w", err)
}
return &convertedResp, nil
}
// V1Beta1ServerWrapper implements the [v1.DRAPluginServer] interface by wrapping a [NodeServer].
type V1Beta1ServerWrapper struct {
DRAPluginServer
}
var _ v1.DRAPluginServer = V1Beta1ServerWrapper{}
func (w V1Beta1ServerWrapper) NodePrepareResources(ctx context.Context, req *v1.NodePrepareResourcesRequest) (*v1.NodePrepareResourcesResponse, error) {
var convertedReq NodePrepareResourcesRequest
if err := Convert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1 to v1beta1: %w", err)
}
resp, err := w.DRAPluginServer.NodePrepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp v1.NodePrepareResourcesResponse
if err := Convert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1beta1 to v1: %w", err)
}
return &convertedResp, nil
}
func (w V1Beta1ServerWrapper) NodeUnprepareResources(ctx context.Context, req *v1.NodeUnprepareResourcesRequest) (*v1.NodeUnprepareResourcesResponse, error) {
var convertedReq NodeUnprepareResourcesRequest
if err := Convert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1 to v1beta1: %w", err)
}
resp, err := w.DRAPluginServer.NodeUnprepareResources(ctx, &convertedReq)
if err != nil {
return nil, err
}
var convertedResp v1.NodeUnprepareResourcesResponse
if err := Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1beta1 to v1: %w", err)
}
return &convertedResp, nil
}
// V1ClientWrapper implements the [NodeClient] interface by wrapping a [v1.DRAPluginClient].
type V1ClientWrapper struct {
v1.DRAPluginClient
}
var _ DRAPluginClient = V1ClientWrapper{}
func (w V1ClientWrapper) NodePrepareResources(ctx context.Context, req *NodePrepareResourcesRequest, options ...grpc.CallOption) (*NodePrepareResourcesResponse, error) {
var convertedReq v1.NodePrepareResourcesRequest
if err := Convert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1beta1 to v1: %w", err)
}
resp, err := w.DRAPluginClient.NodePrepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp NodePrepareResourcesResponse
if err := Convert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1 to v1beta1: %w", err)
}
return &convertedResp, nil
}
func (w V1ClientWrapper) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest, options ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) {
var convertedReq v1.NodeUnprepareResourcesRequest
if err := Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1beta1 to v1: %w", err)
}
resp, err := w.DRAPluginClient.NodeUnprepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp NodeUnprepareResourcesResponse
if err := Convert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1 to v1beta1: %w", err)
}
return &convertedResp, nil
}
// V1Beta1ClientWrapper implements the [v1.DRAPluginClient] interface by wrapping a [NodeClient].
type V1Beta1ClientWrapper struct {
DRAPluginClient
}
var _ v1.DRAPluginClient = V1Beta1ClientWrapper{}
func (w V1Beta1ClientWrapper) NodePrepareResources(ctx context.Context, req *v1.NodePrepareResourcesRequest, options ...grpc.CallOption) (*v1.NodePrepareResourcesResponse, error) {
var convertedReq NodePrepareResourcesRequest
if err := Convert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesRequest from v1 to v1beta1: %w", err)
}
resp, err := w.DRAPluginClient.NodePrepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp v1.NodePrepareResourcesResponse
if err := Convert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodePrepareResourcesResponse from v1beta1 to v1: %w", err)
}
return &convertedResp, nil
}
func (w V1Beta1ClientWrapper) NodeUnprepareResources(ctx context.Context, req *v1.NodeUnprepareResourcesRequest, options ...grpc.CallOption) (*v1.NodeUnprepareResourcesResponse, error) {
var convertedReq NodeUnprepareResourcesRequest
if err := Convert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(req, &convertedReq, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesRequest from v1 to v1beta1: %w", err)
}
resp, err := w.DRAPluginClient.NodeUnprepareResources(ctx, &convertedReq, options...)
if err != nil {
return nil, err
}
var convertedResp v1.NodeUnprepareResourcesResponse
if err := Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse(resp, &convertedResp, nil); err != nil {
return nil, fmt.Errorf("internal error converting NodeUnprepareResourcesResponse from v1beta1 to v1: %w", err)
}
return &convertedResp, nil
}

View File

@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha4 contains a legacy implementation of the DRA gRPC
// Package v1beta1 contains a legacy implementation of the DRA gRPC
// interface. Support for it in kubelet is provided via conversion.
//
// +k8s:conversion-gen=k8s.io/kubelet/pkg/apis/dra/v1beta1
package v1alpha4
// +k8s:conversion-gen=k8s.io/kubelet/pkg/apis/dra/v1
package v1beta1

View File

@ -0,0 +1,352 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes 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 conversion-gen. DO NOT EDIT.
package v1beta1
import (
unsafe "unsafe"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/kubelet/pkg/apis/dra/v1"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*Claim)(nil), (*v1.Claim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_Claim_To_v1_Claim(a.(*Claim), b.(*v1.Claim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.Claim)(nil), (*Claim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_Claim_To_v1beta1_Claim(a.(*v1.Claim), b.(*Claim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*Device)(nil), (*v1.Device)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_Device_To_v1_Device(a.(*Device), b.(*v1.Device), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.Device)(nil), (*Device)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_Device_To_v1beta1_Device(a.(*v1.Device), b.(*Device), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodePrepareResourceResponse)(nil), (*v1.NodePrepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodePrepareResourceResponse_To_v1_NodePrepareResourceResponse(a.(*NodePrepareResourceResponse), b.(*v1.NodePrepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.NodePrepareResourceResponse)(nil), (*NodePrepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(a.(*v1.NodePrepareResourceResponse), b.(*NodePrepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodePrepareResourcesRequest)(nil), (*v1.NodePrepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest(a.(*NodePrepareResourcesRequest), b.(*v1.NodePrepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.NodePrepareResourcesRequest)(nil), (*NodePrepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(a.(*v1.NodePrepareResourcesRequest), b.(*NodePrepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodePrepareResourcesResponse)(nil), (*v1.NodePrepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse(a.(*NodePrepareResourcesResponse), b.(*v1.NodePrepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.NodePrepareResourcesResponse)(nil), (*NodePrepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(a.(*v1.NodePrepareResourcesResponse), b.(*NodePrepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourceResponse)(nil), (*v1.NodeUnprepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodeUnprepareResourceResponse_To_v1_NodeUnprepareResourceResponse(a.(*NodeUnprepareResourceResponse), b.(*v1.NodeUnprepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.NodeUnprepareResourceResponse)(nil), (*NodeUnprepareResourceResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(a.(*v1.NodeUnprepareResourceResponse), b.(*NodeUnprepareResourceResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourcesRequest)(nil), (*v1.NodeUnprepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest(a.(*NodeUnprepareResourcesRequest), b.(*v1.NodeUnprepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.NodeUnprepareResourcesRequest)(nil), (*NodeUnprepareResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(a.(*v1.NodeUnprepareResourcesRequest), b.(*NodeUnprepareResourcesRequest), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*NodeUnprepareResourcesResponse)(nil), (*v1.NodeUnprepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse(a.(*NodeUnprepareResourcesResponse), b.(*v1.NodeUnprepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.NodeUnprepareResourcesResponse)(nil), (*NodeUnprepareResourcesResponse)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(a.(*v1.NodeUnprepareResourcesResponse), b.(*NodeUnprepareResourcesResponse), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*UnimplementedDRAPluginServer)(nil), (*v1.UnimplementedDRAPluginServer)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_UnimplementedDRAPluginServer_To_v1_UnimplementedDRAPluginServer(a.(*UnimplementedDRAPluginServer), b.(*v1.UnimplementedDRAPluginServer), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.UnimplementedDRAPluginServer)(nil), (*UnimplementedDRAPluginServer)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_UnimplementedDRAPluginServer_To_v1beta1_UnimplementedDRAPluginServer(a.(*v1.UnimplementedDRAPluginServer), b.(*UnimplementedDRAPluginServer), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1beta1_Claim_To_v1_Claim(in *Claim, out *v1.Claim, s conversion.Scope) error {
out.Namespace = in.Namespace
out.UID = in.UID
out.Name = in.Name
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_Claim_To_v1_Claim is an autogenerated conversion function.
func Convert_v1beta1_Claim_To_v1_Claim(in *Claim, out *v1.Claim, s conversion.Scope) error {
return autoConvert_v1beta1_Claim_To_v1_Claim(in, out, s)
}
func autoConvert_v1_Claim_To_v1beta1_Claim(in *v1.Claim, out *Claim, s conversion.Scope) error {
out.Namespace = in.Namespace
out.UID = in.UID
out.Name = in.Name
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_Claim_To_v1beta1_Claim is an autogenerated conversion function.
func Convert_v1_Claim_To_v1beta1_Claim(in *v1.Claim, out *Claim, s conversion.Scope) error {
return autoConvert_v1_Claim_To_v1beta1_Claim(in, out, s)
}
func autoConvert_v1beta1_Device_To_v1_Device(in *Device, out *v1.Device, s conversion.Scope) error {
out.RequestNames = *(*[]string)(unsafe.Pointer(&in.RequestNames))
out.PoolName = in.PoolName
out.DeviceName = in.DeviceName
out.CDIDeviceIDs = *(*[]string)(unsafe.Pointer(&in.CDIDeviceIDs))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_Device_To_v1_Device is an autogenerated conversion function.
func Convert_v1beta1_Device_To_v1_Device(in *Device, out *v1.Device, s conversion.Scope) error {
return autoConvert_v1beta1_Device_To_v1_Device(in, out, s)
}
func autoConvert_v1_Device_To_v1beta1_Device(in *v1.Device, out *Device, s conversion.Scope) error {
out.RequestNames = *(*[]string)(unsafe.Pointer(&in.RequestNames))
out.PoolName = in.PoolName
out.DeviceName = in.DeviceName
out.CDIDeviceIDs = *(*[]string)(unsafe.Pointer(&in.CDIDeviceIDs))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_Device_To_v1beta1_Device is an autogenerated conversion function.
func Convert_v1_Device_To_v1beta1_Device(in *v1.Device, out *Device, s conversion.Scope) error {
return autoConvert_v1_Device_To_v1beta1_Device(in, out, s)
}
func autoConvert_v1beta1_NodePrepareResourceResponse_To_v1_NodePrepareResourceResponse(in *NodePrepareResourceResponse, out *v1.NodePrepareResourceResponse, s conversion.Scope) error {
out.Devices = *(*[]*v1.Device)(unsafe.Pointer(&in.Devices))
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodePrepareResourceResponse_To_v1_NodePrepareResourceResponse is an autogenerated conversion function.
func Convert_v1beta1_NodePrepareResourceResponse_To_v1_NodePrepareResourceResponse(in *NodePrepareResourceResponse, out *v1.NodePrepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodePrepareResourceResponse_To_v1_NodePrepareResourceResponse(in, out, s)
}
func autoConvert_v1_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in *v1.NodePrepareResourceResponse, out *NodePrepareResourceResponse, s conversion.Scope) error {
out.Devices = *(*[]*Device)(unsafe.Pointer(&in.Devices))
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse is an autogenerated conversion function.
func Convert_v1_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in *v1.NodePrepareResourceResponse, out *NodePrepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1_NodePrepareResourceResponse_To_v1beta1_NodePrepareResourceResponse(in, out, s)
}
func autoConvert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest(in *NodePrepareResourcesRequest, out *v1.NodePrepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*v1.Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest is an autogenerated conversion function.
func Convert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest(in *NodePrepareResourcesRequest, out *v1.NodePrepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1beta1_NodePrepareResourcesRequest_To_v1_NodePrepareResourcesRequest(in, out, s)
}
func autoConvert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in *v1.NodePrepareResourcesRequest, out *NodePrepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest is an autogenerated conversion function.
func Convert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in *v1.NodePrepareResourcesRequest, out *NodePrepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1_NodePrepareResourcesRequest_To_v1beta1_NodePrepareResourcesRequest(in, out, s)
}
func autoConvert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse(in *NodePrepareResourcesResponse, out *v1.NodePrepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*v1.NodePrepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse is an autogenerated conversion function.
func Convert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse(in *NodePrepareResourcesResponse, out *v1.NodePrepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodePrepareResourcesResponse_To_v1_NodePrepareResourcesResponse(in, out, s)
}
func autoConvert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in *v1.NodePrepareResourcesResponse, out *NodePrepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*NodePrepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse is an autogenerated conversion function.
func Convert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in *v1.NodePrepareResourcesResponse, out *NodePrepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1_NodePrepareResourcesResponse_To_v1beta1_NodePrepareResourcesResponse(in, out, s)
}
func autoConvert_v1beta1_NodeUnprepareResourceResponse_To_v1_NodeUnprepareResourceResponse(in *NodeUnprepareResourceResponse, out *v1.NodeUnprepareResourceResponse, s conversion.Scope) error {
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodeUnprepareResourceResponse_To_v1_NodeUnprepareResourceResponse is an autogenerated conversion function.
func Convert_v1beta1_NodeUnprepareResourceResponse_To_v1_NodeUnprepareResourceResponse(in *NodeUnprepareResourceResponse, out *v1.NodeUnprepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodeUnprepareResourceResponse_To_v1_NodeUnprepareResourceResponse(in, out, s)
}
func autoConvert_v1_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in *v1.NodeUnprepareResourceResponse, out *NodeUnprepareResourceResponse, s conversion.Scope) error {
out.Error = in.Error
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse is an autogenerated conversion function.
func Convert_v1_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in *v1.NodeUnprepareResourceResponse, out *NodeUnprepareResourceResponse, s conversion.Scope) error {
return autoConvert_v1_NodeUnprepareResourceResponse_To_v1beta1_NodeUnprepareResourceResponse(in, out, s)
}
func autoConvert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest(in *NodeUnprepareResourcesRequest, out *v1.NodeUnprepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*v1.Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest is an autogenerated conversion function.
func Convert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest(in *NodeUnprepareResourcesRequest, out *v1.NodeUnprepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1beta1_NodeUnprepareResourcesRequest_To_v1_NodeUnprepareResourcesRequest(in, out, s)
}
func autoConvert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in *v1.NodeUnprepareResourcesRequest, out *NodeUnprepareResourcesRequest, s conversion.Scope) error {
out.Claims = *(*[]*Claim)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest is an autogenerated conversion function.
func Convert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in *v1.NodeUnprepareResourcesRequest, out *NodeUnprepareResourcesRequest, s conversion.Scope) error {
return autoConvert_v1_NodeUnprepareResourcesRequest_To_v1beta1_NodeUnprepareResourcesRequest(in, out, s)
}
func autoConvert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse(in *NodeUnprepareResourcesResponse, out *v1.NodeUnprepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*v1.NodeUnprepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse is an autogenerated conversion function.
func Convert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse(in *NodeUnprepareResourcesResponse, out *v1.NodeUnprepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1beta1_NodeUnprepareResourcesResponse_To_v1_NodeUnprepareResourcesResponse(in, out, s)
}
func autoConvert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in *v1.NodeUnprepareResourcesResponse, out *NodeUnprepareResourcesResponse, s conversion.Scope) error {
out.Claims = *(*map[string]*NodeUnprepareResourceResponse)(unsafe.Pointer(&in.Claims))
out.XXX_NoUnkeyedLiteral = in.XXX_NoUnkeyedLiteral
out.XXX_sizecache = in.XXX_sizecache
return nil
}
// Convert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse is an autogenerated conversion function.
func Convert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in *v1.NodeUnprepareResourcesResponse, out *NodeUnprepareResourcesResponse, s conversion.Scope) error {
return autoConvert_v1_NodeUnprepareResourcesResponse_To_v1beta1_NodeUnprepareResourcesResponse(in, out, s)
}
func autoConvert_v1beta1_UnimplementedDRAPluginServer_To_v1_UnimplementedDRAPluginServer(in *UnimplementedDRAPluginServer, out *v1.UnimplementedDRAPluginServer, s conversion.Scope) error {
return nil
}
// Convert_v1beta1_UnimplementedDRAPluginServer_To_v1_UnimplementedDRAPluginServer is an autogenerated conversion function.
func Convert_v1beta1_UnimplementedDRAPluginServer_To_v1_UnimplementedDRAPluginServer(in *UnimplementedDRAPluginServer, out *v1.UnimplementedDRAPluginServer, s conversion.Scope) error {
return autoConvert_v1beta1_UnimplementedDRAPluginServer_To_v1_UnimplementedDRAPluginServer(in, out, s)
}
func autoConvert_v1_UnimplementedDRAPluginServer_To_v1beta1_UnimplementedDRAPluginServer(in *v1.UnimplementedDRAPluginServer, out *UnimplementedDRAPluginServer, s conversion.Scope) error {
return nil
}
// Convert_v1_UnimplementedDRAPluginServer_To_v1beta1_UnimplementedDRAPluginServer is an autogenerated conversion function.
func Convert_v1_UnimplementedDRAPluginServer_To_v1beta1_UnimplementedDRAPluginServer(in *v1.UnimplementedDRAPluginServer, out *UnimplementedDRAPluginServer, s conversion.Scope) error {
return autoConvert_v1_UnimplementedDRAPluginServer_To_v1beta1_UnimplementedDRAPluginServer(in, out, s)
}

File diff suppressed because it is too large Load Diff

View File

@ -4,16 +4,6 @@ syntax = "proto3";
package pluginregistration; // This should have been v1.
option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/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;
// PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration
message PluginInfo {
// Type of the Plugin. CSIPlugin or DevicePlugin

View File

@ -0,0 +1,181 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto
package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Registration_GetInfo_FullMethodName = "/pluginregistration.Registration/GetInfo"
Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus"
)
// RegistrationClient is the client API for Registration service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Registration is the service advertised by the Plugins.
type RegistrationClient interface {
GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error)
NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error)
}
type registrationClient struct {
cc grpc.ClientConnInterface
}
func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
return &registrationClient{cc}
}
func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PluginInfo)
err := c.cc.Invoke(ctx, Registration_GetInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegistrationStatusResponse)
err := c.cc.Invoke(ctx, Registration_NotifyRegistrationStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegistrationServer is the server API for Registration service.
// All implementations must embed UnimplementedRegistrationServer
// for forward compatibility.
//
// Registration is the service advertised by the Plugins.
type RegistrationServer interface {
GetInfo(context.Context, *InfoRequest) (*PluginInfo, error)
NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error)
mustEmbedUnimplementedRegistrationServer()
}
// UnimplementedRegistrationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRegistrationServer struct{}
func (UnimplementedRegistrationServer) GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedRegistrationServer) NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented")
}
func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {}
func (UnimplementedRegistrationServer) testEmbeddedByValue() {}
// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegistrationServer will
// result in compilation errors.
type UnsafeRegistrationServer interface {
mustEmbedUnimplementedRegistrationServer()
}
func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) {
// If the following call pancis, it indicates UnimplementedRegistrationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Registration_ServiceDesc, srv)
}
func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_GetInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegistrationStatus)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_NotifyRegistrationStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus))
}
return interceptor(ctx, in, info, handler)
}
// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Registration_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pluginregistration.Registration",
HandlerType: (*RegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetInfo",
Handler: _Registration_GetInfo_Handler,
},
{
MethodName: "NotifyRegistrationStatus",
Handler: _Registration_NotifyRegistrationStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1/api.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -4,16 +4,6 @@ syntax = "proto3";
package pluginregistration; // This should have been v1alpha1.
option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1";
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;
// PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration
message PluginInfo {
// Type of the Plugin. CSIPlugin or DevicePlugin

View File

@ -0,0 +1,181 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto
package v1alpha1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Registration_GetInfo_FullMethodName = "/pluginregistration.Registration/GetInfo"
Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus"
)
// RegistrationClient is the client API for Registration service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Registration is the service advertised by the Plugins.
type RegistrationClient interface {
GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error)
NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error)
}
type registrationClient struct {
cc grpc.ClientConnInterface
}
func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
return &registrationClient{cc}
}
func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PluginInfo)
err := c.cc.Invoke(ctx, Registration_GetInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegistrationStatusResponse)
err := c.cc.Invoke(ctx, Registration_NotifyRegistrationStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegistrationServer is the server API for Registration service.
// All implementations must embed UnimplementedRegistrationServer
// for forward compatibility.
//
// Registration is the service advertised by the Plugins.
type RegistrationServer interface {
GetInfo(context.Context, *InfoRequest) (*PluginInfo, error)
NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error)
mustEmbedUnimplementedRegistrationServer()
}
// UnimplementedRegistrationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRegistrationServer struct{}
func (UnimplementedRegistrationServer) GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedRegistrationServer) NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented")
}
func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {}
func (UnimplementedRegistrationServer) testEmbeddedByValue() {}
// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegistrationServer will
// result in compilation errors.
type UnsafeRegistrationServer interface {
mustEmbedUnimplementedRegistrationServer()
}
func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) {
// If the following call pancis, it indicates UnimplementedRegistrationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Registration_ServiceDesc, srv)
}
func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_GetInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegistrationStatus)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_NotifyRegistrationStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus))
}
return interceptor(ctx, in, info, handler)
}
// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Registration_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pluginregistration.Registration",
HandlerType: (*RegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetInfo",
Handler: _Registration_GetInfo_Handler,
},
{
MethodName: "NotifyRegistrationStatus",
Handler: _Registration_NotifyRegistrationStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1alpha1/api.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -4,16 +4,6 @@ syntax = "proto3";
package pluginregistration; // This should have been v1beta1.
option go_package = "k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1";
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;
// PluginInfo is the message sent from a plugin to the Kubelet pluginwatcher for plugin registration
message PluginInfo {
// Type of the Plugin. CSIPlugin or DevicePlugin

View File

@ -0,0 +1,181 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto
package v1beta1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Registration_GetInfo_FullMethodName = "/pluginregistration.Registration/GetInfo"
Registration_NotifyRegistrationStatus_FullMethodName = "/pluginregistration.Registration/NotifyRegistrationStatus"
)
// RegistrationClient is the client API for Registration service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Registration is the service advertised by the Plugins.
type RegistrationClient interface {
GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error)
NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error)
}
type registrationClient struct {
cc grpc.ClientConnInterface
}
func NewRegistrationClient(cc grpc.ClientConnInterface) RegistrationClient {
return &registrationClient{cc}
}
func (c *registrationClient) GetInfo(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*PluginInfo, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PluginInfo)
err := c.cc.Invoke(ctx, Registration_GetInfo_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *registrationClient) NotifyRegistrationStatus(ctx context.Context, in *RegistrationStatus, opts ...grpc.CallOption) (*RegistrationStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RegistrationStatusResponse)
err := c.cc.Invoke(ctx, Registration_NotifyRegistrationStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// RegistrationServer is the server API for Registration service.
// All implementations must embed UnimplementedRegistrationServer
// for forward compatibility.
//
// Registration is the service advertised by the Plugins.
type RegistrationServer interface {
GetInfo(context.Context, *InfoRequest) (*PluginInfo, error)
NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error)
mustEmbedUnimplementedRegistrationServer()
}
// UnimplementedRegistrationServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedRegistrationServer struct{}
func (UnimplementedRegistrationServer) GetInfo(context.Context, *InfoRequest) (*PluginInfo, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (UnimplementedRegistrationServer) NotifyRegistrationStatus(context.Context, *RegistrationStatus) (*RegistrationStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NotifyRegistrationStatus not implemented")
}
func (UnimplementedRegistrationServer) mustEmbedUnimplementedRegistrationServer() {}
func (UnimplementedRegistrationServer) testEmbeddedByValue() {}
// UnsafeRegistrationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegistrationServer will
// result in compilation errors.
type UnsafeRegistrationServer interface {
mustEmbedUnimplementedRegistrationServer()
}
func RegisterRegistrationServer(s grpc.ServiceRegistrar, srv RegistrationServer) {
// If the following call pancis, it indicates UnimplementedRegistrationServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Registration_ServiceDesc, srv)
}
func _Registration_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_GetInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).GetInfo(ctx, req.(*InfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Registration_NotifyRegistrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RegistrationStatus)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Registration_NotifyRegistrationStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RegistrationServer).NotifyRegistrationStatus(ctx, req.(*RegistrationStatus))
}
return interceptor(ctx, in, info, handler)
}
// Registration_ServiceDesc is the grpc.ServiceDesc for Registration service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Registration_ServiceDesc = grpc.ServiceDesc{
ServiceName: "pluginregistration.Registration",
HandlerType: (*RegistrationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetInfo",
Handler: _Registration_GetInfo_Handler,
},
{
MethodName: "NotifyRegistrationStatus",
Handler: _Registration_NotifyRegistrationStatus_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/pluginregistration/v1beta1/api.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -4,16 +4,6 @@ syntax = "proto3";
package v1;
option go_package = "k8s.io/kubelet/pkg/apis/podresources/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;
// PodResourcesLister is a service provided by the kubelet that provides information about the
// node resources consumed by pods and containers on the node
@ -94,7 +84,7 @@ message DynamicResource {
// of resources, then device_name will be empty and other fields will get added.
// Each device at the DRA API level may map to zero or more CDI devices.
message ClaimResource {
repeated CDIDevice cdi_devices = 1 [(gogoproto.customname) = "CDIDevices"];
repeated CDIDevice cdi_devices = 1;
string driver_name = 2;
string pool_name = 3;
string device_name = 4;

View File

@ -0,0 +1,221 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto
package v1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
PodResourcesLister_List_FullMethodName = "/v1.PodResourcesLister/List"
PodResourcesLister_GetAllocatableResources_FullMethodName = "/v1.PodResourcesLister/GetAllocatableResources"
PodResourcesLister_Get_FullMethodName = "/v1.PodResourcesLister/Get"
)
// PodResourcesListerClient is the client API for PodResourcesLister service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// PodResourcesLister is a service provided by the kubelet that provides information about the
// node resources consumed by pods and containers on the node
type PodResourcesListerClient interface {
List(ctx context.Context, in *ListPodResourcesRequest, opts ...grpc.CallOption) (*ListPodResourcesResponse, error)
GetAllocatableResources(ctx context.Context, in *AllocatableResourcesRequest, opts ...grpc.CallOption) (*AllocatableResourcesResponse, error)
Get(ctx context.Context, in *GetPodResourcesRequest, opts ...grpc.CallOption) (*GetPodResourcesResponse, error)
}
type podResourcesListerClient struct {
cc grpc.ClientConnInterface
}
func NewPodResourcesListerClient(cc grpc.ClientConnInterface) PodResourcesListerClient {
return &podResourcesListerClient{cc}
}
func (c *podResourcesListerClient) List(ctx context.Context, in *ListPodResourcesRequest, opts ...grpc.CallOption) (*ListPodResourcesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPodResourcesResponse)
err := c.cc.Invoke(ctx, PodResourcesLister_List_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *podResourcesListerClient) GetAllocatableResources(ctx context.Context, in *AllocatableResourcesRequest, opts ...grpc.CallOption) (*AllocatableResourcesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AllocatableResourcesResponse)
err := c.cc.Invoke(ctx, PodResourcesLister_GetAllocatableResources_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *podResourcesListerClient) Get(ctx context.Context, in *GetPodResourcesRequest, opts ...grpc.CallOption) (*GetPodResourcesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetPodResourcesResponse)
err := c.cc.Invoke(ctx, PodResourcesLister_Get_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PodResourcesListerServer is the server API for PodResourcesLister service.
// All implementations must embed UnimplementedPodResourcesListerServer
// for forward compatibility.
//
// PodResourcesLister is a service provided by the kubelet that provides information about the
// node resources consumed by pods and containers on the node
type PodResourcesListerServer interface {
List(context.Context, *ListPodResourcesRequest) (*ListPodResourcesResponse, error)
GetAllocatableResources(context.Context, *AllocatableResourcesRequest) (*AllocatableResourcesResponse, error)
Get(context.Context, *GetPodResourcesRequest) (*GetPodResourcesResponse, error)
mustEmbedUnimplementedPodResourcesListerServer()
}
// UnimplementedPodResourcesListerServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPodResourcesListerServer struct{}
func (UnimplementedPodResourcesListerServer) List(context.Context, *ListPodResourcesRequest) (*ListPodResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPodResourcesListerServer) GetAllocatableResources(context.Context, *AllocatableResourcesRequest) (*AllocatableResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAllocatableResources not implemented")
}
func (UnimplementedPodResourcesListerServer) Get(context.Context, *GetPodResourcesRequest) (*GetPodResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedPodResourcesListerServer) mustEmbedUnimplementedPodResourcesListerServer() {}
func (UnimplementedPodResourcesListerServer) testEmbeddedByValue() {}
// UnsafePodResourcesListerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PodResourcesListerServer will
// result in compilation errors.
type UnsafePodResourcesListerServer interface {
mustEmbedUnimplementedPodResourcesListerServer()
}
func RegisterPodResourcesListerServer(s grpc.ServiceRegistrar, srv PodResourcesListerServer) {
// If the following call pancis, it indicates UnimplementedPodResourcesListerServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PodResourcesLister_ServiceDesc, srv)
}
func _PodResourcesLister_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPodResourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PodResourcesListerServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PodResourcesLister_List_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PodResourcesListerServer).List(ctx, req.(*ListPodResourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PodResourcesLister_GetAllocatableResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AllocatableResourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PodResourcesListerServer).GetAllocatableResources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PodResourcesLister_GetAllocatableResources_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PodResourcesListerServer).GetAllocatableResources(ctx, req.(*AllocatableResourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PodResourcesLister_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPodResourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PodResourcesListerServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PodResourcesLister_Get_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PodResourcesListerServer).Get(ctx, req.(*GetPodResourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
// PodResourcesLister_ServiceDesc is the grpc.ServiceDesc for PodResourcesLister service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PodResourcesLister_ServiceDesc = grpc.ServiceDesc{
ServiceName: "v1.PodResourcesLister",
HandlerType: (*PodResourcesListerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "List",
Handler: _PodResourcesLister_List_Handler,
},
{
MethodName: "GetAllocatableResources",
Handler: _PodResourcesLister_GetAllocatableResources_Handler,
},
{
MethodName: "Get",
Handler: _PodResourcesLister_Get_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -4,17 +4,6 @@ syntax = "proto3";
package v1alpha1;
option go_package = "k8s.io/kubelet/pkg/apis/podresources/v1alpha1";
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;
// PodResourcesLister is a service provided by the kubelet that provides information about the
// node resources consumed by pods and containers on the node
service PodResourcesLister {

View File

@ -0,0 +1,145 @@
/*
Copyright The Kubernetes 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.
*/
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v4.23.4
// source: staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto
package v1alpha1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
PodResourcesLister_List_FullMethodName = "/v1alpha1.PodResourcesLister/List"
)
// PodResourcesListerClient is the client API for PodResourcesLister service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// PodResourcesLister is a service provided by the kubelet that provides information about the
// node resources consumed by pods and containers on the node
type PodResourcesListerClient interface {
List(ctx context.Context, in *ListPodResourcesRequest, opts ...grpc.CallOption) (*ListPodResourcesResponse, error)
}
type podResourcesListerClient struct {
cc grpc.ClientConnInterface
}
func NewPodResourcesListerClient(cc grpc.ClientConnInterface) PodResourcesListerClient {
return &podResourcesListerClient{cc}
}
func (c *podResourcesListerClient) List(ctx context.Context, in *ListPodResourcesRequest, opts ...grpc.CallOption) (*ListPodResourcesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListPodResourcesResponse)
err := c.cc.Invoke(ctx, PodResourcesLister_List_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// PodResourcesListerServer is the server API for PodResourcesLister service.
// All implementations must embed UnimplementedPodResourcesListerServer
// for forward compatibility.
//
// PodResourcesLister is a service provided by the kubelet that provides information about the
// node resources consumed by pods and containers on the node
type PodResourcesListerServer interface {
List(context.Context, *ListPodResourcesRequest) (*ListPodResourcesResponse, error)
mustEmbedUnimplementedPodResourcesListerServer()
}
// UnimplementedPodResourcesListerServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPodResourcesListerServer struct{}
func (UnimplementedPodResourcesListerServer) List(context.Context, *ListPodResourcesRequest) (*ListPodResourcesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedPodResourcesListerServer) mustEmbedUnimplementedPodResourcesListerServer() {}
func (UnimplementedPodResourcesListerServer) testEmbeddedByValue() {}
// UnsafePodResourcesListerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PodResourcesListerServer will
// result in compilation errors.
type UnsafePodResourcesListerServer interface {
mustEmbedUnimplementedPodResourcesListerServer()
}
func RegisterPodResourcesListerServer(s grpc.ServiceRegistrar, srv PodResourcesListerServer) {
// If the following call pancis, it indicates UnimplementedPodResourcesListerServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&PodResourcesLister_ServiceDesc, srv)
}
func _PodResourcesLister_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListPodResourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PodResourcesListerServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: PodResourcesLister_List_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PodResourcesListerServer).List(ctx, req.(*ListPodResourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
// PodResourcesLister_ServiceDesc is the grpc.ServiceDesc for PodResourcesLister service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PodResourcesLister_ServiceDesc = grpc.ServiceDesc{
ServiceName: "v1alpha1.PodResourcesLister",
HandlerType: (*PodResourcesListerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "List",
Handler: _PodResourcesLister_List_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "staging/src/k8s.io/kubelet/pkg/apis/podresources/v1alpha1/api.proto",
}

View File

@ -46,6 +46,9 @@ type NodeStats struct {
// Stats pertaining to memory (RAM) resources.
// +optional
Memory *MemoryStats `json:"memory,omitempty"`
// Stats pertaining to IO resources.
// +optional
IO *IOStats `json:"io,omitempty"`
// Stats pertaining to network resources.
// +optional
Network *NetworkStats `json:"network,omitempty"`
@ -127,6 +130,9 @@ type PodStats struct {
// Stats pertaining to memory (RAM) resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
// +optional
Memory *MemoryStats `json:"memory,omitempty"`
// Stats pertaining to IO resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
// +optional
IO *IOStats `json:"io,omitempty"`
// Stats pertaining to network resources.
// +optional
Network *NetworkStats `json:"network,omitempty"`
@ -159,6 +165,9 @@ type ContainerStats struct {
// Stats pertaining to memory (RAM) resources.
// +optional
Memory *MemoryStats `json:"memory,omitempty"`
// Stats pertaining to IO resources.
// +optional
IO *IOStats `json:"io,omitempty"`
// Metrics for Accelerators. Each Accelerator corresponds to one element in the array.
Accelerators []AcceleratorStats `json:"accelerators,omitempty"`
// Stats pertaining to container rootfs usage of filesystem resources.
@ -225,6 +234,9 @@ type CPUStats struct {
// Cumulative CPU usage (sum of all cores) since object creation.
// +optional
UsageCoreNanoSeconds *uint64 `json:"usageCoreNanoSeconds,omitempty"`
// CPU PSI stats.
// +optional
PSI *PSIStats `json:"psi,omitempty"`
}
// MemoryStats contains data about memory usage.
@ -252,6 +264,39 @@ type MemoryStats struct {
// Cumulative number of major page faults.
// +optional
MajorPageFaults *uint64 `json:"majorPageFaults,omitempty"`
// Memory PSI stats.
// +optional
PSI *PSIStats `json:"psi,omitempty"`
}
// IOStats contains data about IO usage.
type IOStats struct {
// The time at which these stats were updated.
Time metav1.Time `json:"time"`
// IO PSI stats.
// +optional
PSI *PSIStats `json:"psi,omitempty"`
}
// PSI statistics for an individual resource.
type PSIStats struct {
// PSI data for all tasks in the cgroup.
Full PSIData `json:"full"`
// PSI data for some tasks in the cgroup.
Some PSIData `json:"some"`
}
// PSI data for an individual resource.
type PSIData struct {
// Total time duration for tasks in the cgroup have waited due to congestion.
// Unit: nanoseconds.
Total uint64 `json:"total"`
// The average (in %) tasks have waited due to congestion over a 10 second window.
Avg10 float64 `json:"avg10"`
// The average (in %) tasks have waited due to congestion over a 60 second window.
Avg60 float64 `json:"avg60"`
// The average (in %) tasks have waited due to congestion over a 300 second window.
Avg300 float64 `json:"avg300"`
}
// SwapStats contains data about memory usage

View File

@ -140,7 +140,7 @@ func (h *httpStreamHandler) getStreamPair(requestID string) (*httpStreamPair, bo
func (h *httpStreamHandler) monitorStreamPair(p *httpStreamPair, timeout <-chan time.Time) {
select {
case <-timeout:
err := fmt.Errorf("(conn=%v, request=%s) timed out waiting for streams", h.conn, p.requestID)
err := fmt.Errorf("(conn=%p, request=%s) timed out waiting for streams", h.conn, p.requestID)
utilruntime.HandleError(err)
p.printError(err.Error())
case <-p.complete:

View File

@ -15,4 +15,4 @@ limitations under the License.
*/
// Package remotecommand contains functions related to executing commands in and attaching to pods.
package remotecommand // import "k8s.io/kubelet/pkg/cri/streaming/remotecommand"
package remotecommand

View File

@ -17,6 +17,7 @@ limitations under the License.
package remotecommand
import (
"context"
"encoding/json"
"errors"
"fmt"
@ -116,7 +117,7 @@ func createStreams(req *http.Request, w http.ResponseWriter, opts *Options, supp
if ctx.resizeStream != nil {
ctx.resizeChan = make(chan remotecommand.TerminalSize)
go handleResizeEvents(ctx.resizeStream, ctx.resizeChan)
go handleResizeEvents(req.Context(), ctx.resizeStream, ctx.resizeChan)
}
return ctx, true
@ -409,7 +410,7 @@ WaitForStreams:
// supportsTerminalResizing returns false because v1ProtocolHandler doesn't support it.
func (*v1ProtocolHandler) supportsTerminalResizing() bool { return false }
func handleResizeEvents(stream io.Reader, channel chan<- remotecommand.TerminalSize) {
func handleResizeEvents(reqctx context.Context, stream io.Reader, channel chan<- remotecommand.TerminalSize) {
defer runtime.HandleCrash()
defer close(channel)
@ -419,7 +420,12 @@ func handleResizeEvents(stream io.Reader, channel chan<- remotecommand.TerminalS
if err := decoder.Decode(&size); err != nil {
break
}
channel <- size
select {
case channel <- size:
case <-reqctx.Done():
// To prevent go routine leak.
return
}
}
}

View File

@ -0,0 +1,82 @@
/*
Copyright 2025 The Kubernetes 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.
*/
package remotecommand
import (
"bytes"
"context"
"encoding/json"
"io"
"testing"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
"k8s.io/client-go/tools/remotecommand"
)
func TestHandleResizeEvents(t *testing.T) {
var testTerminalSize remotecommand.TerminalSize
rawTerminalSize, err := json.Marshal(&testTerminalSize)
require.NoError(t, err)
testCases := []struct {
name string
resizeStreamData []byte
cancelContext bool
readFromChannel bool
}{
{
name: "data attempted to be sent on the channel; channel not read; context canceled",
resizeStreamData: rawTerminalSize,
cancelContext: true,
},
{
name: "data attempted to be sent on the channel; channel read; context not canceled",
resizeStreamData: rawTerminalSize,
readFromChannel: true,
},
{
name: "no data attempted to be sent on the channel; context canceled",
cancelContext: true,
},
{
name: "no data attempted to be sent on the channel; context not canceled",
},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
connCtx := connectionContext{
resizeStream: io.NopCloser(bytes.NewReader(testCase.resizeStreamData)),
resizeChan: make(chan remotecommand.TerminalSize),
}
go handleResizeEvents(ctx, connCtx.resizeStream, connCtx.resizeChan)
if testCase.readFromChannel {
gotTerminalSize := <-connCtx.resizeChan
require.Equal(t, gotTerminalSize, testTerminalSize)
}
if testCase.cancelContext {
cancel()
}
goleak.VerifyNone(t)
cancel()
})
}
}

View File

@ -348,7 +348,10 @@ func runRemoteCommandTest(t *testing.T, commandType string) {
go func() {
defer wg.Done()
exec, err := remotecommand.NewSPDYExecutor(&restclient.Config{}, "POST", reqURL)
require.NoError(t, err)
if err != nil {
t.Errorf("unexpected error %v", err)
return
}
opts := remotecommand.StreamOptions{
Stdin: stdinR,
@ -356,7 +359,9 @@ func runRemoteCommandTest(t *testing.T, commandType string) {
Stderr: stderrW,
Tty: false,
}
require.NoError(t, exec.StreamWithContext(context.Background(), opts))
if err = exec.StreamWithContext(context.Background(), opts); err != nil {
t.Errorf("unexpected error %v", err)
}
}()
go func() {