Skip to content
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

NET-6081 - xds controller golden file inputs into xds resources - sources #19250

Merged
merged 38 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f142c77
NET-5397 - wire up golden tests from sidecar-proxy controller for xds…
jmurret Oct 12, 2023
79eadd1
WIP
jmurret Oct 13, 2023
d269c63
WIP
jmurret Oct 13, 2023
532aad4
everything matching except leafCerts. need to mock those
jmurret Oct 16, 2023
2de83d4
single port destinations working except mixed destinations
jmurret Oct 16, 2023
c8af477
golden test input to xds controller tests for destinations
jmurret Oct 16, 2023
8822109
proposed fix for failover group naming errors
jmurret Oct 16, 2023
6a1e6c3
clean up test to use helper.
jmurret Oct 16, 2023
f8c81b6
clean up test to use helper.
jmurret Oct 16, 2023
ec5af3c
fix test file
jmurret Oct 16, 2023
854a6e1
add docstring for test function.
jmurret Oct 16, 2023
2b01f73
add docstring for test function.
jmurret Oct 16, 2023
b5fa4f2
fix linting error
jmurret Oct 17, 2023
e7ff94b
fixing test after route fix merged into main
jmurret Oct 24, 2023
bab15a9
first source test works
jmurret Oct 16, 2023
ca3240a
WIP
jmurret Oct 16, 2023
17a76f6
modify all source files
jmurret Oct 16, 2023
eb8e27c
source tests pass
jmurret Oct 16, 2023
de5a7c0
fixing tests after bug fix in main
jmurret Oct 24, 2023
2185dd6
got first destination working.
jmurret Oct 17, 2023
35254ef
adding destinations
jmurret Oct 17, 2023
4e8ccd9
fix docstring for test
jmurret Oct 17, 2023
89ea385
fixing tests after bug fix in main
jmurret Oct 24, 2023
384bab1
adding source proxies
jmurret Oct 17, 2023
228c5aa
fixing tests after bug fix in main
jmurret Oct 24, 2023
773b742
Merge branch 'main' into jm/NET-6079
jmurret Oct 24, 2023
11f9b13
got first destination working.
jmurret Oct 17, 2023
0df2569
adding destinations
jmurret Oct 17, 2023
e0c908c
fix docstring for test
jmurret Oct 17, 2023
4c4920f
fixing tests after bug fix in main
jmurret Oct 24, 2023
0eaa8d1
Merge branch 'jm/NET-6080' into jm/NET-6081
jmurret Oct 24, 2023
6540aaa
Merge branch 'main' into jm/NET-6079
jmurret Oct 24, 2023
6dc25ac
got first destination working.
jmurret Oct 17, 2023
68ed6df
adding destinations
jmurret Oct 17, 2023
77980be
fix docstring for test
jmurret Oct 17, 2023
577252a
fixing tests after bug fix in main
jmurret Oct 24, 2023
b181abe
Merge branch 'jm/NET-6080' into jm/NET-6081
jmurret Oct 24, 2023
bea7bd1
Merge branch 'main' into jm/NET-6081
jmurret Oct 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions agent/xdsv2/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,16 @@ func TestAllResourcesFromIR_XDSGoldenFileInputs(t *testing.T) {
"destination/multiport-l4-and-l7-single-implicit-destination-with-multiple-workloads-tproxy",

//sources - please add in alphabetical order
//"source/l4-multiple-workload-addresses-with-specific-ports",
//"source/l4-multiple-workload-addresses-without-ports",
//"source/l4-single-workload-address-without-ports",
//"source/l7-expose-paths",
//"source/local-and-inbound-connections",
//"source/multiport-l4-multiple-workload-addresses-with-specific-ports",
//"source/multiport-l4-multiple-workload-addresses-without-ports",
//"source/multiport-l4-workload-with-only-mesh-port",
//"source/multiport-l7-multiple-workload-addresses-with-specific-ports",
//"source/multiport-l7-multiple-workload-addresses-without-ports",
//"source/multiport-l7-multiple-workload-addresses-without-ports",
"source/l4-multiple-workload-addresses-with-specific-ports",
"source/l4-multiple-workload-addresses-without-ports",
"source/l4-single-workload-address-without-ports",
"source/l7-expose-paths",
"source/local-and-inbound-connections",
"source/multiport-l4-multiple-workload-addresses-with-specific-ports",
"source/multiport-l4-multiple-workload-addresses-without-ports",
"source/multiport-l4-workload-with-only-mesh-port",
"source/multiport-l7-multiple-workload-addresses-with-specific-ports",
"source/multiport-l7-multiple-workload-addresses-without-ports",
}

for _, name := range cases {
Expand Down
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"
}
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"
}
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 agent/xdsv2/testdata/clusters/source/l7-expose-paths.golden
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"
}
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"
}
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"
}
Loading