#22053·meshery

[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 calls invokeDeleteCRs, invokeDeleteCRDs, applyHelmChart(... UNINSTALL ...), ForceCleanupCluster, or deleteNs.
  • New internal/cli/root/system/uninstall.go: moves the CR/CRD deletion, Helm uninstall / force-cleanup, and namespace deletion logic out of stop.go into a new uninstallCmd, reusing the existing --force and --keep-namespace flags and the existing deleteCR/deleteCRD/deleteNs helpers.
  • internal/cli/root/system/delete.go (Docker container removal) is left as-is; uninstall supersedes it as the cross-platform entry point going forward. Whether delete should be deprecated/aliased to uninstall is open for discussion.
  • Docs updated: docs/content/en/reference/references/mesheryctl/system/stop.md and a new system/uninstall.md, plus docs/data/mesheryctlcommands/cmds.yml.
  • e2e tests (mesheryctl/tests/e2e/001-system/04-system-stop.bats.skipped) split so that stop tests 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 --force

Screenshots/Logs

Environment

  • Host OS: Mac Linux Windows
  • Meshery Server Version: stable-v
  • Meshery Client Version: stable-v
  • Platform: Docker Kubernetes

Contributor Guides and Handbook