Skip to content

feat: set full URI for the envoy-gateway service using name and namespace#4533

Merged
arkodg merged 3 commits intoenvoyproxy:mainfrom
rajatvig:UseFullURI
Oct 26, 2024
Merged

feat: set full URI for the envoy-gateway service using name and namespace#4533
arkodg merged 3 commits intoenvoyproxy:mainfrom
rajatvig:UseFullURI

Conversation

@rajatvig
Copy link
Copy Markdown
Contributor

Signed-off-by: Rajat Vig rvig@etsy.com

What type of PR is this?

Sets the xdsServerHost in Kubernetes to be fully qualified Service Name using the namespace.

What this PR does / why we need it:

Instead of defaulting to envoy-gateway sets the xdsServerHost to be envoy-gateway.envoy-gateway-system.svc.cluster.local.

Release Notes: No

…pace

Signed-off-by: Rajat Vig <rvig@etsy.com>
@rajatvig rajatvig requested a review from a team as a code owner October 25, 2024 22:57
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.67%. Comparing base (6f5ae8e) to head (4cfe395).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4533      +/-   ##
==========================================
- Coverage   65.72%   65.67%   -0.05%     
==========================================
  Files         211      211              
  Lines       31669    31672       +3     
==========================================
- Hits        20813    20801      -12     
- Misses       9656     9668      +12     
- Partials     1200     1203       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Rajat Vig <rvig@etsy.com>
TrustedCA: filepath.Join("/sds", common.SdsCAFilename),
},
MaxHeapSizeBytes: maxHeapSizeBytes,
XdsServerHost: ptr.To(fmt.Sprintf("envoy-gateway.%s.svc.%s", namespace, dnsDomain)),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use config.EnvoyGatewayServiceName here ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@arkodg arkodg requested review from a team October 26, 2024 01:24
@zirain
Copy link
Copy Markdown
Member

zirain commented Oct 26, 2024

can you share more details about the benifit? reduce DNS pressure?

Signed-off-by: Rajat Vig <rvig@etsy.com>
@rajatvig
Copy link
Copy Markdown
Contributor Author

can you share more details about the benifit? reduce DNS pressure?

Yes. It would reduce the number of DNS resolve requests as just envoy-gateway traverses the full search path everytime.

The typical /etc/resolv.conf has ndots 5 and quite a few search paths varying on the Kubernetes setup.

You can test it out by running and comparing against a CoreDNS pod with logging turned on to see the diference in number of queries.

dig +search +short envoy-gateway AAAA
dig +search +short envoy-gateway.envoy-gateway-system.svc.cluster.local AAAA

We see
Screenshot 2024-10-26 at 12 21 15

Should add, this is not true when autopath @kubernetes and pods verified is on with CoreDNS. In our setup, however, we get arbitrary IPv6 address failures when we turn on autopath despite not using a dual stack cluster. The reason from what I have gathered in Go http/client defaults to requesting both IPv4 and IPv6 records all the time.

Copy link
Copy Markdown
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg merged commit 3e8730f into envoyproxy:main Oct 26, 2024
@zirain
Copy link
Copy Markdown
Member

zirain commented Oct 29, 2024

@rajatvig looks like this broken xds_cluster dns reslove on IPv6 cluster?

@zirain zirain mentioned this pull request Oct 30, 2024
7 tasks
zirain added a commit to zirain/gateway that referenced this pull request Oct 30, 2024
…nd namespace (envoyproxy#4533)"

This reverts commit 3e8730f.

Signed-off-by: zirain <zirain2009@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants