Skip to content

Commit

Permalink
Fix: don't show "partial" for k8s status if there are completed job p…
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesthomas authored Jul 13, 2024
1 parent 95ab070 commit 0d7072b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/api/kubernetes/status/[...service].js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 0d7072b

Please sign in to comment.