no NodesOnly

pull/20168/head
Dhia Ayachi 2024-01-11 15:42:17 -05:00
parent 2fa0e0a629
commit 88849c9030
No known key found for this signature in database
3 changed files with 10 additions and 10 deletions

View File

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

View File

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

View File

@ -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{}{}