Skip to content

Commit ec57d35

Browse files
Revert GHA CloudSQL code (#3642)
* Revert "[static] Add missing secretKeyRef in GHA setup (#3638)" This reverts commit 080c7d9. * Revert "Deploy CloudSQL instance for performance tests (#3634)" This reverts commit 35543de. * [ci] run Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com> --------- Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
1 parent 6640ae1 commit ec57d35

File tree

5 files changed

+10
-83
lines changed

5 files changed

+10
-83
lines changed

cluster/pulumi/common/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export * from './dockerConfig';
2424
export * from './serviceAccount';
2525
export * from './participantKms';
2626
export * from './config/migrationSchema';
27-
export * from './postgres';
2827
export * from './pruning';
2928
export * from './config/loadTesterConfig';
3029
export * from './config/networkWideConfig';

cluster/pulumi/common/src/postgres.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,7 @@ export class CloudPostgres extends pulumi.ComponentResource implements Postgres
6565
secretName: string,
6666
cloudSqlConfig: CloudSqlConfig,
6767
active: boolean = true,
68-
opts: {
69-
disableProtection?: boolean;
70-
migrationId?: string;
71-
logicalDecoding?: boolean;
72-
disableBackups?: boolean;
73-
} = {}
68+
opts: { disableProtection?: boolean; migrationId?: string; logicalDecoding?: boolean } = {}
7469
) {
7570
const instanceLogicalName = xns.logicalName + '-' + instanceName;
7671
const instanceLogicalNameAlias = xns.logicalName + '-' + alias; // pulumi name before #12391
@@ -98,8 +93,8 @@ export class CloudPostgres extends pulumi.ComponentResource implements Postgres
9893
...(opts.logicalDecoding ? [{ name: 'cloudsql.logical_decoding', value: 'on' }] : []),
9994
],
10095
backupConfiguration: {
101-
enabled: !opts.disableBackups,
102-
pointInTimeRecoveryEnabled: !opts.disableBackups,
96+
enabled: true,
97+
pointInTimeRecoveryEnabled: true,
10398
...(spliceConfig.pulumiProjectConfig.cloudSql.backupsToRetain
10499
? {
105100
backupRetentionSettings: {

cluster/pulumi/gha/src/performanceTests.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

cluster/pulumi/gha/src/runners.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ jest.mock('./config', () => ({
1515
runnerHookVersion: '1.1',
1616
},
1717
}));
18-
class FakeCloudPostgres extends pulumi.Resource {}
1918
jest.mock('@lfdecentralizedtrust/splice-pulumi-common', () => ({
2019
__esModule: true,
2120
appsAffinityAndTolerations: {},
2221
DOCKER_REPO: 'https://dummy-docker-repo.com',
2322
HELM_MAX_HISTORY_SIZE: 42,
2423
imagePullSecretByNamespaceNameForServiceAccount: () => [],
2524
infraAffinityAndTolerations: {},
26-
CloudPostgres: function CloudPostgres() {
27-
return new FakeCloudPostgres('CloudPostgres', 'cloud-postgres', true);
28-
},
2925
}));
3026
jest.mock('@lfdecentralizedtrust/splice-pulumi-common/src/config/envConfig', () => ({
3127
__esModule: true,

cluster/pulumi/gha/src/runners.ts

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import * as k8s from '@pulumi/kubernetes';
44
import {
55
appsAffinityAndTolerations,
6-
CloudPostgres,
76
DOCKER_REPO,
8-
ExactNamespace,
97
HELM_MAX_HISTORY_SIZE,
108
imagePullSecretByNamespaceNameForServiceAccount,
119
infraAffinityAndTolerations,
@@ -20,7 +18,6 @@ import yaml from 'js-yaml';
2018

2119
import { createCachePvc } from './cache';
2220
import { ghaConfig } from './config';
23-
import { createCloudSQLInstanceForPerformanceTests } from './performanceTests';
2421

2522
type ResourcesSpec = {
2623
requests?: {
@@ -406,8 +403,7 @@ function installK8sRunnerScaleSet(
406403
cachePvcName: string,
407404
resources: ResourcesSpec,
408405
serviceAccountName: string,
409-
dependsOn: Resource[],
410-
performanceTestsDb: CloudPostgres
406+
dependsOn: Resource[]
411407
): Release {
412408
const podConfigMapName = `${name}-pod-config`;
413409
// A configMap that will be mounted to runner pods and provide additional pod spec for the workflow pods
@@ -538,23 +534,6 @@ function installK8sRunnerScaleSet(
538534
name: 'ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE',
539535
value: '/pod.yaml',
540536
},
541-
{
542-
name: 'PERFORMANCE_TESTS_DB_HOST',
543-
value: performanceTestsDb.address,
544-
},
545-
{
546-
name: 'PERFORMANCE_TESTS_DB_USER',
547-
value: 'cnadmin',
548-
},
549-
{
550-
name: 'PERFORMANCE_TESTS_DB_PASSWORD',
551-
valueFrom: {
552-
secretKeyRef: {
553-
key: 'postgresPassword',
554-
name: performanceTestsDb.secretName,
555-
},
556-
},
557-
},
558537
],
559538
volumeMounts: [
560539
{
@@ -722,10 +701,9 @@ function installK8sRunnerScaleSets(
722701
runnersNamespace: Namespace,
723702
tokenSecret: Secret,
724703
cachePvcName: string,
725-
serviceAccountName: string,
726-
performanceTestsDb: CloudPostgres
704+
serviceAccountName: string
727705
): void {
728-
const dependsOn = [controller, runnersNamespace, tokenSecret, performanceTestsDb];
706+
const dependsOn = [controller, runnersNamespace, tokenSecret];
729707

730708
runnerSpecs
731709
.filter(spec => spec.k8s)
@@ -737,8 +715,7 @@ function installK8sRunnerScaleSets(
737715
cachePvcName,
738716
spec.resources,
739717
serviceAccountName,
740-
dependsOn,
741-
performanceTestsDb
718+
dependsOn
742719
);
743720
});
744721
}
@@ -777,17 +754,12 @@ function installPodMonitor(runnersNamespace: Namespace) {
777754
);
778755
}
779756

780-
const GHA_NAMESPACE_NAME = 'gha-runners';
781757
export function installRunnerScaleSets(controller: k8s.helm.v3.Release): void {
782-
const runnersNamespace = new Namespace(GHA_NAMESPACE_NAME, {
758+
const runnersNamespace = new Namespace('gha-runners', {
783759
metadata: {
784-
name: GHA_NAMESPACE_NAME,
760+
name: 'gha-runners',
785761
},
786762
});
787-
const exactNs: ExactNamespace = {
788-
ns: runnersNamespace,
789-
logicalName: GHA_NAMESPACE_NAME,
790-
};
791763

792764
const tokenSecret = new k8s.core.v1.Secret(
793765
'gh-access-token',
@@ -819,15 +791,7 @@ export function installRunnerScaleSets(controller: k8s.helm.v3.Release): void {
819791
const saName = 'k8s-runners';
820792
installRunnersServiceAccount(runnersNamespace, saName);
821793

822-
const performanceTestsDb = createCloudSQLInstanceForPerformanceTests(exactNs);
823794
installDockerRunnerScaleSets(controller, runnersNamespace, tokenSecret, cachePvc, saName);
824-
installK8sRunnerScaleSets(
825-
controller,
826-
runnersNamespace,
827-
tokenSecret,
828-
cachePvcName,
829-
saName,
830-
performanceTestsDb
831-
);
795+
installK8sRunnerScaleSets(controller, runnersNamespace, tokenSecret, cachePvcName, saName);
832796
installPodMonitor(runnersNamespace);
833797
}

0 commit comments

Comments
 (0)