fix(k8s-status): don't flag finished pods over READY 0/1 - #669
fix(k8s-status): don't flag finished pods over READY 0/1#669ersintarhan wants to merge 1 commit into
Conversation
Completed Job/CronJob pods report READY 0/1 because their containers exited, so the readiness-ratio check flagged them as problems in the widget, panel and /kube launcher despite STATUS=Completed. Skip the readiness check for Succeeded/Completed phases. Fixes noctalia-dev#596
|
The description now contains the required template structure. |
|
CC @davemhammer: this pull request was automatically moved to draft until you have had a chance to look at it. It will be marked ready for review automatically once you reply here. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, matches the stated bug/expected behavior, and preserves existing problem checks for non-finished pods.
Pull request overview
Fixes davemhammer/k8s-status pod problem detection so finished Job/CronJob pods (STATUS=Completed / Succeeded) are no longer incorrectly flagged as “problem pods” solely due to reporting READY 0/1 after containers exit (Issue #596).
Changes:
- Skip the readiness-ratio problem check for finished pods (
Succeeded/Completed) in thekubectl get pods -A --no-headersfallback parser. - Bump plugin version
1.1.5→1.1.6.
File summaries
| File | Description |
|---|---|
| k8s-status/service.luau | Adjusts pod “problem” logic to avoid counting finished pods as problems based on readiness ratio. |
| k8s-status/plugin.toml | Version bump for the bugfix release. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Plugin
davemhammer/k8s-statusplugin.toml)What it does
Fixes #596. (Replaces the closed #597/#598.)
Completed Job/CronJob pods were counted as problems in the bar widget, the panel summary and the
/kube problemslauncher. Their containers have exited, so they reportREADY 0/1and the readiness-ratio part of the problem check flagged them despiteSTATUS=Completed.The readiness-ratio check is now skipped for finished phases (
Succeeded/Completed). The phase check (Failed,CrashLoopBackOff, …) and the restart-count check (> 5) are unchanged, so genuinely broken pods are still flagged.External dependencies
Unchanged:
kubectl(cluster queries) andless(pager), both already declared inplugin.toml. No new spawned processes, network calls, or filesystem writes.Testing
Tested on Niri
Tested on Hyprland
Tested on Sway
Tested on another compositor:
Noctalia version tested against: v5.0.1
Plugin API level: 10
Reproduced on a live k3s cluster: 104 pods, of which 6
CompletedCronJob pods (READY 0/1) were all counted as problems before the fix.Ran the patched
parsePodsWideover realkubectl get pods -A --no-headersoutput: problem count 6 → 0, and exactly those 6 finished pods flipped; no other pod changed state.In the running shell (plugin loaded from a path source): panel shows
6/6 nodes ready · 0 problem pods · 104 pods;/kube problemsis empty.noctalia plugins lint k8s-statusclean.Screenshots / Videos
No visual change: the widget/panel problem counter simply no longer includes finished pods (evidence numbers above).
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.thumbnail.webpis present and relevant; for a new plugin I created it with the thumbnail generator, and for an update I regenerated it with the generator if the visual identity or user-facing appearance changed.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.catalog.toml; CI generates it.Code review attestation
licensedeclared inplugin.toml.