mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #128331 from ArangoGutierrez/devel/driverresources.deepcopy
DRA: generate deepcopy for DriverResources
This commit is contained in:
commit
8b063a6a08
@ -73,12 +73,16 @@ type Controller struct {
|
|||||||
resources *DriverResources
|
resources *DriverResources
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// +k8s:deepcopy-gen=true
|
||||||
|
|
||||||
// DriverResources is a complete description of all resources synchronized by the controller.
|
// DriverResources is a complete description of all resources synchronized by the controller.
|
||||||
type DriverResources struct {
|
type DriverResources struct {
|
||||||
// Each driver may manage different resource pools.
|
// Each driver may manage different resource pools.
|
||||||
Pools map[string]Pool
|
Pools map[string]Pool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// +k8s:deepcopy-gen=true
|
||||||
|
|
||||||
// Pool is the collection of devices belonging to the same pool.
|
// Pool is the collection of devices belonging to the same pool.
|
||||||
type Pool struct {
|
type Pool struct {
|
||||||
// NodeSelector may be different for each pool. Must not get set together
|
// NodeSelector may be different for each pool. Must not get set together
|
||||||
@ -94,6 +98,8 @@ type Pool struct {
|
|||||||
Devices []resourceapi.Device
|
Devices []resourceapi.Device
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// +k8s:deepcopy-gen=true
|
||||||
|
|
||||||
// Owner is the resource which is meant to be listed as owner of the resource slices.
|
// Owner is the resource which is meant to be listed as owner of the resource slices.
|
||||||
// For a node the UID may be left blank. The controller will look it up automatically.
|
// For a node the UID may be left blank. The controller will look it up automatically.
|
||||||
type Owner struct {
|
type Owner struct {
|
||||||
|
94
staging/src/k8s.io/dynamic-resource-allocation/resourceslice/zz_generated.deepcopy.go
generated
Normal file
94
staging/src/k8s.io/dynamic-resource-allocation/resourceslice/zz_generated.deepcopy.go
generated
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
//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 deepcopy-gen. DO NOT EDIT.
|
||||||
|
|
||||||
|
package resourceslice
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
v1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *DriverResources) DeepCopyInto(out *DriverResources) {
|
||||||
|
*out = *in
|
||||||
|
if in.Pools != nil {
|
||||||
|
in, out := &in.Pools, &out.Pools
|
||||||
|
*out = make(map[string]Pool, len(*in))
|
||||||
|
for key, val := range *in {
|
||||||
|
(*out)[key] = *val.DeepCopy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverResources.
|
||||||
|
func (in *DriverResources) DeepCopy() *DriverResources {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(DriverResources)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *Owner) DeepCopyInto(out *Owner) {
|
||||||
|
*out = *in
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Owner.
|
||||||
|
func (in *Owner) DeepCopy() *Owner {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(Owner)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
|
func (in *Pool) DeepCopyInto(out *Pool) {
|
||||||
|
*out = *in
|
||||||
|
if in.NodeSelector != nil {
|
||||||
|
in, out := &in.NodeSelector, &out.NodeSelector
|
||||||
|
*out = new(v1.NodeSelector)
|
||||||
|
(*in).DeepCopyInto(*out)
|
||||||
|
}
|
||||||
|
if in.Devices != nil {
|
||||||
|
in, out := &in.Devices, &out.Devices
|
||||||
|
*out = make([]v1alpha3.Device, len(*in))
|
||||||
|
for i := range *in {
|
||||||
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pool.
|
||||||
|
func (in *Pool) DeepCopy() *Pool {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
out := new(Pool)
|
||||||
|
in.DeepCopyInto(out)
|
||||||
|
return out
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user