-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xds: tcp services using the discovery chain should not assume RDS dur…
…ing LDS (#6623) Previously the logic for configuring RDS during LDS for L7 upstreams was overapplied to TCP proxies resulting in a cluster name of <emptystring> being used incorrectly. Fixes #6621
- Loading branch information
Showing
15 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/config_entries.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
enable_central_service_config = true | ||
|
||
config_entries { | ||
bootstrap { | ||
kind = "proxy-defaults" | ||
name = "global" | ||
|
||
config { | ||
protocol = "tcp" | ||
} | ||
} | ||
|
||
bootstrap { | ||
kind = "service-resolver" | ||
name = "s2" | ||
|
||
redirect { | ||
service = "s3" | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/s3.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services { | ||
name = "s3" | ||
port = 8282 | ||
connect { sidecar_service {} } | ||
} |
11 changes: 11 additions & 0 deletions
11
test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -eEuo pipefail | ||
|
||
# wait for bootstrap to apply config entries | ||
wait_for_config_entry proxy-defaults global | ||
wait_for_config_entry service-resolver s2 | ||
|
||
gen_envoy_bootstrap s1 19000 primary | ||
gen_envoy_bootstrap s2 19001 primary | ||
gen_envoy_bootstrap s3 19002 primary |
3 changes: 3 additions & 0 deletions
3
test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/vars.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
export REQUIRED_SERVICES="$DEFAULT_REQUIRED_SERVICES s3 s3-sidecar-proxy" |
46 changes: 46 additions & 0 deletions
46
test/integration/connect/envoy/case-cfg-resolver-svc-redirect-tcp/verify.bats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helpers | ||
|
||
@test "s1 proxy admin is up on :19000" { | ||
retry_default curl -f -s localhost:19000/stats -o /dev/null | ||
} | ||
|
||
@test "s2 proxy admin is up on :19001" { | ||
retry_default curl -f -s localhost:19001/stats -o /dev/null | ||
} | ||
|
||
@test "s3 proxy admin is up on :19002" { | ||
retry_default curl -f -s localhost:19002/stats -o /dev/null | ||
} | ||
|
||
@test "s1 proxy listener should be up and have right cert" { | ||
assert_proxy_presents_cert_uri localhost:21000 s1 | ||
} | ||
|
||
@test "s2 proxy listener should be up and have right cert" { | ||
assert_proxy_presents_cert_uri localhost:21001 s2 | ||
} | ||
|
||
@test "s3 proxy listener should be up and have right cert" { | ||
assert_proxy_presents_cert_uri localhost:21002 s3 | ||
} | ||
|
||
@test "s3 proxy should be healthy" { | ||
assert_service_has_healthy_instances s3 1 | ||
} | ||
|
||
@test "s1 upstream should have healthy endpoints for s3" { | ||
assert_upstream_has_endpoints_in_status 127.0.0.1:19000 s3.default.primary HEALTHY 1 | ||
} | ||
|
||
@test "s1 upstream should be able to connect to its upstream simply" { | ||
run retry_default curl -s -f -d hello localhost:5000 | ||
[ "$status" -eq 0 ] | ||
[ "$output" = "hello" ] | ||
} | ||
|
||
@test "s1 upstream should be able to connect to s3 via upstream s2" { | ||
assert_expected_fortio_name s3 | ||
} | ||
|