mirror of https://github.com/status-im/consul.git
Default the partition in ixn check
This commit is contained in:
parent
82d2caa288
commit
47109e0c0c
|
@ -678,6 +678,12 @@ func (s *Intention) Check(args *structs.IntentionQueryRequest, reply *structs.In
|
||||||
if query.DestinationNS == "" {
|
if query.DestinationNS == "" {
|
||||||
query.DestinationNS = entMeta.NamespaceOrDefault()
|
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 {
|
if err := s.srv.validateEnterpriseIntentionNamespace(query.SourceNS, false); err != nil {
|
||||||
return fmt.Errorf("Invalid source namespace %q: %v", query.SourceNS, err)
|
return fmt.Errorf("Invalid source namespace %q: %v", query.SourceNS, err)
|
||||||
|
|
Loading…
Reference in New Issue