mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 06:08:48 +00:00
Fix: correct k8s service status check (#3753)
This commit is contained in:
parent
d6188e52fe
commit
407376b3b7
1 changed files with 2 additions and 2 deletions
|
@ -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 in ["Completed", "Running"]);
|
||||
const allReady = pods.every((pod) => pod.status.phase in ["Completed", "Running"]);
|
||||
const someReady = pods.find((pod) => ["Completed", "Running"].includes(pod.status.phase));
|
||||
const allReady = pods.every((pod) => ["Completed", "Running"].includes(pod.status.phase));
|
||||
let status = "down";
|
||||
if (allReady) {
|
||||
status = "running";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue