-
Notifications
You must be signed in to change notification settings - Fork 310
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
Port forwards fail to bind on macOS when localhost
resolves to fe80::1%lo0
#5981
Labels
bug
Something isn't working
Comments
A colleague noted that a better workaround is |
I was about to ask if |
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
Signed-off-by: Louis Rose <louis.rose@anaplan.com>
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
Signed-off-by: Louis Rose <louis.rose@anaplan.com>
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
Signed-off-by: Louis Rose <louis.rose@anaplan.com>
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
Signed-off-by: Louis Rose <louis.rose@anaplan.com>
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
Signed-off-by: Louis Rose <louis.rose@anaplan.com>
louismrose
pushed a commit
to louismrose/tilt
that referenced
this issue
Dec 7, 2022
Fixes tilt-dev#5981 Signed-off-by: Louis Rose <louis.rose@anaplan.com>
nicks
added a commit
to nicks/tilt
that referenced
this issue
Dec 10, 2022
…ing behavior The tiltfile evaluator always defaults the empty string to "localhost". We want to make sure that this goes down the default kubernetes binding codepath instead of our custom codepath to resolve hostnames. Fixes tilt-dev#5981 Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks
added a commit
to nicks/tilt
that referenced
this issue
Dec 10, 2022
…ing behavior The tiltfile evaluator always defaults the empty string to "localhost". We want to make sure that this goes down the default kubernetes binding codepath instead of our custom codepath to resolve hostnames. Fixes tilt-dev#5981 Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks
added a commit
to nicks/tilt
that referenced
this issue
Dec 10, 2022
…ing behavior The tiltfile evaluator always defaults the empty string to "localhost". We want to make sure that this goes down the default kubernetes binding codepath instead of our custom codepath to resolve hostnames. Fixes tilt-dev#5981 Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks
added a commit
to nicks/tilt
that referenced
this issue
Dec 10, 2022
…ing behavior The tiltfile evaluator usually defaults the empty string to "localhost" (because it's the default web host) We want to make sure that this goes down the default kubernetes binding codepath instead of our custom codepath to resolve hostnames. Fixes tilt-dev#5981 Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks
added a commit
to nicks/tilt
that referenced
this issue
Dec 10, 2022
…ing behavior The tiltfile evaluator usually defaults the empty string to "localhost" (because it's the default web host) We want to make sure that this goes down the default kubernetes binding codepath instead of our custom codepath to resolve hostnames. Fixes tilt-dev#5981 Signed-off-by: Nick Santos <nick.santos@docker.com>
nicks
added a commit
that referenced
this issue
Dec 12, 2022
…ing behavior (#5988) The tiltfile evaluator usually defaults the empty string to "localhost" (because it's the default web host) We want to make sure that this goes down the default kubernetes binding codepath instead of our custom codepath to resolve hostnames. Fixes #5981 Signed-off-by: Nick Santos <nick.santos@docker.com> Signed-off-by: Nick Santos <nick.santos@docker.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Using
k8s_resource
with a port forward should work on macOS, whenlocalhost
resolves tofe80::1%lo0
.Current Behavior
Port forwarding fails in Tilt with the following error:
I believe this is an issue with Tilt because I can successfully configure a port forward via Kubernetes for the same service:
Interestingly if I try to port forward with Kubernetes via an address hardcoded to
fe80::1%lo0
then it fails with exactly the same error message seen in Tilt:I suspect this is due to
net.LookupHost
includingfe80::1%lo0
in the list of addresses via the default Go resolver on macOS:fe80::1%lo0
seems to appear in/etc/hosts
by default on some macOS installations. I believe the%lo0
is intended to restrict traffic to a particular network interface via a "zone index". It looks like Kubernetes doesn't support IP addresses with a zone index, so Tilt probably shouldn't pass addresses of this form to Kubernetes when setting up port forwards.I had a quick look at
internal/k8s/portforward.go
, and it looks likegetListenableAddresses
might be the place to update? Let me know if that's the case, and I can attempt a PR to exclude IP addresses with a zone index.Steps to Reproduce
localhost
resolves tofe80::1%lo0
(e.g., by using the sample Go code above).tilt up
for a Tiltfile including ak8s_resource
withport_forwards
Reconnecting... Error port-forwarding test-deploy (9090 -> 9090): error forwarding port: fe80::1%lo0 is not a valid IP
in the logs for that resource.Context
tilt doctor
OutputAbout Your Use Case
As I haven't yet been able to figure out how to remove ``fe80::1%lo0
from the addresses to which
localhost` resolves via `net.LookupHost` (removing the entry from `/etc/hosts` doesn't work), I cannot use Tilt port forwards at all.I can workaround this by using
kubectl port-forward
manually instead.The text was updated successfully, but these errors were encountered: