From 47109e0c0c17506e09a01c1fb36abe09a64f840e Mon Sep 17 00:00:00 2001 From: freddygv Date: Thu, 16 Sep 2021 13:52:06 -0600 Subject: [PATCH] Default the partition in ixn check --- agent/consul/intention_endpoint.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/consul/intention_endpoint.go b/agent/consul/intention_endpoint.go index 1c5fec9614..f5ffaaa3ee 100644 --- a/agent/consul/intention_endpoint.go +++ b/agent/consul/intention_endpoint.go @@ -678,6 +678,12 @@ func (s *Intention) Check(args *structs.IntentionQueryRequest, reply *structs.In if query.DestinationNS == "" { query.DestinationNS = entMeta.NamespaceOrDefault() } + if query.SourcePartition == "" { + query.SourcePartition = entMeta.PartitionOrDefault() + } + if query.DestinationPartition == "" { + query.DestinationPartition = entMeta.PartitionOrDefault() + } if err := s.srv.validateEnterpriseIntentionNamespace(query.SourceNS, false); err != nil { return fmt.Errorf("Invalid source namespace %q: %v", query.SourceNS, err)