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

support unregister cluster in karmada #5626

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

wulemao
Copy link
Contributor

@wulemao wulemao commented Sep 30, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

support unregister cluster in karmada

Which issue(s) this PR fixes:

Part of #5380

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmadactl: support unregister a pull mode cluster

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 30, 2024
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 30, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0.39526% with 252 lines in your changes missing coverage. Please review.

Project coverage is 41.50%. Comparing base (e204459) to head (f803efe).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
pkg/karmadactl/unregister/unregister.go 0.00% 216 Missing ⚠️
pkg/karmadactl/util/cluster.go 0.00% 28 Missing ⚠️
pkg/util/secret.go 0.00% 6 Missing ⚠️
pkg/karmadactl/karmadactl.go 0.00% 1 Missing ⚠️
pkg/karmadactl/unjoin/unjoin.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5626      +/-   ##
==========================================
+ Coverage   40.85%   41.50%   +0.64%     
==========================================
  Files         651      655       +4     
  Lines       55259    55741     +482     
==========================================
+ Hits        22577    23136     +559     
+ Misses      31240    31105     -135     
- Partials     1442     1500      +58     
Flag Coverage Δ
unittests 41.50% <0.39%> (+0.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@wulemao
Copy link
Contributor Author

wulemao commented Oct 24, 2024

latest test report:

图片

@wulemao
Copy link
Contributor Author

wulemao commented Oct 24, 2024

According to what we communicated offline, pr is updated

@chaosi-zju ready to review

@wulemao wulemao force-pushed the karmadactl-unregister branch from d654302 to 97fdd94 Compare October 24, 2024 09:09
@chaosi-zju
Copy link
Member

/lgtm

/cc @zhzhuang-zju @RainbowMango help a look

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2024
@karmada-bot
Copy link
Collaborator

@chaosi-zju: GitHub didn't allow me to request PR reviews from the following users: a, look.

Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/lgtm

/cc @zhzhuang-zju @RainbowMango help a look

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wulemao wulemao force-pushed the karmadactl-unregister branch from 97fdd94 to cdfe48a Compare October 24, 2024 12:40
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 24, 2024
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/assign

@wulemao wulemao force-pushed the karmadactl-unregister branch from aceb076 to d3654a1 Compare October 26, 2024 03:45
@wulemao
Copy link
Contributor Author

wulemao commented Oct 26, 2024

updated, latest test result:

图片

is there any more comments?

@wulemao wulemao force-pushed the karmadactl-unregister branch 2 times, most recently from 09ceb19 to e81bc38 Compare October 26, 2024 10:13
@karmada-bot karmada-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 Oct 26, 2024
@wulemao
Copy link
Contributor Author

wulemao commented Oct 26, 2024

图片

updated, thank you for checking again.

@wulemao wulemao force-pushed the karmadactl-unregister branch from e81bc38 to 388587b Compare October 26, 2024 10:32
@zhzhuang-zju
Copy link
Contributor

thanks~ others LGTM

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

Just some nits, otherwise LGTM.

pkg/karmadactl/util/cluster.go Outdated Show resolved Hide resolved
pkg/karmadactl/unregister/unregister.go Outdated Show resolved Hide resolved
pkg/karmadactl/unregister/unregister.go Outdated Show resolved Hide resolved
pkg/karmadactl/unregister/unregister.go Outdated Show resolved Hide resolved
@wulemao wulemao force-pushed the karmadactl-unregister branch from 388587b to d14b4dd Compare October 28, 2024 04:04
@wulemao
Copy link
Contributor Author

wulemao commented Oct 28, 2024

comments fixed, any more comments? @RainbowMango

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

Generally looks good to me.

pkg/karmadactl/unregister/unregister.go Outdated Show resolved Hide resolved
pkg/karmadactl/unregister/unregister.go Outdated Show resolved Hide resolved
pkg/karmadactl/unregister/unregister.go Outdated Show resolved Hide resolved
@wulemao wulemao force-pushed the karmadactl-unregister branch from d14b4dd to 29d9725 Compare October 28, 2024 11:38
@zhzhuang-zju
Copy link
Contributor

const (
// CertRotationControllerName is the controller name that will be used when reporting events.
CertRotationControllerName = "cert-rotation-controller"
// SignerName defines the signer name for csr, 'kubernetes.io/kube-apiserver-client-kubelet' can sign the csr automatically
SignerName = "kubernetes.io/kube-apiserver-client-kubelet"
// KarmadaKubeconfigName is the name of the secret containing karmada-agent certificate.
KarmadaKubeconfigName = "karmada-kubeconfig"

@wulemao @chaosi-zju
CertRotationController in karmad-agent will look up and update the secret karmada-kubeconfig, which has been renamed to karmada-agent-config. We can use func getKarmadaAgentConfig to optimize this hard-coded section.

Signed-off-by: wulemao <1194736083@qq.com>
@wulemao wulemao force-pushed the karmadactl-unregister branch from 29d9725 to f803efe Compare October 28, 2024 12:26
@wulemao
Copy link
Contributor Author

wulemao commented Oct 28, 2024

updated, latest test result:

图片

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2024
@karmada-bot karmada-bot merged commit 1e33365 into karmada-io:master Oct 28, 2024
16 checks passed
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants