-
Notifications
You must be signed in to change notification settings - Fork 39.5k
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
Make elasticsearch discovery supports IPv6 #85543
Make elasticsearch discovery supports IPv6 #85543
Conversation
/test pull-kubernetes-e2e-kind |
@@ -52,7 +53,13 @@ func flattenSubsets(subsets []corev1.EndpointSubset) []string { | |||
ips := []string{} | |||
for _, ss := range subsets { | |||
for _, addr := range ss.Addresses { | |||
ips = append(ips, fmt.Sprintf(`"%s"`, addr.IP)) | |||
if ip := net.ParseIP(addr.IP); ip != nil { |
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.
nit, you have a function in k/utils that is doing this
https://github.com/kubernetes/utils/blob/6ca3b61696b65b0e81f1a39b4937fc2d2994ed6a/net/net.go#L121
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.
Good! Thanks @aojea
955a02f
to
bbbf396
Compare
/assign @monotek @coffeepac |
/assign @dims |
/lgtm |
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.
/approve
/lgtm
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: coffeepac, SataQiu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Make elasticsearch discovery supports IPv6.
As IPv6 address contains
:
(one of the special value), it should be bracketed.Without this PR, it won't resolve the IPv6 address correctly and will fail to start.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: