Skip to content

Commit

Permalink
Merge pull request #20559 from ramr/fix-commit-interval
Browse files Browse the repository at this point in the history
Fix for router with dynamic config changes not reloading
  • Loading branch information
openshift-merge-robot authored Aug 7, 2018
2 parents f0fba65 + 7ad74e0 commit aa0979c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/router/template/configmanager/haproxy/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,12 @@ func (cm *haproxyConfigManager) commitRouterConfig() {
cm.commitTimer = nil
cm.lock.Unlock()

// [Re]Adding a blueprint pool route triggers a router state change.
// And calling Commit ensures that the config gets written out.
// Adding (+removing) a new blueprint pool route triggers a router state
// change. And calling Commit ensures that the config gets written out.
route := createBlueprintRoute(routeapi.TLSTerminationEdge)
route.Name = fmt.Sprintf("%v-1", route.Name)
route.Name = fmt.Sprintf("%s-temp-%d", route.Name, time.Now().Unix())
cm.router.AddRoute(route)
cm.router.RemoveRoute(route)

glog.V(4).Infof("Committing associated template router ... ")
cm.router.Commit()
Expand Down

0 comments on commit aa0979c

Please sign in to comment.