xds
xds copied to clipboard
Example of changes required to test out xds config with different envoy version
This PR shows how to validate xDS configuration pulled by different envoy version, in this case, an old 1.11.0.
Reproduction steps:
- Change the envoy version for the base image in
xdsenvoyDockerfile - Add the config you'd like to test out, in this case, it's access logs filter
- Optionally comment out the cleanup part from
runtests.shto check the logs ./runtests.sh
This will result in:
Tests failing for foo listener:
[2020-11-19 10:47:54]: Running tests
✓ /config_dump contains dynamicly configured foo cluster
✗ foo cluster response is from foo server
(in test file tests/envoy.bats, line 14)
`curl -f -s "${ENVOY_FOO_URL}" | grep "Server name: foo-"' failed
✓ /heatlhz endpoint is ok
✓ /config endpoint reports no error
✓ /v2/discovery:clusters select foo
✓ /v2/discovery:clusters select bar
✓ /v2/discovery:clusters select baz
✓ /v2/discovery:clusters select qux
✓ /v2/discovery:listeners select foo
✓ /v2/discovery:listeners select bar
✓ /v2/discovery:listeners select qux
✓ /v2/discovery:endpoints select foo
✓ /v2/discovery:endpoints select bar
✓ /v2/discovery:endpoints select qux
✓ /validate endpoint invalid configmap
✓ /validate endpoint valid configmap
✓ --validate from stdin invalid
✓ --validate from stdin valid
✓ --validate file invalid
✓ --validate file valid
20 tests, 1 failure
With a message in logs:
[2020-11-19 09:47:50.446][1][warning][config] [source/common/config/http_subscription_impl.cc:88] REST config update rejected: Error adding/updating listener(s) foo: Didn't find a registered implementation for name: 'envoy.access_loggers.file'