Fix a bug in e2epod function
This commit is contained in:
@@ -533,8 +533,9 @@ func GetPodsInNamespace(c clientset.Interface, ns string, ignoreLabels map[strin
|
||||
return []*v1.Pod{}, err
|
||||
}
|
||||
ignoreSelector := labels.SelectorFromSet(ignoreLabels)
|
||||
filtered := []*v1.Pod{}
|
||||
for _, p := range pods.Items {
|
||||
var filtered []*v1.Pod
|
||||
for i := range pods.Items {
|
||||
p := pods.Items[i]
|
||||
if len(ignoreLabels) != 0 && ignoreSelector.Matches(labels.Set(p.Labels)) {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user