Skip to content

Commit

Permalink
Allow annotation target override on gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
BadLiveware committed Jul 5, 2023
1 parent 92824f4 commit 56eb581
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,12 @@ func (c *gatewayRouteResolver) resolve(rt gatewayRoute) (map[string]endpoint.Tar
if !ok {
continue
}
for _, addr := range gw.gateway.Status.Addresses {
hostTargets[host] = append(hostTargets[host], addr.Value)
override := getTargetsFromTargetAnnotation(gw.gateway.Annotations)
hostTargets[host] = append(hostTargets[host], override...)
if override == nil {
for _, addr := range gw.gateway.Status.Addresses {
hostTargets[host] = append(hostTargets[host], addr.Value)
}
}
match = true
}
Expand Down

0 comments on commit 56eb581

Please sign in to comment.