Skip to content

Commit

Permalink
fix(cluster): anno or label modified but not updated (#824)
Browse files Browse the repository at this point in the history
Co-authored-by: jamiezzhao <jamiezzhao@tencent.com>
  • Loading branch information
kingofstormland and jamiezzhao committed Oct 15, 2020
1 parent 6dc9211 commit c28e89a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/platform/controller/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ func (c *Controller) needsUpdate(old *platformv1.Cluster, new *platformv1.Cluste
return true
}

if !reflect.DeepEqual(old.ObjectMeta, new.ObjectMeta) {
return true
}

// Control the synchronization interval through the health detection interval
// to avoid version conflicts caused by concurrent modification
healthCondition := new.GetCondition(conditionTypeHealthCheck)
Expand Down

0 comments on commit c28e89a

Please sign in to comment.