Ensure pods aren't created if they are in a failed state

This commit is contained in:
Erik St. Martin
2017-12-05 11:50:42 -06:00
parent 3a0b627892
commit 80fab396c3

View File

@@ -245,7 +245,7 @@ func (s *Server) reconcile() {
log.Printf("Error retrieving pod '%s' from provider: %s\n", pod.Name, err)
}
if pod.DeletionTimestamp == nil && p == nil {
if pod.DeletionTimestamp == nil && pod.Status.Phase != corev1.PodFailed && p == nil {
if err := s.createPod(pod); err != nil {
log.Printf("Error creating pod '%s': %s\n", pod.Name, err)
continue