<#7232 Use request host in SelectCluster> Pull req...
# flyte-github
a
#7232 Use request host in SelectCluster Pull request opened by EngHabu Why are the changes needed?
SelectCluster
previously returned a statically configured
dataplaneDomain
(the dataproxy
baseURL
) as the cluster endpoint for every caller. That forced all clients to talk to the same hostname regardless of how they actually reached the service — breaking setups where the same deployment is fronted by multiple hostnames (e.g. per-tenant/per-region ingresses, local port-forwards, or internal vs. external URLs). Using the request's
Host
header lets the server echo back whatever host the client used to reach it, so clients keep talking to the endpoint they already have a working route to. What changes were proposed in this pull request? •
SelectCluster
now reads the
Host
header off the inbound request and returns it as
ClusterEndpoint
. • Removed the
dataplaneDomain
field and constructor argument from `ClusterService`;
NewClusterService()
no longer needs the configured base URL. • Updated
dataproxy/setup.go
to call the simplified constructor, plus a minor import ordering cleanup. How was this patch tested? Manual verification via the dataproxy endpoint —
SelectCluster
now returns the host the client used to reach it rather than the configured dataplane domain. Labels • fixed Check all the applicable boxes • All commits are signed-off. flyteorg/flyte