From bd431474fd03c1c649d76f3dbbaaa1a69a78cfa5 Mon Sep 17 00:00:00 2001 From: John Murret Date: Fri, 3 Nov 2023 16:38:37 -0600 Subject: [PATCH 1/2] migrate expose checks and paths tests to resources_test.go --- agent/xds/clusters_test.go | 44 ----- agent/xds/listeners_test.go | 55 ------ agent/xds/resources_test.go | 91 +++++++++ .../clusters/expose-checks-grpc.latest.golden | 65 +++++++ ...ecks-http-with-bind-override.latest.golden | 57 ++++++ .../clusters/expose-checks-http.latest.golden | 57 ++++++ ...am-service-with-unix-sockets.latest.golden | 75 ++++++++ .../expose-checks-grpc.latest.golden | 5 + ...ecks-http-with-bind-override.latest.golden | 5 + .../expose-checks-http.latest.golden | 5 + .../endpoints/expose-checks.latest.golden | 27 +++ ...paths-grpc-new-cluster-http1.latest.golden | 27 +++ ...expose-paths-local-app-paths.latest.golden | 5 + ...pose-paths-new-cluster-http2.latest.golden | 27 +++ ...am-service-with-unix-sockets.latest.golden | 115 +++++++++++ .../listeners/expose-checks.latest.golden | 142 ++++++++++++++ ...paths-grpc-new-cluster-http1.latest.golden | 179 ++++++++++++++++++ ...am-service-with-unix-sockets.latest.golden | 5 + .../routes/expose-checks-grpc.latest.golden | 5 + ...ecks-http-with-bind-override.latest.golden | 5 + .../routes/expose-checks-http.latest.golden | 5 + .../routes/expose-checks.latest.golden | 30 +++ ...paths-grpc-new-cluster-http1.latest.golden | 53 ++++++ ...expose-paths-local-app-paths.latest.golden | 53 ++++++ ...pose-paths-new-cluster-http2.latest.golden | 53 ++++++ ...am-service-with-unix-sockets.latest.golden | 5 + .../secrets/expose-checks-grpc.latest.golden | 5 + ...ecks-http-with-bind-override.latest.golden | 5 + .../secrets/expose-checks-http.latest.golden | 5 + .../secrets/expose-checks.latest.golden | 5 + ...paths-grpc-new-cluster-http1.latest.golden | 5 + ...expose-paths-local-app-paths.latest.golden | 5 + ...pose-paths-new-cluster-http2.latest.golden | 5 + 33 files changed, 1131 insertions(+), 99 deletions(-) create mode 100644 agent/xds/testdata/clusters/expose-checks-grpc.latest.golden create mode 100644 agent/xds/testdata/clusters/expose-checks-http-with-bind-override.latest.golden create mode 100644 agent/xds/testdata/clusters/expose-checks-http.latest.golden create mode 100644 agent/xds/testdata/endpoints/downstream-service-with-unix-sockets.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-checks-grpc.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-checks-http-with-bind-override.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-checks-http.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-checks.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-paths-local-app-paths.latest.golden create mode 100644 agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden create mode 100644 agent/xds/testdata/listeners/downstream-service-with-unix-sockets.latest.golden create mode 100644 agent/xds/testdata/listeners/expose-checks.latest.golden create mode 100644 agent/xds/testdata/listeners/expose-paths-grpc-new-cluster-http1.latest.golden create mode 100644 agent/xds/testdata/routes/downstream-service-with-unix-sockets.latest.golden create mode 100644 agent/xds/testdata/routes/expose-checks-grpc.latest.golden create mode 100644 agent/xds/testdata/routes/expose-checks-http-with-bind-override.latest.golden create mode 100644 agent/xds/testdata/routes/expose-checks-http.latest.golden create mode 100644 agent/xds/testdata/routes/expose-checks.latest.golden create mode 100644 agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden create mode 100644 agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden create mode 100644 agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden create mode 100644 agent/xds/testdata/secrets/downstream-service-with-unix-sockets.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-checks-grpc.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-checks-http-with-bind-override.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-checks-http.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-checks.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-paths-grpc-new-cluster-http1.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-paths-local-app-paths.latest.golden create mode 100644 agent/xds/testdata/secrets/expose-paths-new-cluster-http2.latest.golden diff --git a/agent/xds/clusters_test.go b/agent/xds/clusters_test.go index 956044c4a41..264caf9e75b 100644 --- a/agent/xds/clusters_test.go +++ b/agent/xds/clusters_test.go @@ -394,50 +394,6 @@ func TestClustersFromSnapshot(t *testing.T) { }, alsoRunTestForV2: true, }, - { - name: "expose-paths-local-app-paths", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotExposeConfig(t, nil) - }, - alsoRunTestForV2: true, - }, - { - name: "downstream-service-with-unix-sockets", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshot(t, func(ns *structs.NodeService) { - ns.Address = "" - ns.Port = 0 - ns.Proxy.LocalServiceAddress = "" - ns.Proxy.LocalServicePort = 0 - ns.Proxy.LocalServiceSocketPath = "/tmp/downstream_proxy.sock" - }, nil) - }, - alsoRunTestForV2: true, - }, - { - name: "expose-paths-new-cluster-http2", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotExposeConfig(t, func(ns *structs.NodeService) { - ns.Proxy.Expose.Paths[1] = structs.ExposePath{ - LocalPathPort: 9090, - Path: "/grpc.health.v1.Health/Check", - ListenerPort: 21501, - Protocol: "http2", - } - }) - }, - alsoRunTestForV2: true, - }, - { - name: "expose-checks", - create: proxycfg.TestConfigSnapshotExposeChecks, - alsoRunTestForV2: true, - }, - { - name: "expose-paths-grpc-new-cluster-http1", - create: proxycfg.TestConfigSnapshotGRPCExposeHTTP1, - alsoRunTestForV2: true, - }, { name: "mesh-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { diff --git a/agent/xds/listeners_test.go b/agent/xds/listeners_test.go index cc014bb8346..8f5ca143595 100644 --- a/agent/xds/listeners_test.go +++ b/agent/xds/listeners_test.go @@ -398,61 +398,6 @@ func TestListenersFromSnapshot(t *testing.T) { }, alsoRunTestForV2: true, }, - { - name: "expose-paths-local-app-paths", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotExposeConfig(t, nil) - }, - }, - { - name: "expose-paths-new-cluster-http2", - create: func(t testinf.T) *proxycfg.ConfigSnapshot { - return proxycfg.TestConfigSnapshotExposeConfig(t, func(ns *structs.NodeService) { - ns.Proxy.Expose.Paths[1] = structs.ExposePath{ - LocalPathPort: 9090, - Path: "/grpc.health.v1.Health/Check", - ListenerPort: 21501, - Protocol: "http2", - } - }) - }, - }, - { - // NOTE: if IPv6 is not supported in the kernel per - // platform.SupportsIPv6() then this test will fail because the golden - // files were generated assuming ipv6 support was present - name: "expose-checks-http", - create: proxycfg.TestConfigSnapshotExposeChecks, - generatorSetup: func(s *ResourceGenerator) { - s.CfgFetcher = configFetcherFunc(func() string { - return "192.0.2.1" - }) - }, - }, - { - // NOTE: if IPv6 is not supported in the kernel per - // platform.SupportsIPv6() then this test will fail because the golden - // files were generated assuming ipv6 support was present - name: "expose-checks-http-with-bind-override", - create: proxycfg.TestConfigSnapshotExposeChecksWithBindOverride, - generatorSetup: func(s *ResourceGenerator) { - s.CfgFetcher = configFetcherFunc(func() string { - return "192.0.2.1" - }) - }, - }, - { - // NOTE: if IPv6 is not supported in the kernel per - // platform.SupportsIPv6() then this test will fail because the golden - // files were generated assuming ipv6 support was present - name: "expose-checks-grpc", - create: proxycfg.TestConfigSnapshotExposeChecksGRPC, - generatorSetup: func(s *ResourceGenerator) { - s.CfgFetcher = configFetcherFunc(func() string { - return "192.0.2.1" - }) - }, - }, { name: "mesh-gateway", create: func(t testinf.T) *proxycfg.ConfigSnapshot { diff --git a/agent/xds/resources_test.go b/agent/xds/resources_test.go index b5fdd570d11..54421de1d3d 100644 --- a/agent/xds/resources_test.go +++ b/agent/xds/resources_test.go @@ -276,6 +276,7 @@ func TestAllResourcesFromSnapshot(t *testing.T) { tests = append(tests, getTrafficControlPeeringGoldenTestCases(false)...) tests = append(tests, getEnterpriseGoldenTestCases(t)...) tests = append(tests, getAPIGatewayGoldenTestCases(t)...) + tests = append(tests, getExposePathGoldenTestCases()...) latestEnvoyVersion := xdscommon.EnvoyVersions[0] for _, envoyVersion := range xdscommon.EnvoyVersions { @@ -1045,3 +1046,93 @@ func getAPIGatewayGoldenTestCases(t *testing.T) []goldenTestCase { }, } } + +func getExposePathGoldenTestCases() []goldenTestCase { + return []goldenTestCase{ + { + name: "expose-paths-local-app-paths", + create: func(t testinf.T) *proxycfg.ConfigSnapshot { + return proxycfg.TestConfigSnapshotExposeConfig(t, nil) + }, + alsoRunTestForV2: true, + }, + { + name: "downstream-service-with-unix-sockets", + create: func(t testinf.T) *proxycfg.ConfigSnapshot { + return proxycfg.TestConfigSnapshot(t, func(ns *structs.NodeService) { + ns.Address = "" + ns.Port = 0 + ns.Proxy.LocalServiceAddress = "" + ns.Proxy.LocalServicePort = 0 + ns.Proxy.LocalServiceSocketPath = "/tmp/downstream_proxy.sock" + }, nil) + }, + alsoRunTestForV2: true, + }, + { + name: "expose-paths-new-cluster-http2", + create: func(t testinf.T) *proxycfg.ConfigSnapshot { + return proxycfg.TestConfigSnapshotExposeConfig(t, func(ns *structs.NodeService) { + ns.Proxy.Expose.Paths[1] = structs.ExposePath{ + LocalPathPort: 9090, + Path: "/grpc.health.v1.Health/Check", + ListenerPort: 21501, + Protocol: "http2", + } + }) + }, + alsoRunTestForV2: true, + }, + { + name: "expose-checks", + create: proxycfg.TestConfigSnapshotExposeChecks, + generatorSetup: func(s *ResourceGenerator) { + s.CfgFetcher = configFetcherFunc(func() string { + return "192.0.2.1" + }) + }, + alsoRunTestForV2: true, + }, + { + name: "expose-paths-grpc-new-cluster-http1", + create: proxycfg.TestConfigSnapshotGRPCExposeHTTP1, + alsoRunTestForV2: true, + }, + { + // NOTE: if IPv6 is not supported in the kernel per + // platform.SupportsIPv6() then this test will fail because the golden + // files were generated assuming ipv6 support was present + name: "expose-checks-http", + create: proxycfg.TestConfigSnapshotExposeChecks, + generatorSetup: func(s *ResourceGenerator) { + s.CfgFetcher = configFetcherFunc(func() string { + return "192.0.2.1" + }) + }, + }, + { + // NOTE: if IPv6 is not supported in the kernel per + // platform.SupportsIPv6() then this test will fail because the golden + // files were generated assuming ipv6 support was present + name: "expose-checks-http-with-bind-override", + create: proxycfg.TestConfigSnapshotExposeChecksWithBindOverride, + generatorSetup: func(s *ResourceGenerator) { + s.CfgFetcher = configFetcherFunc(func() string { + return "192.0.2.1" + }) + }, + }, + { + // NOTE: if IPv6 is not supported in the kernel per + // platform.SupportsIPv6() then this test will fail because the golden + // files were generated assuming ipv6 support was present + name: "expose-checks-grpc", + create: proxycfg.TestConfigSnapshotExposeChecksGRPC, + generatorSetup: func(s *ResourceGenerator) { + s.CfgFetcher = configFetcherFunc(func() string { + return "192.0.2.1" + }) + }, + }, + } +} diff --git a/agent/xds/testdata/clusters/expose-checks-grpc.latest.golden b/agent/xds/testdata/clusters/expose-checks-grpc.latest.golden new file mode 100644 index 00000000000..0c94321dbb6 --- /dev/null +++ b/agent/xds/testdata/clusters/expose-checks-grpc.latest.golden @@ -0,0 +1,65 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "exposed_cluster_9090", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 9090 + } + } + } + } + ] + } + ] + }, + "name": "exposed_cluster_9090", + "type": "STATIC", + "typedExtensionProtocolOptions": { + "envoy.extensions.upstreams.http.v3.HttpProtocolOptions": { + "@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions", + "explicitHttpConfig": { + "http2ProtocolOptions": {} + } + } + } + }, + { + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "local_app", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8080 + } + } + } + } + ] + } + ] + }, + "name": "local_app", + "type": "STATIC" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/expose-checks-http-with-bind-override.latest.golden b/agent/xds/testdata/clusters/expose-checks-http-with-bind-override.latest.golden new file mode 100644 index 00000000000..59d8b46b80e --- /dev/null +++ b/agent/xds/testdata/clusters/expose-checks-http-with-bind-override.latest.golden @@ -0,0 +1,57 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "exposed_cluster_8181", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8181 + } + } + } + } + ] + } + ] + }, + "name": "exposed_cluster_8181", + "type": "STATIC" + }, + { + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "local_app", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8080 + } + } + } + } + ] + } + ] + }, + "name": "local_app", + "type": "STATIC" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/clusters/expose-checks-http.latest.golden b/agent/xds/testdata/clusters/expose-checks-http.latest.golden new file mode 100644 index 00000000000..59d8b46b80e --- /dev/null +++ b/agent/xds/testdata/clusters/expose-checks-http.latest.golden @@ -0,0 +1,57 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "exposed_cluster_8181", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8181 + } + } + } + } + ] + } + ] + }, + "name": "exposed_cluster_8181", + "type": "STATIC" + }, + { + "@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "connectTimeout": "5s", + "loadAssignment": { + "clusterName": "local_app", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8080 + } + } + } + } + ] + } + ] + }, + "name": "local_app", + "type": "STATIC" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/downstream-service-with-unix-sockets.latest.golden b/agent/xds/testdata/endpoints/downstream-service-with-unix-sockets.latest.golden new file mode 100644 index 00000000000..b4372a3439e --- /dev/null +++ b/agent/xds/testdata/endpoints/downstream-service-with-unix-sockets.latest.golden @@ -0,0 +1,75 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "clusterName": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "10.10.1.1", + "portValue": 8080 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + }, + { + "endpoint": { + "address": { + "socketAddress": { + "address": "10.10.1.2", + "portValue": 8080 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + }, + { + "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "clusterName": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "10.10.1.1", + "portValue": 8080 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + }, + { + "endpoint": { + "address": { + "socketAddress": { + "address": "10.20.1.2", + "portValue": 8080 + } + } + }, + "healthStatus": "HEALTHY", + "loadBalancingWeight": 1 + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-checks-grpc.latest.golden b/agent/xds/testdata/endpoints/expose-checks-grpc.latest.golden new file mode 100644 index 00000000000..96ee5c70946 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-checks-grpc.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-checks-http-with-bind-override.latest.golden b/agent/xds/testdata/endpoints/expose-checks-http-with-bind-override.latest.golden new file mode 100644 index 00000000000..96ee5c70946 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-checks-http-with-bind-override.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-checks-http.latest.golden b/agent/xds/testdata/endpoints/expose-checks-http.latest.golden new file mode 100644 index 00000000000..96ee5c70946 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-checks-http.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-checks.latest.golden b/agent/xds/testdata/endpoints/expose-checks.latest.golden new file mode 100644 index 00000000000..9009fa5f5b0 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-checks.latest.golden @@ -0,0 +1,27 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "clusterName": "exposed_cluster_8181", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8181 + } + } + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden b/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden new file mode 100644 index 00000000000..26689771477 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden @@ -0,0 +1,27 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "clusterName": "exposed_cluster_8090", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 8090 + } + } + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-paths-local-app-paths.latest.golden b/agent/xds/testdata/endpoints/expose-paths-local-app-paths.latest.golden new file mode 100644 index 00000000000..96ee5c70946 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-paths-local-app-paths.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden b/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden new file mode 100644 index 00000000000..7db6153ab55 --- /dev/null +++ b/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden @@ -0,0 +1,27 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "clusterName": "exposed_cluster_9090", + "endpoints": [ + { + "lbEndpoints": [ + { + "endpoint": { + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 9090 + } + } + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/downstream-service-with-unix-sockets.latest.golden b/agent/xds/testdata/listeners/downstream-service-with-unix-sockets.latest.golden new file mode 100644 index 00000000000..78526457cc9 --- /dev/null +++ b/agent/xds/testdata/listeners/downstream-service-with-unix-sockets.latest.golden @@ -0,0 +1,115 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "127.0.0.1", + "portValue": 9191 + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.tcp_proxy", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", + "cluster": "db.default.dc1.internal.11111111-2222-3333-4444-555555555555.consul", + "statPrefix": "upstream.db.default.default.dc1" + } + } + ] + } + ], + "name": "db:127.0.0.1:9191", + "trafficDirection": "OUTBOUND" + }, + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "127.10.10.10", + "portValue": 8181 + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.tcp_proxy", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", + "cluster": "geo-cache.default.dc1.query.11111111-2222-3333-4444-555555555555.consul", + "statPrefix": "upstream.prepared_query_geo-cache" + } + } + ] + } + ], + "name": "prepared_query:geo-cache:127.10.10.10:8181", + "trafficDirection": "OUTBOUND" + }, + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "0.0.0.0", + "portValue": 0 + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.rbac", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", + "rules": {}, + "statPrefix": "connect_authz" + } + }, + { + "name": "envoy.filters.network.tcp_proxy", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", + "cluster": "local_app", + "statPrefix": "public_listener" + } + } + ], + "transportSocket": { + "name": "tls", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", + "commonTlsContext": { + "tlsCertificates": [ + { + "certificateChain": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" + }, + "privateKey": { + "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" + } + } + ], + "tlsParams": {}, + "validationContext": { + "trustedCa": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" + } + } + }, + "requireClientCertificate": true + } + } + } + ], + "name": "public_listener:0.0.0.0:0", + "trafficDirection": "INBOUND" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/expose-checks.latest.golden b/agent/xds/testdata/listeners/expose-checks.latest.golden new file mode 100644 index 00000000000..379fc2ca27a --- /dev/null +++ b/agent/xds/testdata/listeners/expose-checks.latest.golden @@ -0,0 +1,142 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "1.2.3.4", + "portValue": 21500 + } + }, + "filterChains": [ + { + "filterChainMatch": { + "sourcePrefixRanges": [ + { + "addressPrefix": "127.0.0.1", + "prefixLen": 8 + }, + { + "addressPrefix": "10.10.10.10", + "prefixLen": 32 + }, + { + "addressPrefix": "::1", + "prefixLen": 128 + } + ] + }, + "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" + } + } + ], + "routeConfig": { + "name": "exposed_path_filter_debug_21500", + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_debug_21500", + "routes": [ + { + "match": { + "path": "/debug" + }, + "route": { + "cluster": "exposed_cluster_8181" + } + } + ] + } + ] + }, + "statPrefix": "exposed_path_filter_debug_21500", + "tracing": { + "randomSampling": {} + }, + "upgradeConfigs": [ + { + "upgradeType": "websocket" + } + ] + } + } + ] + } + ], + "name": "exposed_path_debug:1.2.3.4:21500", + "trafficDirection": "INBOUND" + }, + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "1.2.3.4", + "portValue": 8080 + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.rbac", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC", + "rules": {}, + "statPrefix": "connect_authz" + } + }, + { + "name": "envoy.filters.network.tcp_proxy", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy", + "cluster": "local_app", + "statPrefix": "public_listener" + } + } + ], + "transportSocket": { + "name": "tls", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", + "commonTlsContext": { + "tlsCertificates": [ + { + "certificateChain": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" + }, + "privateKey": { + "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" + } + } + ], + "tlsParams": {}, + "validationContext": { + "trustedCa": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" + } + } + }, + "requireClientCertificate": true + } + } + } + ], + "name": "public_listener:1.2.3.4:8080", + "trafficDirection": "INBOUND" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/listeners/expose-paths-grpc-new-cluster-http1.latest.golden b/agent/xds/testdata/listeners/expose-paths-grpc-new-cluster-http1.latest.golden new file mode 100644 index 00000000000..90cb383d20c --- /dev/null +++ b/agent/xds/testdata/listeners/expose-paths-grpc-new-cluster-http1.latest.golden @@ -0,0 +1,179 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "1.2.3.4", + "portValue": 21500 + } + }, + "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" + } + } + ], + "routeConfig": { + "name": "exposed_path_filter_healthz_21500", + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_healthz_21500", + "routes": [ + { + "match": { + "path": "/healthz" + }, + "route": { + "cluster": "exposed_cluster_8090" + } + } + ] + } + ] + }, + "statPrefix": "exposed_path_filter_healthz_21500", + "tracing": { + "randomSampling": {} + }, + "upgradeConfigs": [ + { + "upgradeType": "websocket" + } + ] + } + } + ] + } + ], + "name": "exposed_path_healthz:1.2.3.4:21500", + "trafficDirection": "INBOUND" + }, + { + "@type": "type.googleapis.com/envoy.config.listener.v3.Listener", + "address": { + "socketAddress": { + "address": "1.2.3.4", + "portValue": 8080 + } + }, + "filterChains": [ + { + "filters": [ + { + "name": "envoy.filters.network.http_connection_manager", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager", + "http2ProtocolOptions": {}, + "httpFilters": [ + { + "name": "envoy.filters.http.grpc_stats", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.grpc_stats.v3.FilterConfig", + "statsForAllMethods": true + } + }, + { + "name": "envoy.filters.http.grpc_http1_bridge", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.grpc_http1_bridge.v3.Config" + } + }, + { + "name": "envoy.filters.http.rbac", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC", + "rules": {} + } + }, + { + "name": "envoy.filters.http.router", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router" + } + } + ], + "routeConfig": { + "name": "public_listener", + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "public_listener", + "routes": [ + { + "match": { + "prefix": "/" + }, + "route": { + "cluster": "local_app" + } + } + ] + } + ] + }, + "statPrefix": "public_listener", + "tracing": { + "randomSampling": {} + }, + "upgradeConfigs": [ + { + "upgradeType": "websocket" + } + ] + } + } + ], + "transportSocket": { + "name": "tls", + "typedConfig": { + "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext", + "commonTlsContext": { + "alpnProtocols": [ + "h2", + "http/1.1" + ], + "tlsCertificates": [ + { + "certificateChain": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICjDCCAjKgAwIBAgIIC5llxGV1gB8wCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowDjEMMAoG\nA1UEAxMDd2ViMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEADPv1RHVNRfa2VKR\nAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Favq5E0ivpNtv1QnFhxtPd7d5k4e+T7\nSkW1TaOCAXIwggFuMA4GA1UdDwEB/wQEAwIDuDAdBgNVHSUEFjAUBggrBgEFBQcD\nAgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADBoBgNVHQ4EYQRfN2Q6MDc6ODc6M2E6\nNDA6MTk6NDc6YzM6NWE6YzA6YmE6NjI6ZGY6YWY6NGI6ZDQ6MDU6MjU6NzY6M2Q6\nNWE6OGQ6MTY6OGQ6Njc6NWU6MmU6YTA6MzQ6N2Q6ZGM6ZmYwagYDVR0jBGMwYYBf\nZDE6MTE6MTE6YWM6MmE6YmE6OTc6YjI6M2Y6YWM6N2I6YmQ6ZGE6YmU6YjE6OGE6\nZmM6OWE6YmE6YjU6YmM6ODM6ZTc6NWU6NDE6NmY6ZjI6NzM6OTU6NTg6MGM6ZGIw\nWQYDVR0RBFIwUIZOc3BpZmZlOi8vMTExMTExMTEtMjIyMi0zMzMzLTQ0NDQtNTU1\nNTU1NTU1NTU1LmNvbnN1bC9ucy9kZWZhdWx0L2RjL2RjMS9zdmMvd2ViMAoGCCqG\nSM49BAMCA0gAMEUCIGC3TTvvjj76KMrguVyFf4tjOqaSCRie3nmHMRNNRav7AiEA\npY0heYeK9A6iOLrzqxSerkXXQyj5e9bE4VgUnxgPU6g=\n-----END CERTIFICATE-----\n" + }, + "privateKey": { + "inlineString": "-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIMoTkpRggp3fqZzFKh82yS4LjtJI+XY+qX/7DefHFrtdoAoGCCqGSM49\nAwEHoUQDQgAEADPv1RHVNRfa2VKRAB16b6rZnEt7tuhaxCFpQXPj7M2omb0B9Fav\nq5E0ivpNtv1QnFhxtPd7d5k4e+T7SkW1TQ==\n-----END EC PRIVATE KEY-----\n" + } + } + ], + "tlsParams": {}, + "validationContext": { + "trustedCa": { + "inlineString": "-----BEGIN CERTIFICATE-----\nMIICXDCCAgKgAwIBAgIICpZq70Z9LyUwCgYIKoZIzj0EAwIwFDESMBAGA1UEAxMJ\nVGVzdCBDQSAyMB4XDTE5MDMyMjEzNTgyNloXDTI5MDMyMjEzNTgyNlowFDESMBAG\nA1UEAxMJVGVzdCBDQSAyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIhywH1gx\nAsMwuF3ukAI5YL2jFxH6Usnma1HFSfVyxbXX1/uoZEYrj8yCAtdU2yoHETyd+Zx2\nThhRLP79pYegCaOCATwwggE4MA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTAD\nAQH/MGgGA1UdDgRhBF9kMToxMToxMTphYzoyYTpiYTo5NzpiMjozZjphYzo3Yjpi\nZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1ZTo0MTo2ZjpmMjo3\nMzo5NTo1ODowYzpkYjBqBgNVHSMEYzBhgF9kMToxMToxMTphYzoyYTpiYTo5Nzpi\nMjozZjphYzo3YjpiZDpkYTpiZTpiMTo4YTpmYzo5YTpiYTpiNTpiYzo4MzplNzo1\nZTo0MTo2ZjpmMjo3Mzo5NTo1ODowYzpkYjA/BgNVHREEODA2hjRzcGlmZmU6Ly8x\nMTExMTExMS0yMjIyLTMzMzMtNDQ0NC01NTU1NTU1NTU1NTUuY29uc3VsMAoGCCqG\nSM49BAMCA0gAMEUCICOY0i246rQHJt8o8Oya0D5PLL1FnmsQmQqIGCi31RwnAiEA\noR5f6Ku+cig2Il8T8LJujOp2/2A72QcHZA57B13y+8o=\n-----END CERTIFICATE-----\n" + } + } + }, + "requireClientCertificate": true + } + } + } + ], + "name": "public_listener:1.2.3.4:8080", + "trafficDirection": "INBOUND" + } + ], + "typeUrl": "type.googleapis.com/envoy.config.listener.v3.Listener", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/downstream-service-with-unix-sockets.latest.golden b/agent/xds/testdata/routes/downstream-service-with-unix-sockets.latest.golden new file mode 100644 index 00000000000..8b919343d21 --- /dev/null +++ b/agent/xds/testdata/routes/downstream-service-with-unix-sockets.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-checks-grpc.latest.golden b/agent/xds/testdata/routes/expose-checks-grpc.latest.golden new file mode 100644 index 00000000000..8b919343d21 --- /dev/null +++ b/agent/xds/testdata/routes/expose-checks-grpc.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-checks-http-with-bind-override.latest.golden b/agent/xds/testdata/routes/expose-checks-http-with-bind-override.latest.golden new file mode 100644 index 00000000000..8b919343d21 --- /dev/null +++ b/agent/xds/testdata/routes/expose-checks-http-with-bind-override.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-checks-http.latest.golden b/agent/xds/testdata/routes/expose-checks-http.latest.golden new file mode 100644 index 00000000000..8b919343d21 --- /dev/null +++ b/agent/xds/testdata/routes/expose-checks-http.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-checks.latest.golden b/agent/xds/testdata/routes/expose-checks.latest.golden new file mode 100644 index 00000000000..4cfa8e7f5f1 --- /dev/null +++ b/agent/xds/testdata/routes/expose-checks.latest.golden @@ -0,0 +1,30 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "exposed_path_filter_debug_21500", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_debug_21500", + "routes": [ + { + "match": { + "path": "/debug" + }, + "route": { + "cluster": "exposed_cluster_8181" + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden b/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden new file mode 100644 index 00000000000..c3f3c39d68d --- /dev/null +++ b/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden @@ -0,0 +1,53 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "exposed_path_filter_healthz_21500", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_healthz_21500", + "routes": [ + { + "match": { + "path": "/healthz" + }, + "route": { + "cluster": "exposed_cluster_8090" + } + } + ] + } + ] + }, + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "public_listener", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "public_listener", + "routes": [ + { + "match": { + "prefix": "/" + }, + "route": { + "cluster": "local_app" + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden b/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden new file mode 100644 index 00000000000..1b8a78c5ee4 --- /dev/null +++ b/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden @@ -0,0 +1,53 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "exposed_path_filter_health1_21500", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_health1_21500", + "routes": [ + { + "match": { + "path": "/health1" + }, + "route": { + "cluster": "local_app" + } + } + ] + } + ] + }, + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "exposed_path_filter_health2_21501", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_health2_21501", + "routes": [ + { + "match": { + "path": "/health2" + }, + "route": { + "cluster": "local_app" + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden b/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden new file mode 100644 index 00000000000..3e843fa5c5a --- /dev/null +++ b/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden @@ -0,0 +1,53 @@ +{ + "nonce": "00000001", + "resources": [ + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "exposed_path_filter_grpchealthv1HealthCheck_21501", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_grpchealthv1HealthCheck_21501", + "routes": [ + { + "match": { + "path": "/grpc.health.v1.Health/Check" + }, + "route": { + "cluster": "exposed_cluster_9090" + } + } + ] + } + ] + }, + { + "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "name": "exposed_path_filter_health1_21500", + "validateClusters": true, + "virtualHosts": [ + { + "domains": [ + "*" + ], + "name": "exposed_path_filter_health1_21500", + "routes": [ + { + "match": { + "path": "/health1" + }, + "route": { + "cluster": "local_app" + } + } + ] + } + ] + } + ], + "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/downstream-service-with-unix-sockets.latest.golden b/agent/xds/testdata/secrets/downstream-service-with-unix-sockets.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/downstream-service-with-unix-sockets.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-checks-grpc.latest.golden b/agent/xds/testdata/secrets/expose-checks-grpc.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-checks-grpc.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-checks-http-with-bind-override.latest.golden b/agent/xds/testdata/secrets/expose-checks-http-with-bind-override.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-checks-http-with-bind-override.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-checks-http.latest.golden b/agent/xds/testdata/secrets/expose-checks-http.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-checks-http.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-checks.latest.golden b/agent/xds/testdata/secrets/expose-checks.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-checks.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-paths-grpc-new-cluster-http1.latest.golden b/agent/xds/testdata/secrets/expose-paths-grpc-new-cluster-http1.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-paths-grpc-new-cluster-http1.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-paths-local-app-paths.latest.golden b/agent/xds/testdata/secrets/expose-paths-local-app-paths.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-paths-local-app-paths.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file diff --git a/agent/xds/testdata/secrets/expose-paths-new-cluster-http2.latest.golden b/agent/xds/testdata/secrets/expose-paths-new-cluster-http2.latest.golden new file mode 100644 index 00000000000..82e45650658 --- /dev/null +++ b/agent/xds/testdata/secrets/expose-paths-new-cluster-http2.latest.golden @@ -0,0 +1,5 @@ +{ + "nonce": "00000001", + "typeUrl": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret", + "versionInfo": "00000001" +} \ No newline at end of file From aaf5563a8090d6bbffc1aa09569ad1dddf53060f Mon Sep 17 00:00:00 2001 From: John Murret Date: Mon, 6 Nov 2023 13:23:39 -0700 Subject: [PATCH 2/2] fix failing expose paths tests --- agent/xds/resources_test.go | 16 ++++--- .../endpoints/expose-checks.latest.golden | 22 --------- ...paths-grpc-new-cluster-http1.latest.golden | 22 --------- ...pose-paths-new-cluster-http2.latest.golden | 22 --------- .../listeners/expose-checks.latest.golden | 2 +- .../routes/expose-checks.latest.golden | 25 ---------- ...paths-grpc-new-cluster-http1.latest.golden | 48 ------------------- ...expose-paths-local-app-paths.latest.golden | 48 ------------------- ...pose-paths-new-cluster-http2.latest.golden | 48 ------------------- 9 files changed, 11 insertions(+), 242 deletions(-) diff --git a/agent/xds/resources_test.go b/agent/xds/resources_test.go index 54421de1d3d..7a12d37c01d 100644 --- a/agent/xds/resources_test.go +++ b/agent/xds/resources_test.go @@ -1054,7 +1054,8 @@ func getExposePathGoldenTestCases() []goldenTestCase { create: func(t testinf.T) *proxycfg.ConfigSnapshot { return proxycfg.TestConfigSnapshotExposeConfig(t, nil) }, - alsoRunTestForV2: true, + // TODO(jm): enable with https://github.com/hashicorp/consul/pull/19459 + alsoRunTestForV2: false, }, { name: "downstream-service-with-unix-sockets", @@ -1081,7 +1082,8 @@ func getExposePathGoldenTestCases() []goldenTestCase { } }) }, - alsoRunTestForV2: true, + // TODO(jm): enable with https://github.com/hashicorp/consul/pull/19459 + alsoRunTestForV2: false, }, { name: "expose-checks", @@ -1091,12 +1093,14 @@ func getExposePathGoldenTestCases() []goldenTestCase { return "192.0.2.1" }) }, - alsoRunTestForV2: true, + // TODO(jm): enable with https://github.com/hashicorp/consul/pull/19459 + alsoRunTestForV2: false, }, { - name: "expose-paths-grpc-new-cluster-http1", - create: proxycfg.TestConfigSnapshotGRPCExposeHTTP1, - alsoRunTestForV2: true, + name: "expose-paths-grpc-new-cluster-http1", + create: proxycfg.TestConfigSnapshotGRPCExposeHTTP1, + // TODO(jm): enable with https://github.com/hashicorp/consul/pull/19459 + alsoRunTestForV2: false, }, { // NOTE: if IPv6 is not supported in the kernel per diff --git a/agent/xds/testdata/endpoints/expose-checks.latest.golden b/agent/xds/testdata/endpoints/expose-checks.latest.golden index 9009fa5f5b0..96ee5c70946 100644 --- a/agent/xds/testdata/endpoints/expose-checks.latest.golden +++ b/agent/xds/testdata/endpoints/expose-checks.latest.golden @@ -1,27 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "exposed_cluster_8181", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8181 - } - } - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", "versionInfo": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden b/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden index 26689771477..96ee5c70946 100644 --- a/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden +++ b/agent/xds/testdata/endpoints/expose-paths-grpc-new-cluster-http1.latest.golden @@ -1,27 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "exposed_cluster_8090", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 8090 - } - } - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", "versionInfo": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden b/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden index 7db6153ab55..96ee5c70946 100644 --- a/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden +++ b/agent/xds/testdata/endpoints/expose-paths-new-cluster-http2.latest.golden @@ -1,27 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", - "clusterName": "exposed_cluster_9090", - "endpoints": [ - { - "lbEndpoints": [ - { - "endpoint": { - "address": { - "socketAddress": { - "address": "127.0.0.1", - "portValue": 9090 - } - } - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment", "versionInfo": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/listeners/expose-checks.latest.golden b/agent/xds/testdata/listeners/expose-checks.latest.golden index 379fc2ca27a..2299f061dde 100644 --- a/agent/xds/testdata/listeners/expose-checks.latest.golden +++ b/agent/xds/testdata/listeners/expose-checks.latest.golden @@ -18,7 +18,7 @@ "prefixLen": 8 }, { - "addressPrefix": "10.10.10.10", + "addressPrefix": "192.0.2.1", "prefixLen": 32 }, { diff --git a/agent/xds/testdata/routes/expose-checks.latest.golden b/agent/xds/testdata/routes/expose-checks.latest.golden index 4cfa8e7f5f1..8b919343d21 100644 --- a/agent/xds/testdata/routes/expose-checks.latest.golden +++ b/agent/xds/testdata/routes/expose-checks.latest.golden @@ -1,30 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "exposed_path_filter_debug_21500", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "exposed_path_filter_debug_21500", - "routes": [ - { - "match": { - "path": "/debug" - }, - "route": { - "cluster": "exposed_cluster_8181" - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", "versionInfo": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden b/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden index c3f3c39d68d..8b919343d21 100644 --- a/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden +++ b/agent/xds/testdata/routes/expose-paths-grpc-new-cluster-http1.latest.golden @@ -1,53 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "exposed_path_filter_healthz_21500", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "exposed_path_filter_healthz_21500", - "routes": [ - { - "match": { - "path": "/healthz" - }, - "route": { - "cluster": "exposed_cluster_8090" - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "public_listener", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "public_listener", - "routes": [ - { - "match": { - "prefix": "/" - }, - "route": { - "cluster": "local_app" - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", "versionInfo": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden b/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden index 1b8a78c5ee4..8b919343d21 100644 --- a/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden +++ b/agent/xds/testdata/routes/expose-paths-local-app-paths.latest.golden @@ -1,53 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "exposed_path_filter_health1_21500", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "exposed_path_filter_health1_21500", - "routes": [ - { - "match": { - "path": "/health1" - }, - "route": { - "cluster": "local_app" - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "exposed_path_filter_health2_21501", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "exposed_path_filter_health2_21501", - "routes": [ - { - "match": { - "path": "/health2" - }, - "route": { - "cluster": "local_app" - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", "versionInfo": "00000001" } \ No newline at end of file diff --git a/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden b/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden index 3e843fa5c5a..8b919343d21 100644 --- a/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden +++ b/agent/xds/testdata/routes/expose-paths-new-cluster-http2.latest.golden @@ -1,53 +1,5 @@ { "nonce": "00000001", - "resources": [ - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "exposed_path_filter_grpchealthv1HealthCheck_21501", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "exposed_path_filter_grpchealthv1HealthCheck_21501", - "routes": [ - { - "match": { - "path": "/grpc.health.v1.Health/Check" - }, - "route": { - "cluster": "exposed_cluster_9090" - } - } - ] - } - ] - }, - { - "@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", - "name": "exposed_path_filter_health1_21500", - "validateClusters": true, - "virtualHosts": [ - { - "domains": [ - "*" - ], - "name": "exposed_path_filter_health1_21500", - "routes": [ - { - "match": { - "path": "/health1" - }, - "route": { - "cluster": "local_app" - } - } - ] - } - ] - } - ], "typeUrl": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration", "versionInfo": "00000001" } \ No newline at end of file