Skip to content

Commit 6b699c8

Browse files
authored
feat(translator): remove absent healthy endpoints (#6478)
* feat(translator): remove absent healthy endpoints Signed-off-by: Guy Daich <guy.daich@sap.com>
1 parent 1737078 commit 6b699c8

File tree

47 files changed

+62
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+62
-3
lines changed

internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@
386386
"connectTimeout": "10s",
387387
"dnsLookupFamily": "V4_PREFERRED",
388388
"dnsRefreshRate": "30s",
389+
"ignoreHealthOnHostRemoval": true,
389390
"lbPolicy": "LEAST_REQUEST",
390391
"loadAssignment": {
391392
"clusterName": "raw_githubusercontent_com_443",

internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ xds:
218218
connectTimeout: 10s
219219
dnsLookupFamily: V4_PREFERRED
220220
dnsRefreshRate: 30s
221+
ignoreHealthOnHostRemoval: true
221222
lbPolicy: LEAST_REQUEST
222223
loadAssignment:
223224
clusterName: raw_githubusercontent_com_443

internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.cluster.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ xds:
4444
connectTimeout: 10s
4545
dnsLookupFamily: V4_PREFERRED
4646
dnsRefreshRate: 30s
47+
ignoreHealthOnHostRemoval: true
4748
lbPolicy: LEAST_REQUEST
4849
loadAssignment:
4950
clusterName: raw_githubusercontent_com_443

internal/xds/translator/cluster.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ func buildXdsCluster(args *xdsClusterArgs) (*buildClusterResult, error) {
150150
CommonLbConfig: &clusterv3.Cluster_CommonLbConfig{},
151151
PerConnectionBufferLimitBytes: buildBackandConnectionBufferLimitBytes(args.backendConnection),
152152
Metadata: buildXdsMetadata(args.metadata),
153+
// Dont wait for a health check to determine health and remove these endpoints
154+
// if the endpoint has been removed via EDS by the control plane or removed from DNS query results
155+
IgnoreHealthOnHostRemoval: true,
153156
}
154157

155158
if args.statName != nil {
@@ -414,9 +417,6 @@ func buildXdsCluster(args *xdsClusterArgs) (*buildClusterResult, error) {
414417
},
415418
},
416419
}
417-
// Dont wait for a health check to determine health and remove these endpoints
418-
// if the endpoint has been removed via EDS by the control plane
419-
cluster.IgnoreHealthOnHostRemoval = true
420420
default:
421421
cluster.ClusterDiscoveryType = &clusterv3.Cluster_Type{Type: clusterv3.Cluster_STRICT_DNS}
422422
cluster.DnsRefreshRate = durationpb.New(30 * time.Second)

internal/xds/translator/testdata/out/xds-ir/accesslog-cel.clusters.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
connectTimeout: 10s
3030
dnsLookupFamily: V4_PREFERRED
3131
dnsRefreshRate: 30s
32+
ignoreHealthOnHostRemoval: true
3233
lbPolicy: LEAST_REQUEST
3334
loadAssignment:
3435
clusterName: accesslog-0

internal/xds/translator/testdata/out/xds-ir/accesslog-endpoint-stats.clusters.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
connectTimeout: 10s
3232
dnsLookupFamily: V4_PREFERRED
3333
dnsRefreshRate: 30s
34+
ignoreHealthOnHostRemoval: true
3435
lbPolicy: LEAST_REQUEST
3536
loadAssignment:
3637
clusterName: accesslog-0

internal/xds/translator/testdata/out/xds-ir/accesslog-formatters.clusters.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
connectTimeout: 10s
3030
dnsLookupFamily: V4_PREFERRED
3131
dnsRefreshRate: 30s
32+
ignoreHealthOnHostRemoval: true
3233
lbPolicy: LEAST_REQUEST
3334
loadAssignment:
3435
clusterName: accesslog-0

internal/xds/translator/testdata/out/xds-ir/accesslog-multi-cel.clusters.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
connectTimeout: 10s
3030
dnsLookupFamily: V4_PREFERRED
3131
dnsRefreshRate: 30s
32+
ignoreHealthOnHostRemoval: true
3233
lbPolicy: LEAST_REQUEST
3334
loadAssignment:
3435
clusterName: accesslog-0

internal/xds/translator/testdata/out/xds-ir/accesslog-types.clusters.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
connectTimeout: 10s
216216
dnsLookupFamily: V4_PREFERRED
217217
dnsRefreshRate: 30s
218+
ignoreHealthOnHostRemoval: true
218219
lbPolicy: LEAST_REQUEST
219220
loadAssignment:
220221
clusterName: accesslog_otel_0_3
@@ -255,6 +256,7 @@
255256
connectTimeout: 10s
256257
dnsLookupFamily: V4_PREFERRED
257258
dnsRefreshRate: 30s
259+
ignoreHealthOnHostRemoval: true
258260
lbPolicy: LEAST_REQUEST
259261
loadAssignment:
260262
clusterName: accesslog_otel_1_3
@@ -295,6 +297,7 @@
295297
connectTimeout: 10s
296298
dnsLookupFamily: V4_PREFERRED
297299
dnsRefreshRate: 30s
300+
ignoreHealthOnHostRemoval: true
298301
lbPolicy: LEAST_REQUEST
299302
loadAssignment:
300303
clusterName: accesslog_otel_2_3

internal/xds/translator/testdata/out/xds-ir/accesslog-with-format.clusters.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
connectTimeout: 10s
6161
dnsLookupFamily: V4_PREFERRED
6262
dnsRefreshRate: 30s
63+
ignoreHealthOnHostRemoval: true
6364
lbPolicy: LEAST_REQUEST
6465
loadAssignment:
6566
clusterName: accesslog-0

0 commit comments

Comments
 (0)