Skip to content

Commit 5a74717

Browse files
committed
Fix wq key in CachedResource replication reconciler
On-behalf-of: @SAP [email protected] Signed-off-by: Robert Vasek <[email protected]>
1 parent c28c5ff commit 5a74717

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/reconciler/cache/cachedresources/replication/replication_controller.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ func (c *Controller) enqueueObject(obj interface{}, gvr schema.GroupVersionResou
114114
}
115115

116116
func (c *Controller) enqueueCacheObject(obj interface{}) {
117-
key, err := kcpcache.DeletionHandlingMetaClusterNamespaceKeyFunc(obj)
118-
if err != nil {
119-
utilruntime.HandleError(err)
120-
return
121-
}
122-
123117
// This way we extract what is the original GVR of the object that we are replicating.
124118
cr, ok := obj.(*cachev1alpha1.CachedObject)
125119
if !ok {
@@ -133,6 +127,7 @@ func (c *Controller) enqueueCacheObject(obj interface{}) {
133127
Version: labels[LabelKeyObjectVersion],
134128
Resource: labels[LabelKeyObjectResource],
135129
}
130+
key := kcpcache.ToClusterAwareKey(string(logicalcluster.From(cr)), labels[LabelKeyObjectOriginalNamespace], labels[LabelKeyObjectOriginalName])
136131

137132
gvrKey := fmt.Sprintf("%s.%s.%s::%s", gvr.Version, gvr.Resource, gvr.Group, key)
138133
c.queue.Add(gvrKey)

0 commit comments

Comments
 (0)