fix: reloading config after k8s configmap replacement (#552)
Co-authored-by: James Read <contact@jread.com>
This commit is contained in:
parent
2b66414a93
commit
c3097e40db
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue