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

🌱 check resource blocking clusterctl move during discovery #9246

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

nojnhuh
Copy link
Contributor

@nojnhuh nojnhuh commented Aug 18, 2023

What this PR does / why we need it:

This PR adds a check to the discovery phase of clusterctl move to collect whether the resource is blocking the move with the clusterctl.cluster.x-k8s.io/block-move annotation. This eliminates one extraneous API call during the actual move operation for all resources which already do not have the annotation.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #9196

/area clusterctl

@k8s-ci-robot k8s-ci-robot added area/clusterctl Issues or PRs related to clusterctl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 18, 2023
@nojnhuh nojnhuh force-pushed the block-move-discovery branch from d69fa38 to fc75cf4 Compare August 18, 2023 16:34
@nojnhuh
Copy link
Contributor Author

nojnhuh commented Aug 18, 2023

cc @fabriziopandini

@fabriziopandini
Copy link
Member

Nice! let wait for some other clusterctl reviewer to take a look first, but overall lgtm for me

@@ -623,6 +623,10 @@ func waitReadyForMove(ctx context.Context, proxy Proxy, nodes []*node, dryRun bo
}

for _, n := range nodes {
if !n.blockingMove {
continue
Copy link
Member

Choose a reason for hiding this comment

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

Might be helpful to have a trace level log line here, buts thats a nit.

@richardcase
Copy link
Member

This looks good to me, but will defer to @ykakarap or @Jont828

Copy link
Contributor

@Jont828 Jont828 left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 5, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: a3c25c1d11c810e8448c7161ffc9e3d6e18eacf4

@nojnhuh nojnhuh force-pushed the block-move-discovery branch from 2716427 to e3c78b7 Compare September 6, 2023 15:43
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4e6b589 into kubernetes-sigs:main Sep 14, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Sep 14, 2023
@nojnhuh nojnhuh deleted the block-move-discovery branch September 14, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/clusterctl Issues or PRs related to clusterctl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine which resources are blocking clusterctl move during discovery
5 participants