From 0d7072beead4e3a2119afaeae3cf9a545cba9149 Mon Sep 17 00:00:00 2001 From: Charles Thomas Date: Fri, 12 Jul 2024 21:44:30 -0400 Subject: [PATCH] Fix: don't show "partial" for k8s status if there are completed job pods (#3735) --- src/pages/api/kubernetes/status/[...service].js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/api/kubernetes/status/[...service].js b/src/pages/api/kubernetes/status/[...service].js index 7d9500387..b25cd69da 100644 --- a/src/pages/api/kubernetes/status/[...service].js +++ b/src/pages/api/kubernetes/status/[...service].js @@ -48,8 +48,8 @@ export default async function handler(req, res) { logger.error(`no pods found with namespace=${namespace} and labelSelector=${labelSelector}`); return; } - const someReady = pods.find((pod) => pod.status.phase === "Running"); - const allReady = pods.every((pod) => pod.status.phase === "Running"); + const someReady = pods.find((pod) => pod.status.phase in ["Completed", "Running"]); + const allReady = pods.every((pod) => pod.status.phase in ["Completed", "Running"]); let status = "down"; if (allReady) { status = "running";