mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
pkg/api: simplify deepcopy calls
This commit is contained in:
@@ -123,15 +123,7 @@ func ExtractResourceValueByContainerNameAndNodeAllocatable(copier deepCopier, fs
|
||||
return "", err
|
||||
}
|
||||
|
||||
containerCopy, err := copier.DeepCopy(realContainer)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to perform a deep copy of container object: %v", err)
|
||||
}
|
||||
|
||||
container, ok := containerCopy.(*v1.Container)
|
||||
if !ok {
|
||||
return "", fmt.Errorf("unexpected type returned from deep copy of container object")
|
||||
}
|
||||
container := realContainer.DeepCopy()
|
||||
|
||||
MergeContainerResourceLimits(container, nodeAllocatable)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user