-
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.
NET-6081 - xds controller golden file inputs into xds resources - sou…
…rces (#19250) * NET-5397 - wire up golden tests from sidecar-proxy controller for xds controller and xdsv2 * WIP * WIP * everything matching except leafCerts. need to mock those * single port destinations working except mixed destinations * golden test input to xds controller tests for destinations * proposed fix for failover group naming errors * clean up test to use helper. * clean up test to use helper. * fix test file * add docstring for test function. * add docstring for test function. * fix linting error * fixing test after route fix merged into main * first source test works * WIP * modify all source files * source tests pass * fixing tests after bug fix in main * got first destination working. * adding destinations * fix docstring for test * fixing tests after bug fix in main * adding source proxies * fixing tests after bug fix in main * got first destination working. * adding destinations * fix docstring for test * fixing tests after bug fix in main * got first destination working. * adding destinations * fix docstring for test * fixing tests after bug fix in main
- Loading branch information
Showing
41 changed files
with
2,871 additions
and
11 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
31 changes: 31 additions & 0 deletions
31
.../xdsv2/testdata/clusters/source/l4-multiple-workload-addresses-with-specific-ports.golden
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,31 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:port1", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "local_app:port1", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"nonce": "00000001" | ||
} |
31 changes: 31 additions & 0 deletions
31
agent/xdsv2/testdata/clusters/source/l4-multiple-workload-addresses-without-ports.golden
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,31 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:port1", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "local_app:port1", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"nonce": "00000001" | ||
} |
31 changes: 31 additions & 0 deletions
31
agent/xdsv2/testdata/clusters/source/l4-single-workload-address-without-ports.golden
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,31 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:port1", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "local_app:port1", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"nonce": "00000001" | ||
} |
79 changes: 79 additions & 0 deletions
79
agent/xdsv2/testdata/clusters/source/l7-expose-paths.golden
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,79 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "exposed_cluster_9090", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "exposed_cluster_9090", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 9090 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "exposed_cluster_9091", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "exposed_cluster_9091", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 9091 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:port1", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "local_app:port1", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"nonce": "00000001" | ||
} |
119 changes: 119 additions & 0 deletions
119
agent/xdsv2/testdata/clusters/source/local-and-inbound-connections.golden
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,119 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "exposed_cluster_9090", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "exposed_cluster_9090", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 9090 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "exposed_cluster_9091", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "exposed_cluster_9091", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 9091 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:port1", | ||
"type": "STATIC", | ||
"connectTimeout": "6s", | ||
"loadAssignment": { | ||
"clusterName": "local_app:port1", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"circuitBreakers": { | ||
"thresholds": [ | ||
{ | ||
"maxConnections": 123 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:port3", | ||
"type": "STATIC", | ||
"connectTimeout": "8s", | ||
"loadAssignment": { | ||
"clusterName": "local_app:port3", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8081 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"circuitBreakers": { | ||
"thresholds": [ | ||
{ | ||
"maxConnections": 123 | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"nonce": "00000001" | ||
} |
55 changes: 55 additions & 0 deletions
55
...tdata/clusters/source/multiport-l4-multiple-workload-addresses-with-specific-ports.golden
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,55 @@ | ||
{ | ||
"versionInfo": "00000001", | ||
"resources": [ | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:admin-port", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "local_app:admin-port", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 8080 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"name": "local_app:api-port", | ||
"type": "STATIC", | ||
"loadAssignment": { | ||
"clusterName": "local_app:api-port", | ||
"endpoints": [ | ||
{ | ||
"lbEndpoints": [ | ||
{ | ||
"endpoint": { | ||
"address": { | ||
"socketAddress": { | ||
"address": "127.0.0.1", | ||
"portValue": 9090 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"typeUrl": "type.googleapis.com/envoy.config.cluster.v3.Cluster", | ||
"nonce": "00000001" | ||
} |
Oops, something went wrong.