[mesheryctl]Decouple uninstall behavior from system stop
Author: hexxdumpCreated Sep 23, 2026Updated Sep 28, 2026
Labelskind/bugcomponent/mesheryctllanguage/go
See mesheryctl Command Tracker for current status of commands.
Current Behavior
mesheryctl system stop currently does more than its name implies: on both the Docker and Kubernetes platforms it not only stops Meshery's running resources but also force-uninstalls them (deleting containers, Helm release, CRs/CRDs, and — unless --keep-namespace is passed — the namespace itself).Desired Behavior
Implementation notes
internal/cli/root/system/stop.go:stop()now only stops Docker containers (composeClient.Stop) or, for Kubernetes, scales down/stops the running deployment — it no longer callsinvokeDeleteCRs,invokeDeleteCRDs,applyHelmChart(... UNINSTALL ...),ForceCleanupCluster, ordeleteNs.- New
internal/cli/root/system/uninstall.go: moves the CR/CRD deletion, Helm uninstall / force-cleanup, and namespace deletion logic out ofstop.gointo a newuninstallCmd, reusing the existing--forceand--keep-namespaceflags and the existingdeleteCR/deleteCRD/deleteNshelpers. internal/cli/root/system/delete.go(Docker container removal) is left as-is;uninstallsupersedes it as the cross-platform entry point going forward. Whetherdeleteshould be deprecated/aliased touninstallis open for discussion.- Docs updated:
docs/content/en/reference/references/mesheryctl/system/stop.mdand a newsystem/uninstall.md, plusdocs/data/mesheryctlcommands/cmds.yml. - e2e tests (
mesheryctl/tests/e2e/001-system/04-system-stop.bats.skipped) split so thatstoptests assert the process is stopped but resources still exist, and new uninstall tests assert full teardown.
How to test
mesheryctl system start
mesheryctl system stop # verify: process stopped, CRs/CRDs/namespace still present
mesheryctl system uninstall # verify: full teardown, same as old `system stop` behavior
mesheryctl system uninstall --keep-namespace
mesheryctl system uninstall --forceScreenshots/Logs
Environment
- Host OS: Mac Linux Windows
- Meshery Server Version: stable-v
- Meshery Client Version: stable-v
- Platform: Docker Kubernetes
Contributor Guides and Handbook
Source: meshery/meshery