-
Notifications
You must be signed in to change notification settings - Fork 740
fix Envoy Fails to Add Router #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: "http-route" | ||
| http: | ||
| - name: "first-listener" | ||
| address: "0.0.0.0" | ||
| port: 10080 | ||
| routes: | ||
| - name: "first-route" | ||
| destinations: | ||
| - host: "1.2.3.4" | ||
| port: 50000 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| - commonLbConfig: | ||
| localityWeightedLbConfig: {} | ||
| connectTimeout: 5s | ||
| dnsLookupFamily: V4_ONLY | ||
| loadAssignment: | ||
| clusterName: cluster_first-route | ||
| endpoints: | ||
| - lbEndpoints: | ||
| - endpoint: | ||
| address: | ||
| socketAddress: | ||
| address: 1.2.3.4 | ||
| portValue: 50000 | ||
| loadBalancingWeight: 1 | ||
| locality: {} | ||
| name: cluster_first-route | ||
| outlierDetection: {} | ||
| type: STATIC |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| - address: | ||
| socketAddress: | ||
| address: 0.0.0.0 | ||
| portValue: 10080 | ||
| filterChains: | ||
| - filters: | ||
| - name: envoy.filters.network.http_connection_manager | ||
| typedConfig: | ||
| '@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
| httpFilters: | ||
| - name: envoy.filters.http.router | ||
| typedConfig: | ||
| '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
| rds: | ||
| configSource: | ||
| apiConfigSource: | ||
| apiType: GRPC | ||
| grpcServices: | ||
| - envoyGrpc: | ||
| clusterName: xds_cluster | ||
| setNodeOnFirstMessageOnly: true | ||
| transportApiVersion: V3 | ||
| resourceApiVersion: V3 | ||
| routeConfigName: route_first-listener | ||
| statPrefix: http | ||
| name: listener_first-listener_10080 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| - name: route_first-listener | ||
| virtualHosts: | ||
| - domains: | ||
| - '*' | ||
| name: route_first-listener | ||
| routes: | ||
| - match: | ||
| prefix: / | ||
| route: | ||
| cluster: cluster_first-route |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -52,6 +52,10 @@ func Translate(ir *ir.Xds) (*types.ResourceVersionTable, error) { | |||
| Domains: httpListener.Hostnames, | ||||
| } | ||||
|
|
||||
| if len(vHost.Domains) == 0 { | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. afaik this shouldnt be needed here, the Gateway API translator should have set this to Line 84 in a4773ec
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. raised #276 |
||||
| vHost.Domains = []string{"*"} | ||||
| } | ||||
|
|
||||
| for _, httpRoute := range httpListener.Routes { | ||||
| // 1:1 between IR HTTPRoute and xDS config.route.v3.Route | ||||
| xdsRoute, err := buildXdsRoute(httpRoute) | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove whitespace.