Merge pull request #123932 from pohly/dra-api-resource-model-rename

dra api: NodeResourceModel -> ResourceModel

Kubernetes-commit: d194e6d06c4f1004cebe00f2c539a564f77276ec
This commit is contained in:
Kubernetes Publisher 2024-03-14 12:11:35 -07:00
commit eea636f8f4
5 changed files with 17 additions and 17 deletions

View File

@ -18,22 +18,22 @@ limitations under the License.
package v1alpha2
// NodeResourceModelApplyConfiguration represents an declarative configuration of the NodeResourceModel type for use
// ResourceModelApplyConfiguration represents an declarative configuration of the ResourceModel type for use
// with apply.
type NodeResourceModelApplyConfiguration struct {
type ResourceModelApplyConfiguration struct {
NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"`
}
// NodeResourceModelApplyConfiguration constructs an declarative configuration of the NodeResourceModel type for use with
// ResourceModelApplyConfiguration constructs an declarative configuration of the ResourceModel type for use with
// apply.
func NodeResourceModel() *NodeResourceModelApplyConfiguration {
return &NodeResourceModelApplyConfiguration{}
func ResourceModel() *ResourceModelApplyConfiguration {
return &ResourceModelApplyConfiguration{}
}
// WithNamedResources sets the NamedResources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NamedResources field is set to the value of the last call.
func (b *NodeResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *NodeResourceModelApplyConfiguration {
func (b *ResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceModelApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -34,7 +34,7 @@ type ResourceSliceApplyConfiguration struct {
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
NodeName *string `json:"nodeName,omitempty"`
DriverName *string `json:"driverName,omitempty"`
NodeResourceModelApplyConfiguration `json:",inline"`
ResourceModelApplyConfiguration `json:",inline"`
}
// ResourceSlice constructs an declarative configuration of the ResourceSlice type for use with

View File

@ -1559,8 +1559,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha2.NamedResourcesResourcesApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"):
return &resourcev1alpha2.NamedResourcesStringSliceApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("NodeResourceModel"):
return &resourcev1alpha2.NodeResourceModelApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext"):
return &resourcev1alpha2.PodSchedulingContextApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"):
@ -1597,6 +1595,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha2.ResourceFilterModelApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("ResourceHandle"):
return &resourcev1alpha2.ResourceHandleApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("ResourceModel"):
return &resourcev1alpha2.ResourceModelApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequest"):
return &resourcev1alpha2.ResourceRequestApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequestModel"):

4
go.mod
View File

@ -24,7 +24,7 @@ require (
golang.org/x/term v0.17.0
golang.org/x/time v0.3.0
google.golang.org/protobuf v1.33.0
k8s.io/api v0.0.0-20240314180239-b048bd80bc44
k8s.io/api v0.0.0-20240314205423-d1659ebfc7f3
k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
k8s.io/klog/v2 v2.120.1
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
@ -61,6 +61,6 @@ require (
)
replace (
k8s.io/api => k8s.io/api v0.0.0-20240314180239-b048bd80bc44
k8s.io/api => k8s.io/api v0.0.0-20240314205423-d1659ebfc7f3
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20240307171817-d82afe1e363a
)

4
go.sum
View File

@ -153,8 +153,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
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-20240314180239-b048bd80bc44 h1:e34PNgaXBr5zGyVZObwPJq4DCSrUYwbv+h/35dIMEI4=
k8s.io/api v0.0.0-20240314180239-b048bd80bc44/go.mod h1:RzL8aPQw9ZdVXCdY+Iz3AXnVX+jFyQNqcmzmS+2/Ur0=
k8s.io/api v0.0.0-20240314205423-d1659ebfc7f3 h1:qOTA6AgJrLhETfhNJHy4J7tSgOXdIC7hts3Sr5Gesbk=
k8s.io/api v0.0.0-20240314205423-d1659ebfc7f3/go.mod h1:RzL8aPQw9ZdVXCdY+Iz3AXnVX+jFyQNqcmzmS+2/Ur0=
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/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=