Skip to content

Add delete cluster command#12

Merged
josefkarasek merged 2 commits into
kedify:mainfrom
josefkarasek:delete-cluster
Jul 8, 2026
Merged

Add delete cluster command#12
josefkarasek merged 2 commits into
kedify:mainfrom
josefkarasek:delete-cluster

Conversation

@josefkarasek

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Josef Karasek <[email protected]>
Copilot AI review requested due to automatic review settings July 7, 2026 13:20
@josefkarasek josefkarasek requested a review from a team as a code owner July 7, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ClusterService and the API client with DeleteCluster, 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]>
@josefkarasek josefkarasek merged commit 5824621 into kedify:main Jul 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants