Change podNamespacer API

This commit is contained in:
Wojciech Tyczynski
2016-08-17 16:16:01 +02:00
parent c0e79d8da7
commit 331083727f
13 changed files with 73 additions and 58 deletions

View File

@@ -683,12 +683,11 @@ func maxContainerRestarts(pod *api.Pod) int {
}
// FilterActivePods returns pods that have not terminated.
func FilterActivePods(pods []api.Pod) []*api.Pod {
func FilterActivePods(pods []*api.Pod) []*api.Pod {
var result []*api.Pod
for i := range pods {
p := pods[i]
if IsPodActive(p) {
result = append(result, &p)
for _, p := range pods {
if IsPodActive(*p) {
result = append(result, p)
} else {
glog.V(4).Infof("Ignoring inactive pod %v/%v in state %v, deletion time %v",
p.Namespace, p.Name, p.Status.Phase, p.DeletionTimestamp)