From 1928d0733725cfbd0952ab2472cfc0f19f616c77 Mon Sep 17 00:00:00 2001 From: Casey Davenport Date: Fri, 10 Apr 2026 20:11:52 -0700 Subject: [PATCH] Delay marking degraded due to readiness for 60s --- pkg/controller/status/status.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/controller/status/status.go b/pkg/controller/status/status.go index e7270a20a7..37bcb25543 100644 --- a/pkg/controller/status/status.go +++ b/pkg/controller/status/status.go @@ -704,10 +704,12 @@ func (m *statusManager) podsFailing(selector *metav1.LabelSelector, namespace st } // If none of the container-level checks matched, check if the pod is running but - // not passing readiness checks. + // not passing readiness checks. We only note a pod as failing if it has been + // unready for over a minute, to minimize false positives. if p.Status.Phase == corev1.PodRunning { for _, cond := range p.Status.Conditions { - if cond.Type == corev1.ContainersReady && cond.Status == corev1.ConditionFalse { + old := time.Now().Sub(cond.LastTransitionTime.Time) > 60*time.Second + if cond.Type == corev1.ContainersReady && cond.Status == corev1.ConditionFalse && old { return fmt.Sprintf("Pod %s/%s is running but not ready", p.Namespace, p.Name), nil } }