Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions cluster/pulumi/common-sv/src/synchronizer/cometBftNodeConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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,
};
Expand Down Expand Up @@ -80,13 +80,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`);
}
}
3 changes: 1 addition & 2 deletions cluster/pulumi/infra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"@pulumi/command": "1.1.0",
"@pulumi/kubernetes-cert-manager": "0.2.0",
"@pulumiverse/grafana": "0.16.3",
"splice-pulumi-common": "1.0.0",
"splice-pulumi-common-sv": "1.0.0"
"splice-pulumi-common": "1.0.0"
},
"overrides": {
"@pulumi/kubernetes-cert-manager": {
Expand Down
15 changes: 4 additions & 11 deletions cluster/pulumi/infra/src/istio.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
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 { PodMonitor, ServiceMonitor } from 'splice-pulumi-common/src/metrics';

import {
activeVersion,
DecentralizedSynchronizerUpgradeConfig,
DeploySvRunbook,
ExactNamespace,
getDnsNames,
HELM_MAX_HISTORY_SIZE,
Expand Down Expand Up @@ -161,16 +159,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,
Expand Down
3 changes: 1 addition & 2 deletions cluster/pulumi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.