Skip to main content

tare uninstall

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

Cluster-only operation. This command does not touch the management plane, does
not deregister the dataplane URL, and does not revoke the service-account
identity. Use the dashboard or 'tars sa' for those.

The identity file is required for UX parity with 'tare install' and is used
only as a source of defaults — no JWT is generated and no remote calls are made.

Phases:
1. Preflight (Helm 3+, kubectl, cluster)
2. helm uninstall <release> -n <system-namespace>
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:
--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
--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