-
Notifications
You must be signed in to change notification settings - Fork 53
add destination rules for sequencer high performance gRPC #3402
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -635,6 +635,60 @@ function configurePublicInfo(ingressNs: k8s.core.v1.Namespace): k8s.apiextension | |
| : []; | ||
| } | ||
|
|
||
| function configureSequencerHighPerformanceGrpcDestinationRules( | ||
| ingressNs: k8s.core.v1.Namespace | ||
| ): Array<k8s.apiextensions.CustomResource> { | ||
| return [ | ||
| ...(function* () { | ||
| for (const migration of DecentralizedSynchronizerUpgradeConfig.runningMigrations()) { | ||
| for (const sv of coreSvsToDeploy) { | ||
| yield configureSequencerHighPerformanceGrpcDestinationRule( | ||
| ingressNs, | ||
| sv.ingressName, | ||
| migration.id | ||
| ); | ||
| } | ||
| } | ||
| })(), | ||
| ]; | ||
| } | ||
|
|
||
| function configureSequencerHighPerformanceGrpcDestinationRule( | ||
| ingressNs: k8s.core.v1.Namespace, | ||
| ingressName: string, | ||
| migrationId: number | ||
| ): k8s.apiextensions.CustomResource { | ||
| const sequencerName = `global-domain-${migrationId}-sequencer`; | ||
| const ruleName = `${ingressName}-${sequencerName}-high-perf-grpc-rule`; | ||
| return new k8s.apiextensions.CustomResource(ruleName, { | ||
| apiVersion: 'networking.istio.io/v1beta1', | ||
| kind: 'DestinationRule', | ||
| metadata: { | ||
| name: ruleName, | ||
| namespace: ingressNs.metadata.name, | ||
| }, | ||
| spec: { | ||
| host: `${sequencerName}.${ingressName}.svc.cluster.local`, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be clear: The intention here is to use k8s-internal addresses, not the external one we define via If so... can't you just check on a scratchnet cluster or CILR if you got the hostname right? I'd launch a shell on some validator pod and try reaching the endpoint from there via curl or grpcurl. (Not very confident about the networking stuff here myself...) |
||
| trafficPolicy: { | ||
| loadBalancer: { | ||
| simple: 'LEAST_REQUEST', | ||
| }, | ||
| connectionPool: { | ||
| http: { | ||
| http1MaxPendingRequests: 10000, | ||
| http2MaxRequests: 10000, | ||
| maxConcurrentStreams: 10000, | ||
| maxRequestsPerConnection: 0, | ||
| }, | ||
| tcp: { | ||
| maxConnections: 10000, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| }); | ||
| } | ||
|
|
||
| export function configureIstio( | ||
| ingressNs: ExactNamespace, | ||
| ingressIp: pulumi.Output<string>, | ||
|
|
@@ -653,7 +707,10 @@ export function configureIstio( | |
| const gateways = configureGateway(ingressNs, gwSvc, cometBftSvc); | ||
| const docsAndReleases = configureDocsAndReleases(true, gateways); | ||
| const publicInfo = configurePublicInfo(ingressNs.ns); | ||
| return [...gateways, ...docsAndReleases, ...publicInfo]; | ||
| const sequencerHighPerformanceGrpcRules = configureSequencerHighPerformanceGrpcDestinationRules( | ||
| ingressNs.ns | ||
| ); | ||
| return [...gateways, ...docsAndReleases, ...publicInfo, ...sequencerHighPerformanceGrpcRules]; | ||
| } | ||
|
|
||
| export function istioMonitoring( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not
allSvsToDeploy? I guess it doesn't matter for MainNet (only core SVs there), but for consistency?