Skip to content

Commit

Permalink
DRA kubelet: use unique protobuf package name
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pohly authored and k8s-publishing-bot committed Nov 27, 2024
1 parent 3b14f64 commit de4c476
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 71 deletions.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ require (
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
k8s.io/api v0.0.0-20241127162655-f8e5e36c84f1
k8s.io/apimachinery v0.0.0-20240920213627-16af2ff33fbf
k8s.io/apiserver v0.0.0-20241127180111-1f546eec45b7
k8s.io/client-go v0.0.0-20241127164845-55d23e26d5ef
k8s.io/component-base v0.0.0-20241127171706-ad7c5246b8a7
k8s.io/cri-api v0.0.0-20241127193822-354c4101c08d
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
)
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,18 @@ 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-20241127162655-f8e5e36c84f1 h1:MTqd8524+MzN0Kxt42qAvh/aUYC18yz1BJUmfWADaDg=
k8s.io/api v0.0.0-20241127162655-f8e5e36c84f1/go.mod h1:qs155+gTdM43TXy/cV8a8yOjDeNR8kGJc82AraJrh/c=
k8s.io/apimachinery v0.0.0-20240920213627-16af2ff33fbf h1:ZRwu8YHh3bFbQU4NRvHB6fiovWLBouxY86wIcLd7sBA=
k8s.io/apimachinery v0.0.0-20240920213627-16af2ff33fbf/go.mod h1:HqhdaJUgQqky29T1V0o2yFkt/pZqLFIDyn9Zi/8rxoY=
k8s.io/apiserver v0.0.0-20241127180111-1f546eec45b7 h1:UcYzMKvsoOhbJdNGEhLQ0pTLEGLwtaip8YsXcCniR1Y=
k8s.io/apiserver v0.0.0-20241127180111-1f546eec45b7/go.mod h1:Q42GrBVZddFWpk16zQtPWJ/VGUtQl1YClqzq/75O69Y=
k8s.io/client-go v0.0.0-20241127164845-55d23e26d5ef h1:vruVg7dEUvIzst/cCIMyxHj6Xh2vTpaVH9wrONW6SM4=
k8s.io/client-go v0.0.0-20241127164845-55d23e26d5ef/go.mod h1:DtqcGpVY2YUJlRhkIBvTwD/kYAIV58FrFHjjLlNR4VM=
k8s.io/component-base v0.0.0-20241127171706-ad7c5246b8a7 h1:MIGdzfvdywTFOvy1YbN1gaqVRaLdyKJwZj2mMZFvFeI=
k8s.io/component-base v0.0.0-20241127171706-ad7c5246b8a7/go.mod h1:22TS+1cPXmvfgwlt5uwSfAMZDEIKFZWq/T/6uh2Ado4=
k8s.io/cri-api v0.0.0-20241127193822-354c4101c08d h1:Fhs0/EgkfmSyFhsERsVTYODizLe7v/86LsiwYgmBqJE=
k8s.io/cri-api v0.0.0-20241127193822-354c4101c08d/go.mod h1:5WOp91NVV2mzTQRp732avavhFFItsWsQy8jO7DPv8d8=
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=
Expand Down
105 changes: 53 additions & 52 deletions pkg/apis/dra/v1beta1/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/dra/v1beta1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit de4c476

Please sign in to comment.