Skip to content

Commit

Permalink
add sorting of routers to TestBuildLocalApp to get rid of the flaking
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Nov 2, 2023
1 parent 3d09a18 commit 2570ba7
Show file tree
Hide file tree
Showing 10 changed files with 314 additions and 484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,73 @@
{
"filterChainMatch": {
"applicationProtocols": [
"consul~tcp"
"consul~grpc"
]
},
"filters": [
{
"name": "envoy.filters.network.rbac",
"name": "envoy.filters.network.http_connection_manager",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.rbac.v3.RBAC",
"rules": {
"policies": {
"consul-intentions-layer4": {
"permissions": [
{
"any": true
}
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"statPrefix": "public_listener",
"routeConfig": {
"name": "public_listener:grpc",
"virtualHosts": [
{
"name": "public_listener:grpc",
"domains": [
"*"
],
"principals": [
"routes": [
{
"authenticated": {
"principalName": {
"safeRegex": {
"googleRe2": {},
"regex": "^spiffe://foo.consul/ap/default/ns/default/identity/foo$"
}
}
"match": {
"prefix": "/"
},
"route": {
"cluster": "local_app:grpc"
}
}
]
}
]
},
"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"
}
}
],
"tracing": {
"randomSampling": {}
},
"statPrefix": "connect_authz"
}
},
{
"name": "envoy.filters.network.tcp_proxy",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy",
"statPrefix": "public_listener",
"cluster": "local_app:tcp"
"http2ProtocolOptions": {},
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
]
}
}
],
Expand All @@ -77,7 +104,11 @@
"trustedCa": {
"inlineString": "some-root\nsome-other-root\n"
}
}
},
"alpnProtocols": [
"h2",
"http/1.1"
]
},
"requireClientCertificate": true
}
Expand Down Expand Up @@ -121,29 +152,7 @@
"name": "envoy.filters.http.rbac",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC",
"rules": {
"policies": {
"consul-intentions-layer4": {
"permissions": [
{
"any": true
}
],
"principals": [
{
"authenticated": {
"principalName": {
"safeRegex": {
"googleRe2": {},
"regex": "^spiffe://foo.consul/ap/default/ns/default/identity/foo$"
}
}
}
}
]
}
}
}
"rules": {}
}
},
{
Expand Down Expand Up @@ -231,29 +240,7 @@
"name": "envoy.filters.http.rbac",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC",
"rules": {
"policies": {
"consul-intentions-layer4": {
"permissions": [
{
"any": true
}
],
"principals": [
{
"authenticated": {
"principalName": {
"safeRegex": {
"googleRe2": {},
"regex": "^spiffe://foo.consul/ap/default/ns/default/identity/foo$"
}
}
}
}
]
}
}
}
"rules": {}
}
},
{
Expand Down Expand Up @@ -308,95 +295,24 @@
{
"filterChainMatch": {
"applicationProtocols": [
"consul~grpc"
"consul~tcp"
]
},
"filters": [
{
"name": "envoy.filters.network.http_connection_manager",
"name": "envoy.filters.network.rbac",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"@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",
"statPrefix": "public_listener",
"routeConfig": {
"name": "public_listener:grpc",
"virtualHosts": [
{
"name": "public_listener:grpc",
"domains": [
"*"
],
"routes": [
{
"match": {
"prefix": "/"
},
"route": {
"cluster": "local_app:grpc"
}
}
]
}
]
},
"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": {
"policies": {
"consul-intentions-layer4": {
"permissions": [
{
"any": true
}
],
"principals": [
{
"authenticated": {
"principalName": {
"safeRegex": {
"googleRe2": {},
"regex": "^spiffe://foo.consul/ap/default/ns/default/identity/foo$"
}
}
}
}
]
}
}
}
}
},
{
"name": "envoy.filters.http.router",
"typedConfig": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
}
}
],
"tracing": {
"randomSampling": {}
},
"http2ProtocolOptions": {},
"upgradeConfigs": [
{
"upgradeType": "websocket"
}
]
"cluster": "local_app:tcp"
}
}
],
Expand All @@ -420,11 +336,7 @@
"trustedCa": {
"inlineString": "some-root\nsome-other-root\n"
}
},
"alpnProtocols": [
"h2",
"http/1.1"
]
}
},
"requireClientCertificate": true
}
Expand Down
Loading

0 comments on commit 2570ba7

Please sign in to comment.