-
Notifications
You must be signed in to change notification settings - Fork 103
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
support on-demand hostname for workloads #608
Comments
Additionally, this adds support for DNS resolution for workload hostnames.
Why donot let the upstream dns resolve the |
Please correct me if I'm understanding your suggestion wrong, I will answer to the best of my understanding. I think you're asking: "why don't you just forward a regular request upstream and do DNS on the request path as usual?" My answer:
|
FYI, here's the tracking issue for workload hostnames: istio/istio#45895
The goal of workload hostname task I posted above is to specifically address the case of statefulsets and to allow a client to access an endpoint for a headless service directly. Any other hostnames will just go to the upstream DNS resolver. I'm open to the idea of also supporting WE. But, perhaps we should address it separately?
Sorry, what does async DNS resolution have to do with any of this? FYI @howardjohn |
ah, now I see what you mean. I think we're conflating per-pod hostnames for statefulsets vs workload entry hostnames in the ambient workload xds design. I understand what you're doing here for statefulsets. We could also represent the statefulset per-pod hostname as actual services that just select one workload.. but then we have a service per workload when we could have optimized like you did. The way you did this, however, hijacked the field that was originally meant for WorkloadEntry addresses that are hostnames per the original design doc. So I do see this as a separate issue; we can leave
see #608 (comment). in particular:
There are good reasons to support different connection semantics for ztunnel as a DNS client, roughly enumerated in https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/service_discovery I'm happy to rename this issue to: "support hostname for workload entry" and update the issue to reflect we need a new hostname field on the also happy to take this conversation to slack if you think that would help clear things up |
Yeah I think that makes sense. |
@kdorosh I've also renamed my issue to clarify that it's addressing pod hostnames (as opposed to WE). |
the idea for the implementation here is inspired by envoyproxy/envoy#20562 |
edit: the idea for the implementation here is inspired by envoyproxy/envoy#20562
old, slightly confusing original context:
it's not completely implemented, but what we do have is wrong.what we have is per-pod hostnames for statefulsets:ztunnel/src/dns/server.rs
Lines 324 to 331 in 9583efc
we still need workload entry hostname support, which functions a bit differently.
the original intent behind the workload
hostname
field was to have a place to represent theWorkloadEntry.address
field, for example:The new proposal after headless services support in ztunnel is to add a new
async_hostname
field for the WE hostname behavior.The address field in the WorkloadEntry above translates to an envoy DNS cluster, and the workload hostname field in ztunnel was originally intended for this. Note that this means the DNS "cluster" in ztunnel here should use the system forwarder (any address field that's only in istio's DNS cache should return nxdomain to avoid potential looping DNS queries).
it's important we have some way for ztunnel to do DNS resolution as a client for workloads for geographic DNS resolution, e.g. https://github.com/istio/istio/blob/7bf52db38c91c89a4d56d6a94f402fd9ddaf6465/pilot/pkg/serviceregistry/kube/conversion.go#L151-L155
also note that the ztunnel DNS "cluster" implementation should likely mirror envoy's implementation as closely as possible to keep semantics the same for users. this also means we don't just want this lookup available for DNS proxy, but also need this to work during the request path (e.g. a service entry
se.istio.io
resolves to a workload with hostnameaws.elb.com
which resolves to final dest) by pre-resolving the provided hostnames asynchronouslycc @nmittler
The text was updated successfully, but these errors were encountered: