Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tazuna destroy

Deletes Tazuna-managed resources from the cluster. To prevent accidents, a two-stage guard is in place.

TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy [-f tazuna.yaml] \
  [--tags ...] [--force] [--no-cache | --offline]

Behavior

  1. Load and validate tazuna.yaml.

  2. If spec.context_matches is set, match against the current-context. Abort immediately on mismatch.

  3. If --force is not set, display the following prompt and require Y/N confirmation.

    !!! All resources managed by Tazuna will be deleted !!!
    Are you sure you want to delete them?
    
  4. Unless the environment variable TAZUNA_DESTROY_EXECUTABLE is true, only log output happens and the command exits without touching the cluster.

  5. Only when both guards pass: applies the --tags filter, then invokes each Manager’s Destroy in order to delete the corresponding resources from the cluster.

In other words, resources are not deleted unless both “Yes at the prompt” and “TAZUNA_DESTROY_EXECUTABLE=true” are satisfied.

Flag

In addition to global flags, the following are accepted.

FlagAliasTypeDefaultDescription
--force-boolfalseSkips the pre-deletion confirmation prompt. It does not skip the environment-variable guard.
--tags-t[]string[]Targets only Manifests with at least one of the specified tags for deletion (OR evaluation).
--no-cache-boolfalseFor type: oras Manifests, always refetch from the registry without using the cache.
--offline-boolfalseFor type: oras Manifests, forbid access to the registry.

--no-cache and --offline cannot be specified together.

Environment Variables

Environment VariablesValueDescription
TAZUNA_DESTROY_EXECUTABLEtrueUnless this is set, destroy does not delete anything. It is a kill switch to prevent destroy from accidentally running in CI.

Examples

TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy
TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy --tags experimental
TAZUNA_DESTROY_EXECUTABLE=true tazuna destroy --force