Skip to content

Commit

Permalink
Merge pull request #20630 from ramr/router-blueprints-fix
Browse files Browse the repository at this point in the history
router dynamic config manager fix to use the cloned blueprint
  • Loading branch information
openshift-merge-robot authored Aug 15, 2018
2 parents 568c838 + 1afa797 commit c9f30d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/router/template/configmanager/haproxy/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ func (cm *haproxyConfigManager) AddBlueprint(route *routeapi.Route) {
newRoute.Spec.Host = r.Spec.Host
if !reflect.DeepEqual(r, newRoute) {
updated = true
blueprints = append(blueprints, route.DeepCopy())
blueprints = append(blueprints, newRoute)
continue
}
}
blueprints = append(blueprints, r)
}

if !routeExists {
blueprints = append(blueprints, route.DeepCopy())
blueprints = append(blueprints, newRoute)
updated = true
}

Expand All @@ -234,7 +234,7 @@ func (cm *haproxyConfigManager) AddBlueprint(route *routeapi.Route) {
cm.blueprintRoutes = blueprints
cm.lock.Unlock()

cm.provisionRoutePool(route)
cm.provisionRoutePool(newRoute)
}

// RemoveBlueprint removes a route blueprint.
Expand Down Expand Up @@ -264,7 +264,7 @@ func (cm *haproxyConfigManager) RemoveBlueprint(route *routeapi.Route) {
cm.blueprintRoutes = blueprints
cm.lock.Unlock()

cm.removeRoutePool(route)
cm.removeRoutePool(deletedRoute)
}

// Register registers an id with an expected haproxy backend for a route.
Expand Down

0 comments on commit c9f30d1

Please sign in to comment.