Steps to reproduce
- On
apple/container main at d265d669ecae041bf338cb3b39c4118316d138f0, create a cluster with the default container k8s create path.
- Run
container k8s list and inspect the CLUSTER column for the k8s-dev control-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/container main at d265d669ecae041bf338cb3b39c4118316d138f0
Steps to reproduce
apple/containermain atd265d669ecae041bf338cb3b39c4118316d138f0, create a cluster with the defaultcontainer k8s createpath.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
ContainerSnapshotwith IDk8s-devand role labelcontrol-plane,worker(the label written by the default create path).K8sHelper.buildK8sRows(from:)produced a row whoseclusterNamewas""; 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 createpath gives the control-plane node bothcontrol-planeandworkerroles.LinuxNodeProvisionerjoins them into the single role labelcontrol-plane,worker.buildK8sRowsrecognizes a control-plane node only when the whole label equalscontrol-plane. It therefore treats the default node as a worker. Becausek8s-devdoes not contain-worker-, the orphan-worker name derivation returns an empty cluster name.k8s listrenders 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
apple/containermain atd265d669ecae041bf338cb3b39c4118316d138f0