mirror of https://github.com/hashicorp/consul
no NodesOnly
parent
2fa0e0a629
commit
88849c9030
|
@ -295,7 +295,7 @@ func (s *handlerMeshGateway) handleUpdate(ctx context.Context, u UpdateEvent, sn
|
|||
QueryOptions: structs.QueryOptions{Token: s.token},
|
||||
ServiceKind: structs.ServiceKindMeshGateway,
|
||||
UseServiceKind: true,
|
||||
NodesOnly: true,
|
||||
NodesOnly: false,
|
||||
Source: *s.source,
|
||||
EnterpriseMeta: *entMeta,
|
||||
}, fmt.Sprintf("mesh-gateway:%s", gk.String()), s.ch)
|
||||
|
|
|
@ -544,7 +544,7 @@ func watchMeshGateway(ctx context.Context, opts gatewayWatchOpts) error {
|
|||
QueryOptions: structs.QueryOptions{Token: opts.token},
|
||||
ServiceKind: structs.ServiceKindMeshGateway,
|
||||
UseServiceKind: true,
|
||||
NodesOnly: true,
|
||||
NodesOnly: false,
|
||||
Source: opts.source,
|
||||
EnterpriseMeta: *structs.DefaultEnterpriseMetaInPartition(opts.key.Partition),
|
||||
}, correlationId, opts.notifyCh)
|
||||
|
|
|
@ -354,14 +354,14 @@ func (s *handlerUpstreams) resetWatchesFromChain(
|
|||
Partition: s.proxyID.PartitionOrDefault(),
|
||||
Datacenter: s.source.Datacenter,
|
||||
}
|
||||
//default:
|
||||
// // if target.MeshGateway.Mode is not set and target is not peered we don't want to set up watches for the gateway.
|
||||
// // This is important specifically in wan-fed without mesh gateway use case, as for this case
|
||||
// //the source and target DC could be different but there is not mesh-gateway so no need to watch
|
||||
// // a costly watch (Internal.ServiceDump)
|
||||
// if target.Peer == "" {
|
||||
// continue
|
||||
// }
|
||||
default:
|
||||
// if target.MeshGateway.Mode is not set and target is not peered we don't want to set up watches for the gateway.
|
||||
// This is important specifically in wan-fed without mesh gateway use case, as for this case
|
||||
//the source and target DC could be different but there is not mesh-gateway so no need to watch
|
||||
// a costly watch (Internal.ServiceDump)
|
||||
if target.Peer == "" {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if s.source.Datacenter != target.Datacenter || s.proxyID.PartitionOrDefault() != target.Partition {
|
||||
needGateways[gk.String()] = struct{}{}
|
||||
|
|
Loading…
Reference in New Issue