diff --git a/pkg/controller/petset/fakes.go b/pkg/controller/petset/fakes.go index ddbaff1b073..e7ce9d05455 100644 --- a/pkg/controller/petset/fakes.go +++ b/pkg/controller/petset/fakes.go @@ -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 } diff --git a/pkg/controller/petset/pet.go b/pkg/controller/petset/pet.go index 685e3d6e031..aa3534c442b 100644 --- a/pkg/controller/petset/pet.go +++ b/pkg/controller/petset/pet.go @@ -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