Skip to content

Commit 35ca1f4

Browse files
Merge pull request #123932 from pohly/dra-api-resource-model-rename
dra api: NodeResourceModel -> ResourceModel Kubernetes-commit: d194e6d06c4f1004cebe00f2c539a564f77276ec
2 parents b048bd8 + f06d24a commit 35ca1f4

8 files changed

+392
-394
lines changed

go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go 1.22.0
77
require (
88
github.com/gogo/protobuf v1.3.2
99
github.com/stretchr/testify v1.8.4
10-
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
10+
k8s.io/apimachinery v0.0.0-20240307160843-0407311be590
1111
)
1212

1313
require (
@@ -35,5 +35,3 @@ require (
3535
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
3636
sigs.k8s.io/yaml v1.3.0 // indirect
3737
)
38-
39-
replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
8383
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
8484
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
8585
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
86-
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a h1:0OAuWcxW23YggVeW/f7sDWuEF2U4HDVSN+CQNMxwimI=
87-
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a/go.mod h1:wEJvNDlfxMRaMhyv38SIHIEC9hah/xuzqUUhxIyUv7Y=
86+
k8s.io/apimachinery v0.0.0-20240307160843-0407311be590 h1:YFg0j+PVfNLayHtZ3gdTeW12q7HECwhvZm9fWZpXyXo=
87+
k8s.io/apimachinery v0.0.0-20240307160843-0407311be590/go.mod h1:wEJvNDlfxMRaMhyv38SIHIEC9hah/xuzqUUhxIyUv7Y=
8888
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
8989
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
9090
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=

resource/v1alpha2/generated.pb.go

+344-344
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resource/v1alpha2/generated.proto

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resource/v1alpha2/namedresources.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"k8s.io/apimachinery/pkg/api/resource"
2121
)
2222

23-
// NamedResourcesResources is used in NodeResourceModel.
23+
// NamedResourcesResources is used in ResourceModel.
2424
type NamedResourcesResources struct {
2525
// The list of all individual resources instances currently available.
2626
//

resource/v1alpha2/types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -554,11 +554,11 @@ type ResourceSlice struct {
554554
// objects with a certain driver name.
555555
DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"`
556556

557-
NodeResourceModel `json:",inline" protobuf:"bytes,4,name=nodeResourceModel"`
557+
ResourceModel `json:",inline" protobuf:"bytes,4,name=resourceModel"`
558558
}
559559

560-
// NodeResourceModel must have one and only one field set.
561-
type NodeResourceModel struct {
560+
// ResourceModel must have one and only one field set.
561+
type ResourceModel struct {
562562
// NamedResources describes available resources using the named resources model.
563563
//
564564
// +optional

resource/v1alpha2/types_swagger_doc_generated.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ func (DriverRequests) SwaggerDoc() map[string]string {
6767
return map_DriverRequests
6868
}
6969

70-
var map_NodeResourceModel = map[string]string{
71-
"": "NodeResourceModel must have one and only one field set.",
72-
"namedResources": "NamedResources describes available resources using the named resources model.",
73-
}
74-
75-
func (NodeResourceModel) SwaggerDoc() map[string]string {
76-
return map_NodeResourceModel
77-
}
78-
7970
var map_PodSchedulingContext = map[string]string{
8071
"": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
8172
"metadata": "Standard object metadata",
@@ -331,6 +322,15 @@ func (ResourceHandle) SwaggerDoc() map[string]string {
331322
return map_ResourceHandle
332323
}
333324

325+
var map_ResourceModel = map[string]string{
326+
"": "ResourceModel must have one and only one field set.",
327+
"namedResources": "NamedResources describes available resources using the named resources model.",
328+
}
329+
330+
func (ResourceModel) SwaggerDoc() map[string]string {
331+
return map_ResourceModel
332+
}
333+
334334
var map_ResourceRequest = map[string]string{
335335
"": "ResourceRequest is a request for resources from one particular driver.",
336336
"vendorParameters": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.",

resource/v1alpha2/zz_generated.deepcopy.go

+22-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)