mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
fix(deployment): configure loadBalancerPolicy correctly in envoy (#7938)
This commit is contained in:
parent
742f50c52e
commit
f042e51bc3
2 changed files with 9 additions and 2 deletions
|
|
@ -102,6 +102,7 @@ export function deployProxy({
|
||||||
path: '/usage',
|
path: '/usage',
|
||||||
service: usage.service,
|
service: usage.service,
|
||||||
retriable: true,
|
retriable: true,
|
||||||
|
loadBalancerPolicy: 'WeightedLeastRequest',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.registerService({ record: environment.apiDns }, [
|
.registerService({ record: environment.apiDns }, [
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,12 @@ export class Proxy {
|
||||||
requestTimeout?: `${number}s` | 'infinity';
|
requestTimeout?: `${number}s` | 'infinity';
|
||||||
idleTimeout?: `${number}s`;
|
idleTimeout?: `${number}s`;
|
||||||
retriable?: boolean;
|
retriable?: boolean;
|
||||||
|
loadBalancerPolicy?:
|
||||||
|
| 'WeightedLeastRequest'
|
||||||
|
| 'RoundRobin'
|
||||||
|
| 'Random'
|
||||||
|
| 'RequestHash'
|
||||||
|
| 'Cookie';
|
||||||
customRewrite?: string;
|
customRewrite?: string;
|
||||||
virtualHost?: Output<string>;
|
virtualHost?: Output<string>;
|
||||||
httpsUpstream?: boolean;
|
httpsUpstream?: boolean;
|
||||||
|
|
@ -153,9 +159,9 @@ export class Proxy {
|
||||||
port: route.service.spec.ports[0].port,
|
port: route.service.spec.ports[0].port,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// https://projectcontour.io/docs/1.29/config/request-routing/#session-affinity
|
// https://projectcontour.io/docs/1.31/config/request-routing/
|
||||||
loadBalancerPolicy: {
|
loadBalancerPolicy: {
|
||||||
strategy: 'Cookie',
|
strategy: route.loadBalancerPolicy ?? 'RoundRobin',
|
||||||
},
|
},
|
||||||
// https://projectcontour.io/docs/1.29/config/rate-limiting/#local-rate-limiting
|
// https://projectcontour.io/docs/1.29/config/rate-limiting/#local-rate-limiting
|
||||||
rateLimitPolicy: route.rateLimit
|
rateLimitPolicy: route.rateLimit
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue