refactor: use FilterActivePods instead in replicaset controller

parent c90bf8d8
...@@ -595,12 +595,7 @@ func (rsc *ReplicaSetController) syncReplicaSet(key string) error { ...@@ -595,12 +595,7 @@ func (rsc *ReplicaSetController) syncReplicaSet(key string) error {
return err return err
} }
// Ignore inactive pods. // Ignore inactive pods.
var filteredPods []*v1.Pod filteredPods := controller.FilterActivePods(allPods)
for _, pod := range allPods {
if controller.IsPodActive(pod) {
filteredPods = append(filteredPods, pod)
}
}
// NOTE: filteredPods are pointing to objects from cache - if you need to // NOTE: filteredPods are pointing to objects from cache - if you need to
// modify them, you need to copy it first. // modify them, you need to copy it first.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment