-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Wrap IPv6 endpoints in [] #828
Comments
@rlguarino we need to add a helper in the template (go code) to check if the IP address is IPV6
|
@aledbf I can do that. What about creating a helper called
|
Looking at the code some more there is already a helper function "contains" which could be used like:
|
@rlguarino using contains seems the easiest way to fix this 👍 |
@aledbf I'm having trouble building the code and I'm not sure if it's me or not. I sent you a message on slack but the gist of it is I'm seing this error:
which seems to come from this commit:
Do I need to update my vendor directory or something? |
You need go 1.8 |
Add formatIP helper function which will wrap IPv6 addresses in [] and print IPv4 addresses as is. Closes kubernetes#828
It seems only thing that is currently stopping IPv6 services from working right now with the NGINX ingress controller (ignoring kube-proxy) is wrapping IPv6 IPs in
[]
in theupstream
.An example of the error i'm seeing:
I've proved this to myself by changing the line:
Looking at where the address string is generated is really difficult, but it seems to me that these endpoints are returned to the nginx-ingress-controller from the API as a type
string
. So unfortunately there looks like there isn't a way to change how they are printed based on their type. Another approach would be to check if the IP has:
in it, if it does surround it with[]
, but I'm not familiar with the code base to tell where that logic should go, if someone want's to point me in the right direction I'm more than happy to create a PR.The text was updated successfully, but these errors were encountered: