Repository navigation
Remove k8s start command for now - #2290
Conversation
Code Coverage
|
There was a problem hiding this comment.
I think this line would be stale (cluster restart)?
There was a problem hiding this comment.
Done. Also added a recovery section to the docs.
egernst
left a comment
There was a problem hiding this comment.
Just the one stale doc bit I think.
Suggestion, but not blocker - should we include the "how to recover" description you have in the PR header into docs/kubernetes.md?
Signed-off-by: Kathryn Baldauf <[email protected]>
6714793 to
0546451
Compare
|
You asked for use cases, so here is one from the GUI side. I maintain Container Desktop, a macOS app that drives the Two things I would still raise. The stop path outlived the start path. As the PR notes, cluster nodes show up in What The use case, concretely: a long-lived local cluster on a laptop that gets stopped for the same reasons anything on a laptop gets stopped — reclaiming RAM, a reboot, a service restart — and is expected to come back with its contents. That is the shape I see people using it in. Happy to test whatever the redesign lands on. From where I sit the awkward part is not the missing command, it is that stopping is still one step and starting is now none. |
The container package pin moves from 1.4.1 to 1.5.0, which pulls containerization 0.47.0. Nothing Orchard calls has changed shape. The release fixes GHSA-44v5-vx46-ghv6 in the k8s plugin (kubeconfig values from the guest are sanitised before merging), which Orchard gets through the CLI. 1.5.0 removed `container k8s start` (apple/container#2290), so a stopped cluster can only be deleted and created again. Start is replaced by Recreate, which does both in one step. It opens the Create Cluster sheet filled in from the cluster: name, CPUs and memory from the node, the Kubernetes version and the CNI manifest. A node records its image without the tag, so Orchard now remembers what each cluster was created with, and for older clusters recovers the version by matching the image digest against the plugin default and the listed versions, asking when neither matches. A plain container start skips the node boot, readiness wait and kubeconfig write the old command did, so stopped cluster nodes no longer offer Start anywhere in the Containers view, the menu bar or the command palette, and startContainer refuses them as a backstop. Node preparation now uses the node image's own iptables backend instead of iptables-nft (apple/container#2120, closed), so a kernel without nftables no longer breaks cluster creation. K8sKernelAdvisor and its "Cluster Creation Will Fail" state go; the node-prep failure keeps its own message but no longer blames the kernel. 1.5.0 also reads the Kubernetes version from the node image's tag (apple/container#2271), so choosing one now means something. The node image field becomes a version menu: the plugin's own default, read from `k8s create --help`, then the newest kindest/node release of each minor from 1.31, fetched from Docker Hub and pinned by digest, then a custom image, which must carry a tag because 1.5.0 refuses one without. The sheet's Advanced section takes a CNI manifest for the new --cni option. DNS domains can be created with --localhost, so a domain resolves to an address pf redirects to the Mac's 127.0.0.1. Before 1.5.0 adding or removing that rule reloaded all of pf and cut egress for every running container (apple/container#2256). The CLI lists names only, so the redirect address is read from the domain's resolver file. Fixes: - The missing-plugin probe matches 1.5.0's "unknown command 'k8s'" wording as well as the old "Plugin ... not found". - An image entrypoint of [""] clears the entrypoint rather than becoming an empty argv[0], matching the CLI from 1.5.0. - A stopped container, machine or cluster no longer keeps its charts, where a sparse window showed a "Collecting" spinner for samples that were never coming.
…tart container 1.5.0 removed `k8s start` (apple/container#2290): restarts were unreliable, especially after the node came back on a new IP. The release notes and the tagged docs give the same recovery: delete the cluster, then create it again. Flotilla still offered Start, which on 1.5 fails with "Unknown option '--name'". - Start is gone from the Clusters row, ContainerCLI, AppModel and the allowlist. Default-deny means the spec goes with the command, and a test now holds that `k8s start` is refused. - Recreate takes its place for a cluster that is not running. It is one operation with one progress panel: delete, then create with the same name, CPUs and memory, streaming the create's own progress. `k8s list` prints memory as "4096 MB" and `--memory` wants "4096M"; K8sNode.memoryFlag converts, and anything unparseable falls back to the CLI default rather than sending a refused value. - It always asks. The confirmation says why first: container 1.5 cannot restart a stopped cluster. Then what is kept and what is lost, including that a custom node image or CNI cannot be kept, because nothing this app can read records them. Also from 1.5 (apple/container#2271): `--node-image` must name a tag, because the tag now picks the Kubernetes version and the CLI refuses an untagged or digest-only image before provisioning. A new value shape, taggedImageReference, checks the last path component, so a registry port is not mistaken for a tag; every other image field still accepts an untagged reference. The create form's field checks the same shape. It had checked a looser one, which would have left Create disabled with nothing on screen saying why. Verified on a real cluster: fx-k8s was created, stopped with `container stop` as the docs describe, and recreated from the app. It came back running at 2 CPUs and 4096 MB on a new address, so it really was recreated rather than restarted. The cluster's poll also logs an observed "Started" beside "Recreated"; that duplicate is logged as a follow-up. `k8s create --cni` is an opportunity rather than a fix, and is left for later. Decision recorded as a Q22 amendment. 514 tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Kathryn Baldauf <[email protected]>
Type of Change
Motivation and Context
The
container k8s startcommand was added to the k8s subcommand to support starting a previously stopped cluster node. Since cluster nodes show up in the higher levelcontainercommands such ascontainer lsandcontainer stop, it made sense to have the ability to additionally start control plane nodes for the k8s clusters withcontainer k8s start. However, since adding this subcommand, we've seen a number of issues around restarting (see 1) and we additionally have concerns about what the UX design should be for the k8s plugin moving forward.Since this is an experimental feature, this PR will remove
k8s startfor now while we work on improving the plugin overall. This will not only make the code easier to reason about from a developer point of view but additionally gives users less ways to potentially shoot themselves in the foot while we improve the feature.If a control plane node is stopped in a cluster, in lieu of
k8s start, to restart it, a user will need to delete the cluster withcontainer k8s deleteand re-create it withcontainer k8s create.We're open to feedback on this decision and use cases for
k8s start.Testing