Closed zhzhuang-zju closed 2 weeks ago
/assign
cc @XiShanYongYe-Chang @chaosi-zju
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: chaunceyjiang
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this? /kind cleanup
What this PR does / why we need it: Function
CreateOrUpdateClusterObject
is used to create cluster object in karmada control plane, or update it if it has been existed. https://github.com/karmada-io/karmada/blob/da7689f715aa7c8424a6e14d99be8536f5f1f77a/pkg/util/cluster.go#L145-L151reflect.DeepEqual(cluster.Spec, clusterObj.Spec)
It doesn't make sense to compare thecluster
to theclusterobj
, it should be thecluster
to themutate(cluster)
in order to correctly determine if an update is needed.Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: