Skip to content

Commit

Permalink
add xds configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
  • Loading branch information
cnvergence committed May 7, 2024
1 parent b0aad73 commit d05738b
Show file tree
Hide file tree
Showing 136 changed files with 412 additions and 218 deletions.
7 changes: 2 additions & 5 deletions internal/gatewayapi/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,9 @@ func (t *Translator) processHTTPRouteParentRefListener(route RouteContext, route
Timeout: routeRoute.Timeout,
Retry: routeRoute.Retry,
IsHTTP2: routeRoute.IsHTTP2,
BackendWeights: routeRoute.BackendWeights,
}
// Don't bother copying over the weights unless the route has invalid backends.
if routeRoute.BackendWeights.Invalid > 0 {
hostRoute.BackendWeights = routeRoute.BackendWeights
}

perHostRoutes = append(perHostRoutes, hostRoute)
}
}
Expand Down Expand Up @@ -1171,7 +1169,6 @@ func (t *Translator) processDestination(backendRefContext BackendRefContext,
if backendFilters != nil {
httpFiltersContext := t.processFilters(backendFilters, parentRef, route, resources)
destFilters = assignDestinationFilters(httpFiltersContext)

}

ds = &ir.DestinationSetting{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/envoy-gateway/httproute-btls/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/envoy-gateway/httproute-btls/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/envoy-gateway/httproute-btls/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/envoy-gateway/httproute-btls/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/envoy-gateway/httproute-btls/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand All @@ -245,7 +245,7 @@ xdsIR:
prefix: /foo
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-2/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -382,7 +382,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-2/rule/0
settings:
Expand All @@ -406,7 +406,7 @@ xdsIR:
prefix: /route2
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
- addressType: IP
endpoints:
- host: 7.7.7.7
port: 8080
filters: {}
protocol: HTTP
weight: 1
hostname: gateway.envoyproxy.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -357,7 +357,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-2/rule/0
settings:
Expand All @@ -377,7 +377,7 @@ xdsIR:
prefix: /foo
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
circuitBreaker:
maxConnections: 2048
maxParallelRequests: 4294967295
Expand Down Expand Up @@ -304,7 +304,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
circuitBreaker:
maxConnections: 42
maxParallelRequests: 42
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -531,7 +531,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-2/rule/0
settings:
Expand Down Expand Up @@ -570,7 +570,7 @@ xdsIR:
prefix: /v2
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-3/rule/0
settings:
Expand Down Expand Up @@ -609,7 +609,7 @@ xdsIR:
prefix: /v3
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -399,7 +399,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-2/rule/0
settings:
Expand All @@ -423,7 +423,7 @@ xdsIR:
prefix: /test2
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -292,7 +292,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -322,7 +322,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -318,7 +318,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
circuitBreaker:
maxConnections: 2048
maxParallelRequests: 4294967295
Expand All @@ -206,7 +206,7 @@ xdsIR:
prefix: /
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down Expand Up @@ -298,7 +298,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: httproute/default/httproute-1/rule/0
settings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ xdsIR:
routes:
- backendWeights:
invalid: 0
valid: 0
valid: 1
destination:
name: grpcroute/default/grpcroute-1/rule/0
settings:
Expand Down
Loading

0 comments on commit d05738b

Please sign in to comment.