Plugin
davemhammer/k8s-status
Submission checklist
Bug
Completed Job / CronJob pods are shown as problems in the widget, panel and /kube problems launcher.
Root cause
In k8s-status/plugin/service.luau, isProblemPhase() correctly whitelists Running/Succeeded/Completed. However the pod problem check combines it with a readiness ratio:
local problem = isProblemPhase(status) or (want > 0 and have < want) or restartsNum > 5
Completed Job pods report READY 0/1 (their containers have exited), so want > 0 and have < want is true and the pod is flagged as a problem despite STATUS=Completed.
Expected behavior
Finished pods (Completed/Succeeded) should not be counted as problems.
Suggested fix
Skip the readiness-ratio check for finished phases:
local finished = status == "Succeeded" or status == "Completed"
local problem = isProblemPhase(status)
or (not finished and want > 0 and have < want)
or restartsNum > 5
Happy to send a PR if you agree with the approach.
Environment
- Plugin version: current main
- Cluster: k3s / Talos-based (happens with any CronJob/Jobs that leave completed pods)
Plugin
davemhammer/k8s-statusSubmission checklist
Bug
Completed Job / CronJob pods are shown as problems in the widget, panel and
/kube problemslauncher.Root cause
In
k8s-status/plugin/service.luau,isProblemPhase()correctly whitelistsRunning/Succeeded/Completed. However the pod problem check combines it with a readiness ratio:Completed Job pods report
READY 0/1(their containers have exited), sowant > 0 and have < wantis true and the pod is flagged as a problem despiteSTATUS=Completed.Expected behavior
Finished pods (
Completed/Succeeded) should not be counted as problems.Suggested fix
Skip the readiness-ratio check for finished phases:
Happy to send a PR if you agree with the approach.
Environment