From ac6dd7bc98403cfab39af774e1631b4ec9badd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Thu, 3 Oct 2024 09:16:10 +0200 Subject: [PATCH] chore: add comment about not supporting cross namespace references between KongRoute and KongService --- controller/konnect/index_kongroute.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/controller/konnect/index_kongroute.go b/controller/konnect/index_kongroute.go index 3179dea65..15758ecc6 100644 --- a/controller/konnect/index_kongroute.go +++ b/controller/konnect/index_kongroute.go @@ -51,10 +51,8 @@ func kongRouteRefersToKongService(object client.Object) []string { return nil } - namespace := route.Namespace - if svcRef.NamespacedRef.Namespace != "" { - namespace = svcRef.NamespacedRef.Namespace - } + // NOTE: We currently do not allow cross namespace references between KongRoute and KongService. + // https://github.com/Kong/kubernetes-configuration/issues/106 tracks the implementation. - return []string{namespace + "/" + svcRef.NamespacedRef.Name} + return []string{route.Namespace + "/" + svcRef.NamespacedRef.Name} }