From 8354a074c4df4e9fc4e6b0b1df56e030c3d38e69 Mon Sep 17 00:00:00 2001 From: aarifullin Date: Tue, 6 Feb 2024 11:44:11 +0300 Subject: [PATCH] [#49] engine: Fix target considering order * Namespace target rules should be considered first Signed-off-by: Airat Arifullin --- pkg/engine/interface.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/engine/interface.go b/pkg/engine/interface.go index e6290c8..66afff1 100644 --- a/pkg/engine/interface.go +++ b/pkg/engine/interface.go @@ -70,12 +70,12 @@ func NewRequestTarget(namespace, container string) RequestTarget { } func (rt *RequestTarget) Targets() (targets []Target) { - if rt.Container != nil { - targets = append(targets, *rt.Container) - } if rt.Namespace != nil { targets = append(targets, *rt.Namespace) } + if rt.Container != nil { + targets = append(targets, *rt.Container) + } return } -- 2.45.2