Bug Description
In src/ui/HealthDashboard.tsx, the determination of whether a pod is failing is implemented as:
const isFailing = item.type === 'pod'
? (item.status !== 'Running' && item.status !== 'Pending')
: (item.status !== 'running');
In Kubernetes, successfully completed batch Jobs, CronJobs, and completion tasks have status item.status === 'Succeeded'.
Because 'Succeeded' is neither 'Running' nor 'Pending', isFailing evaluates to true for every completed Job.
Consequently:
- The health dashboard displays a failure icon (
✖) in red for all completed jobs.
- In
getPodInspection, completed pods hit the fallback:
return {
reason: 'UnknownError',
events: 'No events available',
action: 'Check logs or restart the service'
};
Instructing the user to check logs or restart a successfully finished task.
Steps to Reproduce
- In a Kubernetes cluster with completed Jobs (e.g. backup CronJob), run:
kdm health pods
- Locate the finished Job pod.
- Observe red
✖ icon and UnknownError diagnostic details.
Expected Behavior
- Pods with phase
'Succeeded' should be considered healthy / completed (green ✔ or blue status indicator).
- They should not be inspected with
UnknownError.
Actual Behavior
Healthy completed jobs are flagged as critical failures.
Environment
- OS: All
- CLI version: v2.0.1
- Affected component:
src/ui/HealthDashboard.tsx
Bug Description
In
src/ui/HealthDashboard.tsx, the determination of whether a pod is failing is implemented as:In Kubernetes, successfully completed batch Jobs, CronJobs, and completion tasks have status
item.status === 'Succeeded'.Because
'Succeeded'is neither'Running'nor'Pending',isFailingevaluates totruefor every completed Job.Consequently:
✖) in red for all completed jobs.getPodInspection, completed pods hit the fallback:Steps to Reproduce
kdm health pods✖icon andUnknownErrordiagnostic details.Expected Behavior
'Succeeded'should be considered healthy / completed (green✔or blue status indicator).UnknownError.Actual Behavior
Healthy completed jobs are flagged as critical failures.
Environment
src/ui/HealthDashboard.tsx