Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -A as shorthand for --all in tanzu apps workload delete #604

Open
warango4 opened this issue Jun 21, 2023 · 0 comments
Open

Add -A as shorthand for --all in tanzu apps workload delete #604

warango4 opened this issue Jun 21, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers MIGRATED-MIGRATED Migrated to private repo needs-triage

Comments

@warango4
Copy link
Contributor

warango4 commented Jun 21, 2023

Description of problem

For tanzu apps workload list the --all-namespaces has -A as shorthand, and it will also be useful to have -A as shorthand for --all under the tanzu apps workload delete subcommand.

Proposed solution

<Please describe your proposed solution, preferably in the following style:>

Given I wanto to delete all workloads in a namespace
When I use `tanzu apps workload delete -A`
Then the `-A` flag is taken as a shorthand for `--all` 

Example

tanzu apps workload delete -A
❓ Really delete all workloads in the namespace "default"? (y/N) Y
👍 Deleted workloads in namespace "default"
tanzu apps workload delete -A -n my-namespace
❓ Really delete all workloads in the namespace "my-namespace"? Yes
👍 Deleted workloads in namespace "my-namespace"
tanzu apps workload delete -h
Delete one or more workloads by name or all workloads within a namespace.

Deleting a workload prevents new builds while preserving built images in the
registry.

Usage:
  tanzu apps workload delete <name(s)> [flags]

Examples:
  tanzu apps workload delete my-workload
tanzu apps workload delete --all

Flags:
  -A, --all                     delete all workloads within the namespace
  -f, --file file path          file path containing the description of a single workload, other flags are layered on top of this resource. Use value "-" to read from stdin
  -h, --help                    help for delete
  -n, --namespace name          kubernetes namespace (defaulted from kube config)
      --wait                    waits for workload to be deleted
      --wait-timeout duration   timeout for workload to be deleted when waiting (default 1m0s)
  -y, --yes                     accept all prompts

Global Flags:
      --context name      name of the kubeconfig context to use (default is current-context defined by kubeconfig)
      --kubeconfig file   kubeconfig file (default is $HOME/.kube/config)
      --no-color          deactivate color, bold, animations, and emoji output
  -v, --verbose int32     number for the log level verbosity (default 1)
@warango4 warango4 added enhancement New feature or request good first issue Good for newcomers needs-triage labels Jun 21, 2023
@heyjcollins heyjcollins added the MIGRATED-MIGRATED Migrated to private repo label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers MIGRATED-MIGRATED Migrated to private repo needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants