mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-01 12:56:04 +00:00
fix lint loop iterator problem
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -61,12 +61,12 @@ func IsRunningInNode(ctx context.Context, namespace string, nodeName string, pod
|
||||
return errors.Wrap(err, "failed to list daemonset pods")
|
||||
}
|
||||
|
||||
for _, pod := range pods.Items {
|
||||
if kube.IsPodRunning(&pod) != nil { //nolint
|
||||
for i := range pods.Items {
|
||||
if kube.IsPodRunning(&pods.Items[i]) != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if pod.Spec.NodeName == nodeName {
|
||||
if pods.Items[i].Spec.NodeName == nodeName {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user