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

Unify delete mgmt #7502

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Unify delete mgmt #7502

merged 1 commit into from
Feb 16, 2024

Conversation

tatlat
Copy link
Member

@tatlat tatlat commented Feb 7, 2024

Issue #, if available:

Description of changes:
Adds a new delete workflow for mgmt clusters

Testing (if applicable):

Documentation added/planned (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 7, 2024
@tatlat tatlat force-pushed the unify-delete-mgmt branch from cd88c76 to b61126a Compare February 7, 2024 00:49
@eks-distro-bot eks-distro-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 7, 2024
Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: 38 lines in your changes are missing coverage. Please review.

Comparison is base (4583834) 73.48% compared to head (e8a928b) 73.70%.
Report is 90 commits behind head on main.

Files Patch % Lines
pkg/workflows/management/delete_cluster.go 73.68% 8 Missing and 2 partials ⚠️
pkg/clustermanager/cluster_manager.go 0.00% 9 Missing ⚠️
cmd/eksctl-anywhere/cmd/deletecluster.go 0.00% 5 Missing ⚠️
pkg/workflows/management/delete_install_eksa.go 87.50% 3 Missing and 1 partial ⚠️
pkg/workflows/management/delete_bootstrap.go 85.71% 2 Missing ⚠️
...kg/workflows/management/delete_create_bootstrap.go 88.88% 2 Missing ⚠️
pkg/workflows/management/delete_install_capi.go 88.23% 2 Missing ⚠️
pkg/workflows/management/delete_move_capi.go 84.61% 2 Missing ⚠️
pkg/workflows/management/validate.go 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7502      +/-   ##
==========================================
+ Coverage   73.48%   73.70%   +0.21%     
==========================================
  Files         579      588       +9     
  Lines       36357    37099     +742     
==========================================
+ Hits        26718    27344     +626     
- Misses       7875     7962      +87     
- Partials     1764     1793      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tatlat
Copy link
Member Author

tatlat commented Feb 8, 2024

/retest

1 similar comment
@tatlat
Copy link
Member Author

tatlat commented Feb 13, 2024

/retest

@drewvanstone drewvanstone added this to the v0.19.0 milestone Feb 15, 2024

func (s *deleteManagementCluster) Run(ctx context.Context, commandContext *task.CommandContext) task.Task {
logger.Info("Deleting management cluster")
err := commandContext.ClusterManager.DeleteCluster(ctx, commandContext.BootstrapCluster, commandContext.WorkloadCluster, commandContext.Provider, commandContext.ClusterSpec)
Copy link
Member

Choose a reason for hiding this comment

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

We should use the EKSA controller here instead of using the cluster manager.

@@ -39,3 +39,28 @@ func (s *moveClusterManagementTask) Restore(ctx context.Context, commandContext
func (s *moveClusterManagementTask) Checkpoint() *task.CompletedTask {
return nil
}

type moveClusterManagementForDeleteTask struct{}
Copy link
Member

Choose a reason for hiding this comment

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

can we move this to a separate file for delete_move_capi.go?

@@ -14,8 +14,6 @@ type (
)

func (s *postDeleteWorkload) Run(ctx context.Context, commandContext *task.CommandContext) task.Task {
Copy link
Member

Choose a reason for hiding this comment

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

we can probably get rid of this task

@eks-distro-bot eks-distro-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 16, 2024
@tatlat
Copy link
Member Author

tatlat commented Feb 16, 2024

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tatlat

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mitalipaygude
Copy link
Member

/lgtm

@eks-distro-bot eks-distro-bot merged commit a590acd into aws:main Feb 16, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants