Skip to content

Commit

Permalink
Ignore finished workloads when scanning for abnormal conditions (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrove-oss authored Nov 18, 2024
1 parent 27ee44c commit 3fa9a98
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tools/cluster-checker/checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@ async function checkUserNamespace (client, namespace, queues) {
for (const condition of workload.status?.conditions ?? []) {
conditions[condition.type] = condition.status
}
if (conditions.Admitted === 'True' && conditions.PodsReady === 'False') {
console.log(`WARNING: workload "${namespace.metadata.name}/${workload.metadata.name}" has conditions Admitted=True and PodsReady=False`)
}
if (conditions.Evicted === 'True') {
console.log(`WARNING: workload "${namespace.metadata.name}/${workload.metadata.name}" has condition Evicted=True`)
if (conditions.Finished !== 'True') {
if (conditions.Admitted === 'True' && conditions.PodsReady === 'False') {
console.log(`WARNING: workload "${namespace.metadata.name}/${workload.metadata.name}" has conditions Admitted=True and PodsReady=False`)
}
if (conditions.Evicted === 'True') {
console.log(`WARNING: workload "${namespace.metadata.name}/${workload.metadata.name}" has condition Evicted=True`)
}
}

// report misconfigured resource requests
Expand Down

0 comments on commit 3fa9a98

Please sign in to comment.