Skip to content

Commit

Permalink
fix: remove error-pushed config
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiwency committed Aug 19, 2024
1 parent f60d8f4 commit b277553
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/dataprotection/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func main() {
userAgent string
)

flag.String(metricsAddrFlagKey.String(), ":8083", "The address the metric endpoint binds to.")
flag.String(metricsAddrFlagKey.String(), ":8080", "The address the metric endpoint binds to.")
flag.String(probeAddrFlagKey.String(), ":8081", "The address the probe endpoint binds to.")
flag.Bool(leaderElectFlagKey.String(), false,
"Enable leader election for controller manager. "+
Expand Down Expand Up @@ -184,7 +184,7 @@ func main() {
viper.OnConfigChange(func(e fsnotify.Event) {
setupLog.Info(fmt.Sprintf("config file changed: %s", e.Name))
})
// viper.WatchConfig()
viper.WatchConfig()

metricsAddr = viper.GetString(metricsAddrFlagKey.viperName())
probeAddr = viper.GetString(probeAddrFlagKey.viperName())
Expand Down
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (r flagName) viperName() string {

func setupFlags() {
flag.String(metricsAddrFlagKey.String(), ":8080", "The address the metric endpoint binds to.")
flag.String(probeAddrFlagKey.String(), ":8082", "The address the probe endpoint binds to.")
flag.String(probeAddrFlagKey.String(), ":8081", "The address the probe endpoint binds to.")
flag.Bool(leaderElectFlagKey.String(), false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
Expand Down Expand Up @@ -288,7 +288,7 @@ func main() {
viper.OnConfigChange(func(e fsnotify.Event) {
setupLog.Info(fmt.Sprintf("config file changed: %s", e.Name))
})
// viper.WatchConfig()
viper.WatchConfig()

setupLog.Info(fmt.Sprintf("config settings: %v", viper.AllSettings()))
if err := validateRequiredToParseConfigs(); err != nil {
Expand Down

0 comments on commit b277553

Please sign in to comment.