Skip to content

Commit

Permalink
Merge pull request #123932 from pohly/dra-api-resource-model-rename
Browse files Browse the repository at this point in the history
dra api: NodeResourceModel -> ResourceModel

Kubernetes-commit: d194e6d06c4f1004cebe00f2c539a564f77276ec
  • Loading branch information
k8s-publishing-bot committed Mar 27, 2024
2 parents b048bd8 + f06d24a commit 35ca1f4
Show file tree
Hide file tree
Showing 8 changed files with 392 additions and 394 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go 1.22.0
require (
github.com/gogo/protobuf v1.3.2
github.com/stretchr/testify v1.8.4
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
k8s.io/apimachinery v0.0.0-20240307160843-0407311be590
)

require (
Expand Down Expand Up @@ -35,5 +35,3 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
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/apimachinery v0.0.0-20240307171817-d82afe1e363a h1:0OAuWcxW23YggVeW/f7sDWuEF2U4HDVSN+CQNMxwimI=
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a/go.mod h1:wEJvNDlfxMRaMhyv38SIHIEC9hah/xuzqUUhxIyUv7Y=
k8s.io/apimachinery v0.0.0-20240307160843-0407311be590 h1:YFg0j+PVfNLayHtZ3gdTeW12q7HECwhvZm9fWZpXyXo=
k8s.io/apimachinery v0.0.0-20240307160843-0407311be590/go.mod h1:wEJvNDlfxMRaMhyv38SIHIEC9hah/xuzqUUhxIyUv7Y=
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
Expand Down
688 changes: 344 additions & 344 deletions resource/v1alpha2/generated.pb.go

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions resource/v1alpha2/generated.proto

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

2 changes: 1 addition & 1 deletion resource/v1alpha2/namedresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
)

// NamedResourcesResources is used in NodeResourceModel.
// NamedResourcesResources is used in ResourceModel.
type NamedResourcesResources struct {
// The list of all individual resources instances currently available.
//
Expand Down
6 changes: 3 additions & 3 deletions resource/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,11 +554,11 @@ type ResourceSlice struct {
// objects with a certain driver name.
DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"`

NodeResourceModel `json:",inline" protobuf:"bytes,4,name=nodeResourceModel"`
ResourceModel `json:",inline" protobuf:"bytes,4,name=resourceModel"`
}

// NodeResourceModel must have one and only one field set.
type NodeResourceModel struct {
// ResourceModel must have one and only one field set.
type ResourceModel struct {
// NamedResources describes available resources using the named resources model.
//
// +optional
Expand Down
18 changes: 9 additions & 9 deletions resource/v1alpha2/types_swagger_doc_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ func (DriverRequests) SwaggerDoc() map[string]string {
return map_DriverRequests
}

var map_NodeResourceModel = map[string]string{
"": "NodeResourceModel must have one and only one field set.",
"namedResources": "NamedResources describes available resources using the named resources model.",
}

func (NodeResourceModel) SwaggerDoc() map[string]string {
return map_NodeResourceModel
}

var map_PodSchedulingContext = map[string]string{
"": "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.",
"metadata": "Standard object metadata",
Expand Down Expand Up @@ -331,6 +322,15 @@ func (ResourceHandle) SwaggerDoc() map[string]string {
return map_ResourceHandle
}

var map_ResourceModel = map[string]string{
"": "ResourceModel must have one and only one field set.",
"namedResources": "NamedResources describes available resources using the named resources model.",
}

func (ResourceModel) SwaggerDoc() map[string]string {
return map_ResourceModel
}

var map_ResourceRequest = map[string]string{
"": "ResourceRequest is a request for resources from one particular driver.",
"vendorParameters": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.",
Expand Down
44 changes: 22 additions & 22 deletions resource/v1alpha2/zz_generated.deepcopy.go

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

0 comments on commit 35ca1f4

Please sign in to comment.