karmada
karmada copied to clipboard
Karmadactl supports modifying existing clusters
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
[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.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
/cc @lonelyCZ @XiShanYongYe-Chang
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?
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
Sometimes more than 10s.
We don't want to implement the same feature as karmadactl join
in our business system again. So we want to reusing karmadactl
@RainbowMango
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?
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