internal: update tenant certificates on outpost refresh

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-12-23 00:38:49 +01:00
parent 6f32eeea43
commit 87e99625e6
3 changed files with 15 additions and 1 deletions

View File

@ -116,6 +116,9 @@ func attemptProxyStart(ws *web.WebServer, u *url.URL) {
tw := tenant_tls.NewWatcher(ac.Client)
go tw.Start()
ws.TenantTLS = tw
ac.AddRefreshHandler(func() {
tw.Check()
})
srv := proxyv2.NewProxyServer(ac, 0)
ws.ProxyServer = srv