diff --git a/pkg/qdr/qdr.go b/pkg/qdr/qdr.go index ac2855cf7..caa99a6f9 100644 --- a/pkg/qdr/qdr.go +++ b/pkg/qdr/qdr.go @@ -1060,7 +1060,10 @@ func GetRouterConfigForHeadlessProxy(definition types.ServiceInterface, siteId s if len(definition.Targets) > 0 { target := definition.Targets[0] - targetNs = target.Namespace + if len(target.Namespace) > 0 { + targetNs = target.Namespace + } + if len(target.TargetPorts) > 0 { ports = target.TargetPorts }