tare uninstall

Reverse "tare install": uninstall the Helm release, delete the system and
dataplane namespaces (auto-patching stuck finalizers), and remove TARS-owned CRDs.

Mostly cluster-only. The dataplane URL stays registered and the service-account
identity is not revoked — use the dashboard or 'tars sa' for those.

After the Helm release is removed (phase 2), the CLI reports the uninstall as
an event to the management plane via a sync POST to /v1/dataplane-install-events
so the workspace's deployment history shows the operation. The POST uses the
identity file's SA token. On MP 5xx or network failure the CLI writes the event
to a ConfigMap in tars-system as a fallback (which may not survive the imminent
namespace deletion — see ADR 046 §10). The POST never blocks teardown and never
changes the CLI's exit code.

Phases:
  1. Preflight (Helm 3+, kubectl, cluster)
  2. helm uninstall <release> -n <system-namespace>
  --- between phases 2 and 3: sync-POST uninstall event to MP (+ CM fallback on 5xx)
  3. Patch finalizers in the namespaces + delete GatewayClass tars-egress
  4. Delete namespaces (system, dataplane)
  5. Wait for namespaces to disappear
  6. Delete TARS-owned CRDs (skipped if other releases share them; see --force)

Examples:
  # Standard teardown after confirmation prompt.
  tare uninstall identity.json

  # Non-interactive (CI).
  tare uninstall identity.json --yes

  # Stuck finalizers: bypass controller cleanup and patch them empty.
  tare uninstall identity.json --yes --force

  # Multi-DP cluster: leave CRDs in place so other releases keep working.
  tare uninstall identity.json --yes --keep-crds

  # Preview without touching the cluster.
  tare uninstall identity.json --dry-run

Usage:
  tare uninstall <identity-file> [flags]

Flags:
      --argocd-namespace string   Namespace where ArgoCD Applications live; pre-check uses this to detect mixed-deployment (default: argocd). Set to empty string to disable the check.
      --dry-run                   Print the plan and run helm uninstall --dry-run; no cluster mutation
      --force                     Override the multi-DP guard and delete CRDs even when other releases share them
      --ignore-argocd             Proceed even when ArgoCD manages the system namespace (mixed-deployment override; see ADR 046 §12.13).
      --keep-crds                 Leave CRDs in place (use on shared/multi-DP clusters)
      --timeout string            Per-phase wait timeout (default "5m")
      --yes                       Skip the typed-confirmation prompt

Global Flags:
  -q, --quiet     Suppress progress output; only errors and the final summary go to stderr
  -v, --verbose   Verbose output: plain-mode progress lines plus full per-blob chunk logs to stderr