Skip to content

Commit

Permalink
Use updated methods that indicate that the configmap.Watcher is using…
Browse files Browse the repository at this point in the history
… an informer
  • Loading branch information
dprotaso committed Sep 12, 2018
1 parent 7d1b2b6 commit 8506e62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func main() {
sharedInformerFactory := sharedinformers.NewSharedInformerFactory(sharedClient, time.Second*30)

// Watch the logging config map and dynamically update logging levels.
configMapWatcher := configmap.NewDefaultWatcher(kubeClient, system.Namespace)
configMapWatcher := configmap.NewInformedWatcher(kubeClient, system.Namespace)
configMapWatcher.Watch(logconfig.ConfigName, logging.UpdateLevelFromConfigMap(logger, atomicLevel, logconfig.Controller, logconfig.Controller))
if err = configMapWatcher.Start(stopCh); err != nil {
logger.Fatalf("failed to start controller config map watcher: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func main() {
}

// Watch the logging config map and dynamically update logging levels.
configMapWatcher := configmap.NewDefaultWatcher(kubeClient, system.Namespace)
configMapWatcher := configmap.NewInformedWatcher(kubeClient, system.Namespace)

configMapWatcher.Watch(logconfig.ConfigName, logging.UpdateLevelFromConfigMap(logger, atomicLevel, logconfig.Webhook, logconfig.Webhook))
if err = configMapWatcher.Start(stopCh); err != nil {
Expand Down

0 comments on commit 8506e62

Please sign in to comment.