mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Delete duplicate resource.Quantity.Copy()
This commit is contained in:
@@ -133,14 +133,14 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
q.Limits = make(core.ResourceList)
|
||||
q.Requests = make(core.ResourceList)
|
||||
cpuLimit := randomQuantity()
|
||||
q.Limits[core.ResourceCPU] = *cpuLimit.Copy()
|
||||
q.Requests[core.ResourceCPU] = *cpuLimit.Copy()
|
||||
q.Limits[core.ResourceCPU] = cpuLimit.DeepCopy()
|
||||
q.Requests[core.ResourceCPU] = cpuLimit.DeepCopy()
|
||||
memoryLimit := randomQuantity()
|
||||
q.Limits[core.ResourceMemory] = *memoryLimit.Copy()
|
||||
q.Requests[core.ResourceMemory] = *memoryLimit.Copy()
|
||||
q.Limits[core.ResourceMemory] = memoryLimit.DeepCopy()
|
||||
q.Requests[core.ResourceMemory] = memoryLimit.DeepCopy()
|
||||
storageLimit := randomQuantity()
|
||||
q.Limits[core.ResourceStorage] = *storageLimit.Copy()
|
||||
q.Requests[core.ResourceStorage] = *storageLimit.Copy()
|
||||
q.Limits[core.ResourceStorage] = storageLimit.DeepCopy()
|
||||
q.Requests[core.ResourceStorage] = storageLimit.DeepCopy()
|
||||
},
|
||||
func(q *core.LimitRangeItem, c fuzz.Continue) {
|
||||
var cpuLimit resource.Quantity
|
||||
@@ -148,16 +148,16 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
|
||||
q.Type = core.LimitTypeContainer
|
||||
q.Default = make(core.ResourceList)
|
||||
q.Default[core.ResourceCPU] = *(cpuLimit.Copy())
|
||||
q.Default[core.ResourceCPU] = cpuLimit.DeepCopy()
|
||||
|
||||
q.DefaultRequest = make(core.ResourceList)
|
||||
q.DefaultRequest[core.ResourceCPU] = *(cpuLimit.Copy())
|
||||
q.DefaultRequest[core.ResourceCPU] = cpuLimit.DeepCopy()
|
||||
|
||||
q.Max = make(core.ResourceList)
|
||||
q.Max[core.ResourceCPU] = *(cpuLimit.Copy())
|
||||
q.Max[core.ResourceCPU] = cpuLimit.DeepCopy()
|
||||
|
||||
q.Min = make(core.ResourceList)
|
||||
q.Min[core.ResourceCPU] = *(cpuLimit.Copy())
|
||||
q.Min[core.ResourceCPU] = cpuLimit.DeepCopy()
|
||||
|
||||
q.MaxLimitRequestRatio = make(core.ResourceList)
|
||||
q.MaxLimitRequestRatio[core.ResourceCPU] = resource.MustParse("10")
|
||||
|
||||
Reference in New Issue
Block a user