Skip to content

Commit

Permalink
Improve k8s not found pod status
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed May 16, 2024
1 parent 43ebd6d commit a9ad2a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/api/kubernetes/status/[...service].js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ export default async function handler(req, res) {

if (pods.length === 0) {
res.status(404).send({
error: `no pods found with namespace=${namespace} and labelSelector=${labelSelector}`,
status: "not found",
});
logger.error(`no pods found with namespace=${namespace} and labelSelector=${labelSelector}`);
return;
}
const someReady = pods.find((pod) => pod.status.phase === "Running");
Expand Down

0 comments on commit a9ad2a2

Please sign in to comment.