Describe the bug
On the Deployment details page, the Replicas row in extra info is hidden even when Kubernetes has populated status.replicas, status.readyReplicas, etc.
showReplicas() checks item.spec?.status?.replicas, but Deployments do not have spec.status — replica counts live on status, not spec. This looks like a typo (spec.status vs status).
Expected: When a Deployment has replica counts in status, the Replicas row should appear (as renderReplicas() already reads from item.status).
Actual: The row stays hidden whenever spec.replicas is unset, even if status has replica data.
Evidence in code:
function showReplicas(item: Workload) {
return (
item.kind === 'Deployment' &&
(item.spec?.status?.replicas !== undefined || item.spec?.replicas !== undefined)
);
}
To Reproduce
- Open Headlamp and connect to a cluster.
- Find or create a Deployment where
status.replicas / status.readyReplicas exist but spec.replicas is not present in the API response (or use a Deployment right after creation before spec is fully reflected).
- Open the Deployment details page.
- Observe that the Replicas row is missing under extra info, even though replica status exists in the object.
Environment (please provide info about your environment):
- Installation type: From source (
npm start)
- Headlamp Version: main branch (app
0.42.0 in /app/package.json)
- Other: Reproducible in browser UI; logic bug in
frontend/src/components/workload/Details.tsx
Are you able to fix this issue?
Yes (I will propose a PR)
Additional Context
renderReplicas() (lines 153–158) already reads from item.status.* correctly — only the visibility guard is wrong.
- No existing GitHub issue found for
spec.status.replicas / Deployment replicas row.
- Likely a long-standing typo, not a recent regression.
Describe the bug
On the Deployment details page, the Replicas row in extra info is hidden even when Kubernetes has populated
status.replicas,status.readyReplicas, etc.showReplicas()checksitem.spec?.status?.replicas, but Deployments do not havespec.status— replica counts live onstatus, notspec. This looks like a typo (spec.statusvsstatus).Expected: When a Deployment has replica counts in
status, the Replicas row should appear (asrenderReplicas()already reads fromitem.status).Actual: The row stays hidden whenever
spec.replicasis unset, even ifstatushas replica data.Evidence in code:
To Reproduce
status.replicas/status.readyReplicasexist butspec.replicasis not present in the API response (or use a Deployment right after creation before spec is fully reflected).Environment (please provide info about your environment):
npm start)0.42.0in/app/package.json)frontend/src/components/workload/Details.tsxAre you able to fix this issue?
Yes (I will propose a PR)
Additional Context
renderReplicas()(lines 153–158) already reads fromitem.status.*correctly — only the visibility guard is wrong.spec.status.replicas/ Deployment replicas row.