From 2dcfb324bce682e63bd6c980555e8695c6b5578c Mon Sep 17 00:00:00 2001 From: Alva Zhang <140438385+Alva8756@users.noreply.github.com> Date: Tue, 7 May 2024 19:52:01 -0700 Subject: [PATCH] Read FleetDB endpoint by viper --- internal/app/app.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/app/app.go b/internal/app/app.go index 8983ee8..b2be66b 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -129,6 +129,10 @@ func envVarOverrides(v *viper.Viper, cfg *Configuration) error { return errors.New("no listen address set") } + if v.GetString("fleetdb.endpoint") != "" { + cfg.FleetDBAPIOptions.Endpoint = v.GetString("fleetdb.endpoint") + } + if v.GetString("fleetdb.disable.oauth") != "" { cfg.FleetDBAPIOptions.DisableOAuth = v.GetBool("fleetdb.disable.oauth") }