pixel-point / kube-forwarder

Easy to use Kubernetes port forwarding manager
https://kube-forwarder.pixelpoint.io/
MIT License
1.08k stars 183 forks source link

Add support for specifying the local bind address for each resource #41

Closed dobesv closed 4 years ago

dobesv commented 4 years ago

Putting each service on its own address avoids sharing/collisions between services on cookies and port number. Specifically this lets me put staging kubernetes dashboard on 127.0.0.1 and production on localhost so that they don't overwrite each others' cookies.

lnikell commented 4 years ago

Hi @dobesv, thank you for your contribution. It's an interesting feature, but could I ask you to wrap it as a separate option for a resource configuration. So if someone needs to put it to a separate address he could click the extra checkbox. What do you think?

dobesv commented 4 years ago

Hmm I am open to suggestions, but I'm not sure I can visualize this one.

You mean, there would be a column for each port forward where you click a checkbox to enable choosing the listen address?

I suppose another option might be to make it a global setting, where users who are not interested in this feature can turn it off.

Note that currently if you just leave that field blank, it will listen on localhost.

lnikell commented 4 years ago

@dobesv I guess it could be similar with what you have just with minor UX tweak image When you press "use custom local address" we could have prefilled value such as 127.0.0.1 inside the field. So if you need to prevent collision you just press a checkbox.

dobesv commented 4 years ago

I see. I could try that. It does seem like an extra step to click the checkbox AND fill in a new value - in principle you could just adjust the value if you want to, otherwise leave it at the default. I guess you want the checkbox to make it look cleaner?

dobesv commented 4 years ago

What if I made the checkbox so that it added the address field(s) to each row as I have it now? That would be a bit less work for me since I already did all the work to add those columns. Then the checkbox would just toggle visibility of those columns.

dobesv commented 4 years ago

@lnikell I added a checkbox as requested, can you try it and let me know what you think?

dobesv commented 4 years ago

@lnikell Have you had a chance to review / test this feature?

dobesv commented 4 years ago

@Inikell Anything I could do to move this PR forwards?

dobesv commented 4 years ago

@lnikell @proAlexandr Is there anything I can do to move this PR forwards?