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
8 changes: 2 additions & 6 deletions cluster/expected/operator/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,9 @@
],
"maxHistory": 10,
"resources": {
"limits": {
"cpu": 2,
"memory": "4G"
},
"requests": {
"cpu": 1,
"memory": "2G"
"cpu": 0.2,
"memory": "1G"
}
},
"serviceMonitor": {
Expand Down
6 changes: 3 additions & 3 deletions cluster/pulumi/canton-network/src/sv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
DEFAULT_AUDIENCE,
ExactNamespace,
exactNamespace,
failOnAppVersionMismatch,
fetchAndInstallParticipantBootstrapDump,
imagePullSecret,
initialPackageConfigJson,
Expand Down Expand Up @@ -55,7 +56,6 @@ import { spliceConfig } from 'splice-pulumi-common/src/config/config';
import { initialAmuletPrice } from 'splice-pulumi-common/src/initialAmuletPrice';
import { jmxOptions } from 'splice-pulumi-common/src/jmx';
import { Postgres } from 'splice-pulumi-common/src/postgres';
import { failOnAppVersionMismatch } from 'splice-pulumi-common/src/upgrades';

import {
delegatelessAutomation,
Expand Down Expand Up @@ -459,7 +459,7 @@ function installSvApp(
enable: true,
},
additionalJvmOptions: jmxOptions(),
failOnAppVersionMismatch: failOnAppVersionMismatch(),
failOnAppVersionMismatch: failOnAppVersionMismatch,
participantAddress: participant.internalClusterAddress,
onboardingPollingInterval: config.onboardingPollingInterval,
enablePostgresMetrics: true,
Expand Down Expand Up @@ -522,7 +522,7 @@ function installScan(
isFirstSv: isFirstSv,
persistence: persistenceConfig(postgres, scanDbName),
additionalJvmOptions: jmxOptions(),
failOnAppVersionMismatch: failOnAppVersionMismatch(),
failOnAppVersionMismatch: failOnAppVersionMismatch,
sequencerAddress: decentralizedSynchronizerNode.namespaceInternalSequencerAddress,
participantAddress: participant.internalClusterAddress,
migration: {
Expand Down
4 changes: 2 additions & 2 deletions cluster/pulumi/common-validator/src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
DEFAULT_AUDIENCE,
DomainMigrationIndex,
ExactNamespace,
failOnAppVersionMismatch,
fetchAndInstallParticipantBootstrapDump,
installAuth0Secret,
installAuth0UISecret,
Expand All @@ -30,7 +31,6 @@ import {
ValidatorTopupConfig,
} from 'splice-pulumi-common';
import { jmxOptions } from 'splice-pulumi-common/src/jmx';
import { failOnAppVersionMismatch } from 'splice-pulumi-common/src/upgrades';

import { SweepConfig } from './sweep';

Expand Down Expand Up @@ -214,7 +214,7 @@ export async function installValidatorApp(
},
participantAddress: config.participantAddress,
additionalJvmOptions: jmxOptions(),
failOnAppVersionMismatch: failOnAppVersionMismatch(),
failOnAppVersionMismatch: failOnAppVersionMismatch,
enablePostgresMetrics: true,
auth: {
audience:
Expand Down
4 changes: 4 additions & 0 deletions cluster/pulumi/common/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ export const publicPrometheusRemoteWrite = spliceEnvConfig.envFlag(
'PUBLIC_PROMETHEUS_REMOTE_WRITE',
false
);
export const failOnAppVersionMismatch: boolean = spliceEnvConfig.envFlag(
'FAIL_ON_APP_VERSION_MISMATCH',
true
);
4 changes: 2 additions & 2 deletions cluster/pulumi/common/src/secrets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { DockerConfig } from 'splice-pulumi-common/src/dockerConfig';

import { installAuth0Secret, installAuth0UiSecretWithClientId } from './auth0';
import { Auth0Client } from './auth0types';
import { config } from './config';
import { CnInput } from './helm';
import { btoa, ExactNamespace } from './utils';

Expand Down Expand Up @@ -84,7 +83,8 @@ export function imagePullSecretByNamespaceNameForServiceAccount(
serviceAccountName: string,
dependsOn: pulumi.Resource[] = []
): pulumi.Resource[] {
const kubecfg = config.optionalEnv('KUBECONFIG');
// eslint-disable-next-line no-process-env
const kubecfg = process.env['KUBECONFIG'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this ok to read directly from env?

Copy link
Contributor Author

@nicu-da nicu-da Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really just used for:

(process.env['KUBECONFIG'] = kubecfg

so don't think it makes sense to read it from anywhere else?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh right, the stupid absolute path thing...

// k8sProvider saves the absolute path to kubeconfig if it's defined in KUBECONFIG env var, which makes
// it not portable between machines, so we temporarily remove this env var to avoid that.
// eslint-disable-next-line no-process-env
Expand Down
7 changes: 0 additions & 7 deletions cluster/pulumi/common/src/upgrades.ts

This file was deleted.

8 changes: 2 additions & 6 deletions cluster/pulumi/operator/src/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ export const operator = new k8s.helm.v3.Release(
namespace: namespace.ns.metadata.name,
values: {
resources: {
limits: {
cpu: 2,
memory: config.optionalEnv('OPERATOR_MEMORY_LIMIT') || '4G',
},
requests: {
cpu: 1,
memory: config.optionalEnv('OPERATOR_MEMORY_REQUESTS') || '2G',
cpu: 0.2,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sneaked this in as the new operator uses really low amount of resources

memory: config.optionalEnv('OPERATOR_MEMORY_REQUESTS') || '1G',
},
},
imagePullSecrets: [{ name: secretName }],
Expand Down
4 changes: 2 additions & 2 deletions cluster/pulumi/splitwell/src/splitwell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import {
CnInput,
activeVersion,
ansDomainPrefix,
failOnAppVersionMismatch,
} from 'splice-pulumi-common';
import { installParticipant } from 'splice-pulumi-common-validator';
import { installValidatorApp } from 'splice-pulumi-common-validator/src/validator';
import { failOnAppVersionMismatch } from 'splice-pulumi-common/src/upgrades';

export async function installSplitwell(
auth0Client: Auth0Client,
Expand Down Expand Up @@ -104,7 +104,7 @@ export async function installSplitwell(
user: pulumi.Output.create('cnadmin'),
port: pulumi.Output.create(5432),
},
failOnAppVersionMismatch: failOnAppVersionMismatch(),
failOnAppVersionMismatch: failOnAppVersionMismatch,
},
activeVersion,
{ dependsOn: imagePullDeps }
Expand Down
4 changes: 2 additions & 2 deletions cluster/pulumi/sv-runbook/src/installNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ import {
SvCometBftGovernanceKey,
svCometBftGovernanceKeySecret,
svCometBftGovernanceKeyFromSecret,
failOnAppVersionMismatch,
} from 'splice-pulumi-common';
import { spliceConfig } from 'splice-pulumi-common/src/config/config';
import { CloudPostgres, SplicePostgres } from 'splice-pulumi-common/src/postgres';
import { failOnAppVersionMismatch } from 'splice-pulumi-common/src/upgrades';

import { SvAppConfig, ValidatorAppConfig } from './config';
import { installCanton } from './decentralizedSynchronizer';
Expand Down Expand Up @@ -278,7 +278,7 @@ async function installSvAndValidator(
extraBeneficiaries,
onboardingPollingInterval: svOnboardingPollingInterval,
disableOnboardingParticipantPromotionDelay,
failOnAppVersionMismatch: failOnAppVersionMismatch(),
failOnAppVersionMismatch: failOnAppVersionMismatch,
initialAmuletPrice,
};

Expand Down
4 changes: 2 additions & 2 deletions cluster/pulumi/validator-runbook/src/installNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ import {
ValidatorTopupConfig,
InstalledHelmChart,
ansDomainPrefix,
failOnAppVersionMismatch,
} from 'splice-pulumi-common';
import { installParticipant } from 'splice-pulumi-common-validator';
import { SplicePostgres } from 'splice-pulumi-common/src/postgres';
import { failOnAppVersionMismatch } from 'splice-pulumi-common/src/upgrades';

import {
VALIDATOR_MIGRATE_PARTY,
Expand Down Expand Up @@ -246,7 +246,7 @@ async function installValidator(validatorConfig: ValidatorConfig): Promise<Insta
},
participantAddress,
participantIdentitiesDumpPeriodicBackup: backupConfig,
failOnAppVersionMismatch: failOnAppVersionMismatch(),
failOnAppVersionMismatch: failOnAppVersionMismatch,
validatorPartyHint: VALIDATOR_PARTY_HINT || 'digitalasset-testValidator-1',
migrateValidatorParty: VALIDATOR_MIGRATE_PARTY,
participantIdentitiesDumpImport: participantBootstrapDumpSecret
Expand Down