Add cluster delete autocompletion (#1080)

* Add cluster deletion and completion enhancements

- Implemented `--all` flag for deleting all clusters in a namespace.
- Updated argument parsing to allow for maximum one cluster name.
- Added completion functions for cluster names with namespace filtering.
- Enhanced tests for cluster argument resolution and completion functions.

* fix docs

* Add log message for empty cluster deletion in specified namespace

* Refactor context handling in command functions to use `cmd.Context()`
This commit is contained in:
Enrico Candino
2026-07-28 18:22:25 +02:00
committed by GitHub
parent ac2eaf97d9
commit eb0955f666
11 changed files with 232 additions and 37 deletions
+1
View File
@@ -94,6 +94,7 @@ k3kcli cluster delete [command options] NAME
=== Options
----
-A, --all delete all the clusters in the namespace
-h, --help help for delete
--keep-data keeps persistence volumes created for the cluster after deletion
-n, --namespace string namespace of the k3k cluster
+1
View File
@@ -15,6 +15,7 @@ k3kcli cluster delete [command options] NAME
### Options
```
-A, --all delete all the clusters in the namespace
-h, --help help for delete
--keep-data keeps persistence volumes created for the cluster after deletion
-n, --namespace string namespace of the k3k cluster