diff --git a/cluster/expected/infra/expected.json b/cluster/expected/infra/expected.json index 0eab55315a..63a97f8f78 100644 --- a/cluster/expected/infra/expected.json +++ b/cluster/expected/infra/expected.json @@ -1459,6 +1459,54 @@ "protocol": "TCP", "targetPort": 26316 }, + { + "name": "cometbft-3-2-gw", + "port": 26326, + "protocol": "TCP", + "targetPort": 26326 + }, + { + "name": "cometbft-3-3-gw", + "port": 26336, + "protocol": "TCP", + "targetPort": 26336 + }, + { + "name": "cometbft-3-4-gw", + "port": 26346, + "protocol": "TCP", + "targetPort": 26346 + }, + { + "name": "cometbft-3-5-gw", + "port": 26356, + "protocol": "TCP", + "targetPort": 26356 + }, + { + "name": "cometbft-3-6-gw", + "port": 26366, + "protocol": "TCP", + "targetPort": 26366 + }, + { + "name": "cometbft-3-7-gw", + "port": 26376, + "protocol": "TCP", + "targetPort": 26376 + }, + { + "name": "cometbft-3-8-gw", + "port": 26386, + "protocol": "TCP", + "targetPort": 26386 + }, + { + "name": "cometbft-3-9-gw", + "port": 26396, + "protocol": "TCP", + "targetPort": 26396 + }, { "name": "cometbft-4-0-gw", "port": 26406, @@ -1470,6 +1518,54 @@ "port": 26416, "protocol": "TCP", "targetPort": 26416 + }, + { + "name": "cometbft-4-2-gw", + "port": 26426, + "protocol": "TCP", + "targetPort": 26426 + }, + { + "name": "cometbft-4-3-gw", + "port": 26436, + "protocol": "TCP", + "targetPort": 26436 + }, + { + "name": "cometbft-4-4-gw", + "port": 26446, + "protocol": "TCP", + "targetPort": 26446 + }, + { + "name": "cometbft-4-5-gw", + "port": 26456, + "protocol": "TCP", + "targetPort": 26456 + }, + { + "name": "cometbft-4-6-gw", + "port": 26466, + "protocol": "TCP", + "targetPort": 26466 + }, + { + "name": "cometbft-4-7-gw", + "port": 26476, + "protocol": "TCP", + "targetPort": 26476 + }, + { + "name": "cometbft-4-8-gw", + "port": 26486, + "protocol": "TCP", + "targetPort": 26486 + }, + { + "name": "cometbft-4-9-gw", + "port": 26496, + "protocol": "TCP", + "targetPort": 26496 } ] }, diff --git a/cluster/pulumi/common-sv/src/synchronizer/cometBftNodeConfigs.ts b/cluster/pulumi/common-sv/src/synchronizer/cometBftNodeConfigs.ts index 474ee1e1d2..af7b394b28 100644 --- a/cluster/pulumi/common-sv/src/synchronizer/cometBftNodeConfigs.ts +++ b/cluster/pulumi/common-sv/src/synchronizer/cometBftNodeConfigs.ts @@ -37,7 +37,7 @@ export class CometBftNodeConfigs { privateKey: staticConf.privateKey, identifier: this.nodeIdentifier, externalAddress: this.p2pExternalAddress(staticConf.nodeIndex), - istioPort: istioCometbftExternalPort(this._domainMigrationId, staticConf.nodeIndex), + istioPort: this.istioExternalPort(staticConf.nodeIndex), retainBlocks: staticConf.retainBlocks, validator: staticConf.validator, }; @@ -82,13 +82,13 @@ export class CometBftNodeConfigs { } private p2pExternalAddress(nodeIndex: number): string { - return `${CLUSTER_HOSTNAME}:${istioCometbftExternalPort(this._domainMigrationId, nodeIndex)}`; + return `${CLUSTER_HOSTNAME}:${this.istioExternalPort(nodeIndex)}`; } -} -export const istioCometbftExternalPort = (migrationId: number, nodeIndex: number): number => { - // TODO(DACH-NY/canton-network-node#10482) Revisit port scheme - return nodeIndex >= 10 - ? Number(`26${migrationId}${nodeIndex}`) - : Number(`26${migrationId}${nodeIndex}6`); -}; + private istioExternalPort(nodeIndex: number) { + // TODO(#10482) Revisit port scheme + return nodeIndex >= 10 + ? Number(`26${this._domainMigrationId}${nodeIndex}`) + : Number(`26${this._domainMigrationId}${nodeIndex}6`); + } +} diff --git a/cluster/pulumi/infra/src/istio.ts b/cluster/pulumi/infra/src/istio.ts index 67e8814fd7..0d01288504 100644 --- a/cluster/pulumi/infra/src/istio.ts +++ b/cluster/pulumi/infra/src/istio.ts @@ -3,14 +3,12 @@ import * as k8s from '@pulumi/kubernetes'; import * as pulumi from '@pulumi/pulumi'; import { local } from '@pulumi/command'; -import { dsoSize, istioCometbftExternalPort } from 'splice-pulumi-common-sv'; import { spliceConfig } from 'splice-pulumi-common/src/config/config'; import { PodMonitor, ServiceMonitor } from 'splice-pulumi-common/src/metrics'; import { activeVersion, DecentralizedSynchronizerUpgradeConfig, - DeploySvRunbook, ExactNamespace, getDnsNames, HELM_MAX_HISTORY_SIZE, @@ -159,16 +157,11 @@ function configureInternalGatewayService( const externalIPRanges = loadIPRanges(); // see notes when installing a CometBft node in the full deployment const cometBftIngressPorts = DecentralizedSynchronizerUpgradeConfig.runningMigrations() - .map(migrationInfo => migrationInfo.id) + .map(m => m.id) .flatMap((domain: number) => { - return (DeploySvRunbook ? [0] : []) - .concat(Array.from(Array(dsoSize).keys()).map(n => n + 1)) - .map(node => { - return ingressPort( - `cometbft-${domain}-${node}-gw`, - istioCometbftExternalPort(domain, node) - ); - }); + return Array.from(Array(10).keys()).map(node => { + return ingressPort(`cometbft-${domain}-${node}-gw`, Number(`26${domain}${node}6`)); + }); }); return configureGatewayService( ingressNs,