fix the judgement of clusterChanged
the judgement of clusterChanged is wrong
@@ -147,8 +147,8 @@ func newClusterController(config *util.ControllerConfig, clusterHealthCheckConfi
cc.mu.Lock()
clusterData, ok := cc.clusterDataMap[cluster.Name]
- if ok && !equality.Semantic.DeepEqual(clusterData.cachedObj.Spec, cluster.Spec) &&
- !equality.Semantic.DeepEqual(clusterData.cachedObj.ObjectMeta.Annotations, cluster.ObjectMeta.Annotations) &&
+ if !ok || !equality.Semantic.DeepEqual(clusterData.cachedObj.Spec, cluster.Spec) ||
+ !equality.Semantic.DeepEqual(clusterData.cachedObj.ObjectMeta.Annotations, cluster.ObjectMeta.Annotations) ||
!equality.Semantic.DeepEqual(clusterData.cachedObj.ObjectMeta.Labels, cluster.ObjectMeta.Labels) {
clusterChanged = true
}
