Skip to content

fix(k8s-status): don't flag finished pods over READY 0/1 - #669

Draft
ersintarhan wants to merge 1 commit into
noctalia-dev:mainfrom
ersintarhan:fix/k8s-status-completed-pods
Draft

fix(k8s-status): don't flag finished pods over READY 0/1#669
ersintarhan wants to merge 1 commit into
noctalia-dev:mainfrom
ersintarhan:fix/k8s-status-completed-pods

Conversation

@ersintarhan

@ersintarhan ersintarhan commented Sep 8, 2026

Copy link
Copy Markdown

Plugin

  • Id: davemhammer/k8s-status
  • New plugin
  • Update to an existing plugin (version bumped in plugin.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 problems launcher. Their containers have exited, so they report READY 0/1 and the readiness-ratio part of the problem check flagged them despite STATUS=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) and less (pager), both already declared in plugin.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 Completed CronJob pods (READY 0/1) were all counted as problems before the fix.

  • Ran the patched parsePodsWide over real kubectl get pods -A --no-headers output: 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 problems is empty.

  • noctalia plugins lint k8s-status clean.

Screenshots / Videos

No visual change: the widget/panel problem counter simply no longer includes finished pods (evidence numbers above).

Checklist

  • The directory name matches the part of id after the / in plugin.toml exactly.
  • It ships plugin.toml, README.md, thumbnail.webp, and translations/en.json.
  • README.md follows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
  • thumbnail.webp is 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.
  • version follows semver and is bumped in this PR; plugin_api is the oldest API level this plugin requires.
  • Every non-English translation in this PR uses a locale supported by Noctalia core, and I can read, write, and understand that language well enough to review and maintain it (no unreviewed machine/LLM translations).
  • I did not edit catalog.toml; CI generates it.
  • This PR touches exactly one plugin directory.

Code review attestation

  • The code is readable and not obfuscated, minified, or generated.
  • It does not download and execute remote code.
  • Every network call, filesystem write, and spawned process is something the description above accounts for.
  • I have the right to publish this code under the license declared in plugin.toml.

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
Copilot AI lite review requested due to automatic review settings September 8, 2026 16:08
@Noctalia-CI

Noctalia-CI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The description now contains the required template structure.

@Noctalia-CI
Noctalia-CI marked this pull request as draft September 8, 2026 16:08
@Noctalia-CI

Copy link
Copy Markdown
Contributor

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 the kubectl get pods -A --no-headers fallback parser.
  • Bump plugin version 1.1.51.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.

@ersintarhan
ersintarhan marked this pull request as ready for review September 8, 2026 16:10
@ItsLemmy
ItsLemmy marked this pull request as draft September 8, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] k8s-status: Completed Job/CronJob pods flagged as problems (READY 0/1 check)

3 participants