mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
DRA: get rid of unneeded loops over pod containers
This commit is contained in:
parent
37937bb227
commit
1aeec10efb
@ -66,9 +66,6 @@ func NewManagerImpl(kubeClient clientset.Interface, stateFileDirectory string) (
|
||||
// for each new resource requirement, process their responses and update the cached
|
||||
// containerResources on success.
|
||||
func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error {
|
||||
// Process resources for each resource claim referenced by container
|
||||
for _, container := range append(pod.Spec.InitContainers, pod.Spec.Containers...) {
|
||||
for range container.Resources.Claims {
|
||||
for i := range pod.Spec.ResourceClaims {
|
||||
claimName := resourceclaim.Name(pod, &pod.Spec.ResourceClaims[i])
|
||||
klog.V(3).InfoS("Processing resource", "claim", claimName, "pod", pod.Name)
|
||||
@ -173,8 +170,6 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Checkpoint to capture all of the previous addPodReference() calls.
|
||||
err := m.cache.syncToCheckpoint()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user