Merge pull request #74122 from draveness/feature/refactor-filter-active-pods

refactor: use FilterActivePods instead in replicaset controller
pull/564/head
Kubernetes Prow Robot 2019-02-27 15:54:25 -08:00 committed by GitHub
commit bf2c9ccec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -595,12 +595,7 @@ func (rsc *ReplicaSetController) syncReplicaSet(key string) error {
return err
}
// Ignore inactive pods.
var filteredPods []*v1.Pod
for _, pod := range allPods {
if controller.IsPodActive(pod) {
filteredPods = append(filteredPods, pod)
}
}
filteredPods := controller.FilterActivePods(allPods)
// NOTE: filteredPods are pointing to objects from cache - if you need to
// modify them, you need to copy it first.