Skip to content

Commit c1cf572

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions-f0519e3e55
2 parents faacdad + 6cf677d commit c1cf572

27 files changed

+642
-7
lines changed

internal/xds/runner/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,9 @@ func (r *Runner) translateFromSubscription(sub <-chan watchable.Snapshot[string,
333333
return
334334
}
335335

336-
// Only update the snapshot cache when there are no errors, to avoid publishing partial resources.
336+
// Only update the snapshot cache when there are no system-level errors, to avoid publishing partial resources.
337337
// This allows Envoy to continue using the previous known-good snapshot until the next successful translation.
338+
// Note: invalid EnvoyPatchPolicies are considered user-level errors and will not prevent the snapshot from being updated.
338339
if err == nil {
339340
if result.XdsResources != nil {
340341
if r.cache == nil {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
- circuitBreakers:
2+
thresholds:
3+
- maxRetries: 1024
4+
commonLbConfig: {}
5+
connectTimeout: 10s
6+
dnsLookupFamily: V4_PREFERRED
7+
edsClusterConfig:
8+
edsConfig:
9+
ads: {}
10+
resourceApiVersion: V3
11+
serviceName: first-route-dest
12+
ignoreHealthOnHostRemoval: true
13+
lbPolicy: LEAST_REQUEST
14+
loadBalancingPolicy:
15+
policies:
16+
- typedExtensionConfig:
17+
name: envoy.load_balancing_policies.least_request
18+
typedConfig:
19+
'@type': type.googleapis.com/envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest
20+
localityLbConfig:
21+
localityWeightedLbConfig: {}
22+
name: first-route-dest
23+
perConnectionBufferLimitBytes: 32768
24+
type: EDS
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- clusterName: first-route-dest
2+
endpoints:
3+
- lbEndpoints:
4+
- endpoint:
5+
address:
6+
socketAddress:
7+
address: 1.2.3.4
8+
portValue: 50000
9+
loadBalancingWeight: 1
10+
loadBalancingWeight: 1
11+
locality: {}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
- address:
2+
socketAddress:
3+
address: '::'
4+
portValue: 10080
5+
filterChains:
6+
- filters:
7+
- name: envoy.filters.network.http_connection_manager
8+
typedConfig:
9+
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
10+
commonHttpProtocolOptions:
11+
headersWithUnderscoresAction: REJECT_REQUEST
12+
http2ProtocolOptions:
13+
initialConnectionWindowSize: 1048576
14+
initialStreamWindowSize: 65536
15+
maxConcurrentStreams: 100
16+
httpFilters:
17+
- name: envoy.filters.http.router
18+
typedConfig:
19+
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
20+
suppressEnvoyHeaders: true
21+
mergeSlashes: true
22+
normalizePath: true
23+
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
24+
rds:
25+
configSource:
26+
ads: {}
27+
resourceApiVersion: V3
28+
routeConfigName: first-listener
29+
serverHeaderTransformation: PASS_THROUGH
30+
statPrefix: https-10080
31+
useRemoteAddress: true
32+
name: first-listener
33+
transportSocket:
34+
name: envoy.transport_sockets.tls
35+
typedConfig:
36+
'@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
37+
commonTlsContext:
38+
alpnProtocols:
39+
- h2
40+
- http/1.1
41+
tlsCertificateSdsSecretConfigs:
42+
- name: secret-1
43+
sdsConfig:
44+
ads: {}
45+
resourceApiVersion: V3
46+
- name: secret-2
47+
sdsConfig:
48+
ads: {}
49+
resourceApiVersion: V3
50+
disableStatefulSessionResumption: true
51+
disableStatelessSessionResumption: true
52+
maxConnectionsToAcceptPerSocketEvent: 1
53+
name: first-listener
54+
perConnectionBufferLimitBytes: 32768
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- ignorePortInHostMatching: true
2+
name: first-listener
3+
virtualHosts:
4+
- domains:
5+
- '*'
6+
name: first-listener/*
7+
routes:
8+
- match:
9+
headers:
10+
- name: user
11+
stringMatch:
12+
exact: jason
13+
prefix: /
14+
name: first-route
15+
route:
16+
cluster: first-route-dest
17+
upgradeConfigs:
18+
- upgradeType: websocket
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
- name: secret-1
2+
tlsCertificate:
3+
certificateChain:
4+
inlineBytes: Y2VydC1kYXRh
5+
privateKey:
6+
inlineBytes: a2V5LWRhdGE=
7+
- name: secret-2
8+
tlsCertificate:
9+
certificateChain:
10+
inlineBytes: Y2VydC1kYXRh
11+
privateKey:
12+
inlineBytes: a2V5LWRhdGE=
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
- circuitBreakers:
2+
thresholds:
3+
- maxRetries: 1024
4+
commonLbConfig: {}
5+
connectTimeout: 10s
6+
dnsLookupFamily: V4_PREFERRED
7+
edsClusterConfig:
8+
edsConfig:
9+
ads: {}
10+
resourceApiVersion: V3
11+
serviceName: first-route-dest
12+
ignoreHealthOnHostRemoval: true
13+
lbPolicy: LEAST_REQUEST
14+
loadBalancingPolicy:
15+
policies:
16+
- typedExtensionConfig:
17+
name: envoy.load_balancing_policies.least_request
18+
typedConfig:
19+
'@type': type.googleapis.com/envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest
20+
localityLbConfig:
21+
localityWeightedLbConfig: {}
22+
name: first-route-dest
23+
perConnectionBufferLimitBytes: 32768
24+
type: EDS
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- clusterName: first-route-dest
2+
endpoints:
3+
- lbEndpoints:
4+
- endpoint:
5+
address:
6+
socketAddress:
7+
address: 1.2.3.4
8+
portValue: 50000
9+
loadBalancingWeight: 1
10+
loadBalancingWeight: 1
11+
locality: {}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
- address:
2+
socketAddress:
3+
address: '::'
4+
portValue: 10080
5+
filterChains:
6+
- filters:
7+
- name: envoy.filters.network.http_connection_manager
8+
typedConfig:
9+
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
10+
commonHttpProtocolOptions:
11+
headersWithUnderscoresAction: REJECT_REQUEST
12+
http2ProtocolOptions:
13+
initialConnectionWindowSize: 1048576
14+
initialStreamWindowSize: 65536
15+
maxConcurrentStreams: 100
16+
httpFilters:
17+
- name: envoy.filters.http.ratelimit
18+
typedConfig:
19+
'@type': type.googleapis.com/envoy.extensions.filters.http.ratelimit.v3.RateLimit
20+
domain: eg-ratelimit
21+
failureModeDeny: true
22+
rateLimitService:
23+
grpcService:
24+
envoyGrpc:
25+
clusterName: rate-limit-cluster
26+
transportApiVersion: V3
27+
timeout: 1s
28+
- name: envoy.filters.http.router
29+
typedConfig:
30+
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
31+
suppressEnvoyHeaders: true
32+
mergeSlashes: true
33+
normalizePath: true
34+
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
35+
rds:
36+
configSource:
37+
ads: {}
38+
resourceApiVersion: V3
39+
routeConfigName: first-listener
40+
serverHeaderTransformation: PASS_THROUGH
41+
statPrefix: https-10080
42+
useRemoteAddress: true
43+
name: first-listener
44+
transportSocket:
45+
name: envoy.transport_sockets.tls
46+
typedConfig:
47+
'@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
48+
commonTlsContext:
49+
alpnProtocols:
50+
- h2
51+
- http/1.1
52+
tlsCertificateSdsSecretConfigs:
53+
- name: secret-1
54+
sdsConfig:
55+
ads: {}
56+
resourceApiVersion: V3
57+
- name: secret-2
58+
sdsConfig:
59+
ads: {}
60+
resourceApiVersion: V3
61+
disableStatefulSessionResumption: true
62+
disableStatelessSessionResumption: true
63+
maxConnectionsToAcceptPerSocketEvent: 1
64+
name: first-listener
65+
perConnectionBufferLimitBytes: 32768
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- ignorePortInHostMatching: true
2+
name: first-listener
3+
virtualHosts:
4+
- domains:
5+
- '*'
6+
name: first-listener/*
7+
routes:
8+
- match:
9+
headers:
10+
- name: user
11+
stringMatch:
12+
exact: jason
13+
prefix: /
14+
name: first-route
15+
route:
16+
cluster: first-route-dest
17+
upgradeConfigs:
18+
- upgradeType: websocket

0 commit comments

Comments
 (0)