Feature Request: Automatically set HELM_TILLER_PORT to an unused port
hoesler opened this issue · 7 comments
It would be very nice if the plugin could automatically find and use an unused port for tiller. This would for example simplify simultaneous management of multiple clusters in different tabs. More importantly, however, it would fix the following bug: Currently (Version: v0.6.4), if I run helm tiller start
and after that helm tiller start my-namespace
, the second session would silently reuse tiller started in the first session.
yes, that's a good one feature, it needs some good logic to make it work right.
Maybe to specify the array of the ports can be used, and check which port is free.
Yes. You can find some ideas to that in this thread: https://unix.stackexchange.com/questions/55913/whats-the-easiest-way-to-find-an-unused-local-port
I think the hardest part is to make it work cross platform.
Furthermore, you have to keep track of the process id to kill with helm tiller stop
.
As I wrote earlier, one of the reasons I want this feature is to be able to start multiple tiller instances for different cluster/namespaces (I just realized, that this is more than the title says and probably worth its own issue). I played with this a bit and failed. The problem is, that tiller does not support this. While you can configure its grpc address, the probe address and the trace address are fixed.
So, starting a second instance of tiller fails with:
./bin/tiller --listen=127.0.0.1:9999
[main] 2018/11/27 15:24:31 Starting Tiller v2.11.0 (tls=false)
[main] 2018/11/27 15:24:31 GRPC listening on 127.0.0.1:9999
[main] 2018/11/27 15:24:31 Probes listening on :44135
[main] 2018/11/27 15:24:31 Storage driver is ConfigMap
[main] 2018/11/27 15:24:31 Max history per release is 0
[main] 2018/11/27 15:24:31 Probes server died: listen tcp :44135: bind: address already in use
there is an issue opened for that helm/helm#3159 so no multiple tillers until it get fixed upstream
I think we can close this issue :)
if/when tiller is fixed I will make such feature available :)