Closed maxandersen closed 7 months ago
I like your idea of "only if tunnel-name" is used.
updated to use tunnel-name to trigger using explicit tunnel.
nice thing here is that global config options like region still works/win; just the tunnel settings will be force overridden by users tunnel settings.
I think we should make @melloware part of this repository so he can approve and release without me 😎
Yep I don't mind doing releases!
@maxandersen can you take care of that? I don't seem to have the karma
@gastaldi usually hooks me up with stuff like this 😄
Thanks!
this is implementing #103 but with a caveat.
Idea was that by generating config on every start and use a tunnelname users could add the ngrok specfic config if they wanted to in the default ngrok yml config.
but turns out ngrok does not support as flexible merging of configs as I expected. each tunnel is fully replaced. Also, not possible to have partial config - tunnles must specify addr to have tunneling.
meaning to have overrides take effect I must run it so the main config wins.
which this PR currently does.
It has the bad sideeffect thought that if users add any config to their ngrok.yml it will always win over whatever config quarkus has in its application.properties AND users must specify all the needed options in the main config if they want just one parameter overridden. Which feels against the principal of 'closest config should win'.
So this PR does allow users to set any config they want in a tunnel using the quarkus app name...but it does it less nicely than I had expected.
maybe should instead fallback to the old behavior and only if you set
.tunnel-name
would we run with that specifc named tunnel which you as user would need to ensure it is present in the config ?wdyt?