[Bug]: container k8s list shows an empty cluster name for the default control-plane node
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- swift
- Domain
- cli, infrastructure
Research direction
Start with Sources/ContainerK8s/K8sHelper.swift, especially buildK8sRows, and review the role-label input produced by LinuxNodeProvisioner.swift and K8sCreate.swift. Run or recreate the focused regression test described in the issue, then verify that k8s list reports k8s-dev for the control-plane row and groups matching workers correctly.
Written by the indexing model from the issue text.
Description
Steps to reproduce
- On
apple/containermain atd265d669ecae041bf338cb3b39c4118316d138f0, create a cluster with the defaultcontainer k8s createpath. - Run
container k8s listand inspect theCLUSTERcolumn for thek8s-devcontrol-plane node.
I reproduced the underlying list-row behavior in a focused regression test against this clean main revision, using a ContainerSnapshot with ID k8s-dev and role label control-plane,worker (the label written by the default create path). K8sHelper.buildK8sRows(from:) produced a row whose clusterName was ""; the expected value was "k8s-dev". This focused test did not require a running container service. I have not separately run the end-to-end CLI steps above.
Problem description
The default k8s create path gives the control-plane node both control-plane and worker roles. LinuxNodeProvisioner joins them into the single role label control-plane,worker.
buildK8sRows recognizes a control-plane node only when the whole label equals control-plane. It therefore treats the default node as a worker. Because k8s-dev does not contain -worker-, the orphan-worker name derivation returns an empty cluster name. k8s list renders these rows directly.
Expected: the default node is listed under cluster k8s-dev, and matching worker nodes are grouped under it.
Actual in the focused regression test: the control-plane row has an empty cluster name. The CLI display and grouping impact follows from the same row-building path.
Environment
- OS: macOS 26.6.2, Apple Silicon
- Xcode: 27.0
- Swift: 6.4 development snapshot
- Container source:
apple/containermain atd265d669ecae041bf338cb3b39c4118316d138f0
- Dominant language
- Swift
- Stars
- 50.1k
- Forks
- 1.8k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 24
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apple/container
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
apple/container#2212 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
area:dictation bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
uttrflow/uttrflow-swift#2721 · 2 comments ·
Maintainers usually reply within 1 day
-
[@capacitor/app] iOS: 'Expression implicitly coerced from String? to Any' warning in getAppLanguageOpentriage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ionic-team/capacitor-plugins#2604 ·
-
auth type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
googleapis/google-cloud-swift#1260 ·
Maintainers usually reply within 1 day
-
catalog-audit
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openwallet-foundation/multipaz#2036 ·
Maintainers usually reply within 1 day