Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit ce85603

Browse files
committed
syncer: remove feature guard when checking ns meta equality
Signed-off-by: zhuangqh <[email protected]>
1 parent 395ab3e commit ce85603

File tree

1 file changed

+11
-12
lines changed
  • virtualcluster/pkg/syncer/resources/namespace

1 file changed

+11
-12
lines changed

virtualcluster/pkg/syncer/resources/namespace/checker.go

+11-12
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,18 @@ func (c *controller) PatrollerDo() {
137137
// if vc object is deleted, we should reach here
138138
if c.shouldBeGarbageCollected(p) || p.Annotations[constants.LabelUID] != string(v.UID) {
139139
c.deleteNamespace(p)
140+
return
140141
}
141-
// update namespace meta is a generic operation, guarded by SuperClusterPooling for now
142-
if featuregate.DefaultFeatureGate.Enabled(featuregate.SuperClusterPooling) {
143-
vc, err := util.GetVirtualClusterObject(c.MultiClusterController, vObj.GetOwnerCluster())
144-
if err != nil {
145-
klog.Errorf("fail to get cluster spec : %s", vObj.GetOwnerCluster())
146-
return
147-
}
148-
updatedNamespace := conversion.Equality(c.Config, vc).CheckNamespaceEquality(p, v)
149-
if updatedNamespace != nil {
150-
klog.Warningf("metadata of namespace %s diff in super&tenant cluster", pObj.Key)
151-
d.OnAdd(vObj)
152-
}
142+
143+
vc, err := util.GetVirtualClusterObject(c.MultiClusterController, vObj.GetOwnerCluster())
144+
if err != nil {
145+
klog.Errorf("fail to get cluster spec : %s", vObj.GetOwnerCluster())
146+
return
147+
}
148+
updatedNamespace := conversion.Equality(c.Config, vc).CheckNamespaceEquality(p, v)
149+
if updatedNamespace != nil {
150+
klog.Warningf("metadata of namespace %s diff in super&tenant cluster", pObj.Key)
151+
d.OnAdd(vObj)
153152
}
154153
}
155154
d.DeleteFunc = func(pObj differ.ClusterObject) {

0 commit comments

Comments
 (0)