Skip to content

Commit

Permalink
Use the cloned blueprint with the correct blueprint namespace in
Browse files Browse the repository at this point in the history
add/remove/provision - sorta works but the route namespaces are off
and creates cleanup issues.
fixes bugz #1614727
  • Loading branch information
ramr committed Aug 13, 2018
1 parent 709f28a commit 1afa797
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 1afa797

Please sign in to comment.