karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Karmadactl supports modifying existing clusters

Open chaunceyjiang opened this issue 2 years ago • 8 comments

Signed-off-by: chaunceyjiang [email protected]

What type of PR is this? /kind feature

What this PR does / why we need it: For some reasons, our internal karmada must first create a cluster CR object, and then use karmadactl to join a cluster into karmada. At present, karmadactl can only use util.CreateClusterObject(), and then the error cluster (dce-04) already exist will be reported. We hope to support util.CreateOrUpdateClusterObject() to update the existing cluster CR object

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmadactl` supports --overwrite parameter

chaunceyjiang avatar Jul 19 '22 02:07 chaunceyjiang

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign kevin-wangzefeng after the PR has been reviewed. You can assign the PR to them by writing /assign @kevin-wangzefeng in a comment when ready.

The full list of commands accepted by this bot can be found 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 avatar Jul 19 '22 02:07 karmada-bot

/cc @lonelyCZ @XiShanYongYe-Chang

chaunceyjiang avatar Jul 19 '22 02:07 chaunceyjiang

For some reasons, our internal karmada must first create a cluster CR object, and then use karmadactl to join a cluster into karmada.

What's the real user scenario?

RainbowMango avatar Jul 19 '22 02:07 RainbowMango

What's the real user scenario?

It is too slow to import cluster into karmada using karmadactl ,our users can't accept it, so we can only create cluster CR object through client-go, feed back to users in time, and then asynchronously import cluster into karmada using karmadactl

chaunceyjiang avatar Jul 19 '22 02:07 chaunceyjiang

image

Sometimes more than 10s.

chaunceyjiang avatar Jul 19 '22 02:07 chaunceyjiang

We don't want to implement the same feature as karmadactl join in our business system again. So we want to reusing karmadactl @RainbowMango

chaunceyjiang avatar Jul 19 '22 02:07 chaunceyjiang

It is too slow to import cluster into karmada using karmadactl ,our users can't accept it,

Have you figured out why it takes so long?

RainbowMango avatar Jul 19 '22 03:07 RainbowMango

Have you figured out why it takes so long?

https://github.com/karmada-io/karmada/blob/e9730e2c55e996213e688ccdeb47518d626d74f6/pkg/karmadactl/join.go#L177-L179

The main reason is that this function is very time-consuming

chaunceyjiang avatar Jul 20 '22 03:07 chaunceyjiang