Add delete cluster command#12
Merged
Merged
Conversation
Signed-off-by: Josef Karasek <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR adds support for deleting clusters via the CLI, wiring the new command through the service interface and API client, and extending tests to cover the new behavior.
Changes:
- Add
kedify delete cluster [name|id]with optional interactive cluster selection when no name/id is provided. - Extend
ClusterServiceand the API client withDeleteCluster, including a small HTTP request helper refactor. - Update fakes and tests across CLI and API packages to satisfy the new interface and validate the DELETE endpoint call.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/service/cluster.go | Extends the ClusterService interface with DeleteCluster. |
| internal/cli/run.go | Registers the new delete command group and delete cluster subcommand. |
| internal/cli/list/recommendations_test.go | Updates fake service to implement the new DeleteCluster interface method. |
| internal/cli/list/clusters_test.go | Updates fake service to implement the new DeleteCluster interface method. |
| internal/cli/get/cluster.go | Exposes cluster lookup/UUID helpers for reuse by the delete command. |
| internal/cli/get/cluster_test.go | Updates tests to use the exported helper and implements the new interface method on the fake. |
| internal/cli/delete/cluster.go | Implements the new delete cluster command (name/id + interactive selection) and prints status to stderr. |
| internal/cli/delete/cluster_test.go | Adds end-to-end style tests for deleting by name, by UUID, and via selector. |
| internal/api/client.go | Adds DeleteCluster and refactors request handling with a reusable doRequest helper. |
| internal/api/client_test.go | Adds a test asserting DELETE method/path for the delete endpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Josef Karasek <[email protected]>
jkremser
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.