diff --git a/pkg/resourcemanager/rediscaches/rediscacheaction_reconcile.go b/pkg/resourcemanager/rediscaches/rediscacheaction_reconcile.go index d9682fd3eb6..222c353128e 100644 --- a/pkg/resourcemanager/rediscaches/rediscacheaction_reconcile.go +++ b/pkg/resourcemanager/rediscaches/rediscacheaction_reconcile.go @@ -86,16 +86,16 @@ func (m *AzureRedisCacheActionManager) GetParents(obj runtime.Object) ([]resourc { Key: types.NamespacedName{ Namespace: instance.Namespace, - Name: instance.Spec.ResourceGroup, + Name: instance.Spec.CacheName, }, - Target: &v1alpha1.ResourceGroup{}, + Target: &v1alpha1.RedisCache{}, }, { Key: types.NamespacedName{ Namespace: instance.Namespace, - Name: instance.Spec.CacheName, + Name: instance.Spec.ResourceGroup, }, - Target: &v1alpha1.RedisCache{}, + Target: &v1alpha1.ResourceGroup{}, }, }, nil }