fix: reloading config after k8s configmap replacement (#552)

Co-authored-by: James Read <contact@jread.com>
This commit is contained in:
David Q 2025-04-05 15:28:28 -07:00 committed by GitHub
parent 2b66414a93
commit c3097e40db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

View File

@ -121,11 +121,8 @@ func initViperConfig(configDir string) {
viper.WatchConfig()
viper.OnConfigChange(func(e fsnotify.Event) {
if e.Op == fsnotify.Write {
log.Info("Config file changed:", e.String())
config.Reload(cfg)
}
log.Infof("Config file changed: %s", viper.ConfigFileUsed())
config.Reload(cfg)
})
config.Reload(cfg)