envoyproxy / gateway

Manages Envoy Proxy as a Standalone or Kubernetes-based Application Gateway
https://gateway.envoyproxy.io
Apache License 2.0
1.63k stars 352 forks source link

Cluster_V4_ONLY cause `no healthy upstream` on IPv6 first cluster #4605

Open zirain opened 2 weeks ago

zirain commented 2 weeks ago

xref: https://github.com/envoyproxy/gateway/issues/4572

https://github.com/envoyproxy/gateway/blob/05817fcc42d803caba384d54eee6d9f0c562c1ef/internal/xds/translator/cluster.go#L87

should we change to auto by default?

cc @arkodg @juwon8891

juwon8891 commented 2 weeks ago

I think it should all be default when it's dual stack, and it should be ipv6_only in ipv6 dedicated environment, and ipv4_only in ipv4 dedicated environment

arkodg commented 2 weeks ago

yah + to AUTO / V6_PREFERRED

arkodg commented 2 weeks ago

@juwon8891 can you help with this one ?

zirain commented 2 weeks ago

yah + to AUTO / V6_PREFERRED

Look like AUTO didn't work on IPv6 first cluster.

juwon8891 commented 2 weeks ago

Can we get the ip address type dynamically when we are not dual stack?

zirain commented 2 weeks ago
        dnsLookupFamily := clusterv3.Cluster_V4_ONLY
    if net.IsIPv6FirstPod() {
        dnsLookupFamily = clusterv3.Cluster_V6_ONLY
    }