Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: support LRS for logical DNS clusters #6741

Open
dfawley opened this issue Oct 18, 2023 · 0 comments
Open

xds: support LRS for logical DNS clusters #6741

dfawley opened this issue Oct 18, 2023 · 0 comments
Labels
P2 Type: Feature New features or improvements in behavior

Comments

@dfawley
Copy link
Member

dfawley commented Oct 18, 2023

It appears we don't ever set the necessary LRS fields in order for LRS to work in logical DNS clusters; only in EDS:

case xdsresource.ClusterTypeEDS:
dm = clusterresolver.DiscoveryMechanism{
Type: clusterresolver.DiscoveryMechanismTypeEDS,
Cluster: cluster.ClusterName,
EDSServiceName: cluster.EDSServiceName,
MaxConcurrentRequests: cluster.MaxRequests,
}
if cluster.LRSServerConfig == xdsresource.ClusterLRSServerSelf {
bootstrapConfig := b.xdsClient.BootstrapConfig()
parsedName := xdsresource.ParseName(cluster.ClusterName)
if parsedName.Scheme == xdsresource.FederationScheme {
// Is a federation resource name, find the corresponding
// authority server config.
if cfg, ok := bootstrapConfig.Authorities[parsedName.Authority]; ok {
dm.LoadReportingServer = cfg.XDSServer
}
} else {
// Not a federation resource name, use the default
// authority.
dm.LoadReportingServer = bootstrapConfig.XDSServer
}
}
case xdsresource.ClusterTypeLogicalDNS:
dm = clusterresolver.DiscoveryMechanism{
Type: clusterresolver.DiscoveryMechanismTypeLogicalDNS,
Cluster: cluster.ClusterName,
DNSHostname: cluster.DNSHostName,
}
}

We should make sure it works for logical DNS clusters, too, even though we don't currently configure this today.

@dfawley dfawley added P2 Type: Feature New features or improvements in behavior labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Type: Feature New features or improvements in behavior
Projects
None yet
Development

No branches or pull requests

1 participant