PetSet doesn't scale if it finds unready pets

This commit is contained in:
Prashanth Balasubramanian
2016-05-06 13:15:23 -07:00
parent 6f288b31cf
commit 377957a173
2 changed files with 4 additions and 1 deletions

View File

@@ -253,6 +253,9 @@ func (f *fakePetClient) setHealthy(index int) error {
}
f.pets[index].pod.Status.Phase = api.PodRunning
f.pets[index].pod.Annotations[PetSetInitAnnotation] = "true"
f.pets[index].pod.Status.Conditions = []api.PodCondition{
{Type: api.PodReady, Status: api.ConditionTrue},
}
return nil
}

View File

@@ -299,7 +299,7 @@ func (d *defaultPetHealthChecker) isHealthy(pod *api.Pod) bool {
if err != nil {
return false
}
return b
return b && api.IsPodReady(pod)
}
// isDying returns true if the pod has a non-nil deletion timestamp. Since the