-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Envoy Bootstrap] Defaults to IPv6 for admin-bind and grpc-addr in dual stack #22757
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
base: main
Are you sure you want to change the base?
[Envoy Bootstrap] Defaults to IPv6 for admin-bind and grpc-addr in dual stack #22757
Conversation
- Upgraded `github.com/miekg/dns` dependency to v1.1.68. - Included `BindAddr` in agent endpoint and enabled binding logic in IP offset calculations. - Updated `go.mod` and `go.sum` to reflect dependency changes.
…ntBindAddr` for improved binding logic and IP offset calculation. Added utility function isDualStack
…log.go` to use new functions for improved modularity and clarity. Removed duplicate implementations of `GetAgentConfig` and `isDualStack`.
…ntConfig`, `GetAgentBindAddr`, and `IsDualStack`. Refactored functions to support mocking for improved testability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anilvpatel I have provided my review comments below. Please address the comments.
// everywhere which might make this test brittle but not sure what else | ||
// to do. | ||
GRPC: GRPC{ | ||
AgentAddress: "127.0.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anilvpatel please consider using constant instead of hardcode values in multiple places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constants help maintainability, but for expected test values, keeping them visible as-is improves clarity.
Description
When no explicit flags are provided, Envoy should default to 127.0.0.1 in IPv4-only environments and ::1 in IPv6/Dual Stack environment determine based on the local agent bind_addr.
PR Checklist