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: fix ipFamily always nil #4782

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

juwon8891
Copy link
Contributor

chore: fix ipFamily always nil

What this PR does / why we need it:
This PR improves IP family configuration handling across different listener types and updates the DNS lookup strategy for better dual-stack support.

  • Add consistent IP family handling across all listener types

Which issue(s) this PR fixes:
Fixes #4761

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 65.62%. Comparing base (a383dd9) to head (64f4832).

Files with missing lines Patch % Lines
internal/gatewayapi/helpers.go 0.00% 3 Missing ⚠️
internal/xds/translator/cluster.go 50.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4782   +/-   ##
=======================================
  Coverage   65.61%   65.62%           
=======================================
  Files         211      211           
  Lines       31989    31997    +8     
=======================================
+ Hits        20991    20999    +8     
+ Misses       9760     9759    -1     
- Partials     1238     1239    +1     

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

@@ -463,6 +463,7 @@ func (t *Translator) addRouteToRouteConfig(
ea := &ExtraArgs{
metrics: metrics,
http1Settings: httpListener.HTTP1,
ipFamily: httpListener.IPFamily,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is incorrect, you are using the listener level IPFamily value in the cluster
you should be deriving this value using a new IPFamily field in
https://github.com/envoyproxy/gateway/blame/48a0310082ceeaf4d3af17e6b6844c7d0fb5db0b/internal/ir/xds.go#L1297 instead and this should be set in the gateway api layer using the Backend Service / EndpointSlice info

Copy link
Contributor Author

@juwon8891 juwon8891 Nov 27, 2024

Choose a reason for hiding this comment

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

Thanks for the feedback! I’ve updated the code to use a new IPFamily field
cc @zirain

@zirain zirain changed the title chore: fix ipFamily always nil xds: fix ipFamily always nil Nov 27, 2024
Signed-off-by: Juwon Hwang (Kevin) <[email protected]>
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.

xdsClusterArgs.ipFamily always nil
2 participants