Browse Source

Default the partition in ixn check

pull/11071/head
freddygv 3 years ago
parent
commit
47109e0c0c
  1. 6
      agent/consul/intention_endpoint.go

6
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)

Loading…
Cancel
Save