diff --git a/infra/cdk8s.ts b/infra/cdk8s.ts index 9702de50..7dd36a86 100644 --- a/infra/cdk8s.ts +++ b/infra/cdk8s.ts @@ -29,7 +29,7 @@ async function main(): Promise { githubPat: '/eks/github/linz-li-bot/pat', // Argo Database connection password - argoDbPassword: '/eks/argo/postgres/password', + //argoDbPassword: '/eks/argo/postgres/password', }), describeCluster(ClusterName), ]); @@ -75,8 +75,8 @@ async function main(): Promise { clusterName: ClusterName, saName: cfnOutputs[CfnOutputKeys.ArgoRunnerServiceAccountName], tempBucketName: ScratchBucketName, - argoDbEndpoint: cfnOutputs[CfnOutputKeys.ArgoDbEndpoint], - argoDbPassword: ssmConfig.argoDbPassword, + // argoDbEndpoint: cfnOutputs[CfnOutputKeys.ArgoDbEndpoint], + // argoDbPassword: ssmConfig.argoDbPassword, }); new ArgoExtras(app, 'argo-extras', { diff --git a/infra/charts/argo.workflows.ts b/infra/charts/argo.workflows.ts index 8758297c..9136e86b 100644 --- a/infra/charts/argo.workflows.ts +++ b/infra/charts/argo.workflows.ts @@ -1,8 +1,7 @@ import { Chart, ChartProps, Duration, Helm } from 'cdk8s'; -import { Secret } from 'cdk8s-plus-30'; import { Construct } from 'constructs'; -import { ArgoDbName, ArgoDbUser, DefaultRegion } from '../constants.js'; +import { DefaultRegion } from '../constants.js'; import { applyDefaultLabels } from '../util/labels.js'; export interface ArgoWorkflowsProps { @@ -24,18 +23,18 @@ export interface ArgoWorkflowsProps { * @example "Workflows" */ clusterName: string; - /** - * The Argo database endpoint - * - * @example "argodb-argodb4be14fa2-p8yjinijwbro.cmpyjhgv78aj.ap-southeast-2.rds.amazonaws.com" - */ - argoDbEndpoint: string; - /** - * The Argo database password - * - * @example "eighoo5room0aeM^ahz0Otoh4aakiipo" - */ - argoDbPassword: string; + // /** + // * The Argo database endpoint + // * + // * @example "argodb-argodb4be14fa2-p8yjinijwbro.cmpyjhgv78aj.ap-southeast-2.rds.amazonaws.com" + // */ + // argoDbEndpoint: string; + // /** + // * The Argo database password + // * + // * @example "eighoo5room0aeM^ahz0Otoh4aakiipo" + // */ + // argoDbPassword: string; } /** @@ -72,29 +71,29 @@ export class ArgoWorkflows extends Chart { }, }; - const argoDbSecret = new Secret(this, 'argo-postgres-config', {}); - argoDbSecret.addStringData('username', ArgoDbUser); - argoDbSecret.addStringData('password', props.argoDbPassword); + // const argoDbSecret = new Secret(this, 'argo-postgres-config', {}); + // argoDbSecret.addStringData('username', ArgoDbUser); + // argoDbSecret.addStringData('password', props.argoDbPassword); - const persistence = { - connectionPool: { - maxIdleConns: 100, - maxOpenConns: 0, - }, - nodeStatusOffLoad: true, - archive: true, - archiveTTL: '', // never expire archived workflows - postgresql: { - host: props.argoDbEndpoint, - port: 5432, - database: ArgoDbName, - tableName: 'argo_workflows', - userNameSecret: { name: argoDbSecret.name, key: 'username' }, - passwordSecret: { name: argoDbSecret.name, key: 'password' }, - ssl: true, - sslMode: 'require', - }, - }; + // const persistence = { + // connectionPool: { + // maxIdleConns: 100, + // maxOpenConns: 0, + // }, + // nodeStatusOffLoad: true, + // archive: true, + // archiveTTL: '', // never expire archived workflows + // postgresql: { + // host: props.argoDbEndpoint, + // port: 5432, + // database: ArgoDbName, + // tableName: 'argo_workflows', + // userNameSecret: { name: argoDbSecret.name, key: 'username' }, + // passwordSecret: { name: argoDbSecret.name, key: 'password' }, + // ssl: true, + // sslMode: 'require', + // }, + // }; const DefaultNodeSelector = { 'eks.amazonaws.com/capacityType': 'ON_DEMAND', @@ -131,7 +130,7 @@ export class ArgoWorkflows extends Chart { extraArgs: [], // FIXME: workaround for https://github.com/argoproj/argo-workflows/issues/11657 extraEnv: [{ name: 'WATCH_CONTROLLER_SEMAPHORE_CONFIGMAPS', value: 'false' }], - persistence, + // persistence, replicas: 2, workflowDefaults: { spec: { @@ -157,7 +156,7 @@ export class ArgoWorkflows extends Chart { }, }, workflow: { - rbac: { create: true }, + //rbac: { create: true }, serviceAccount: { create: false, name: props.saName }, }, }, diff --git a/infra/constants.ts b/infra/constants.ts index f11bd887..2f024c53 100644 --- a/infra/constants.ts +++ b/infra/constants.ts @@ -2,13 +2,13 @@ export const ClusterName = 'WorkflowsNP'; /** LINZ conventional name for Argo Workflows artifact bucket */ export const ScratchBucketName = `linz-${ClusterName.toLowerCase()}-scratch`; -/** Argo Database Instance name */ -export const ArgoDbInstanceName = 'ArgoDb'; -/** Argo Database name */ -export const ArgoDbName = 'argo'; -/** Argo Database user */ -export const ArgoDbUser = 'argo_user'; -/** AWS default region for our stack */ +// /** Argo Database Instance name */ +// export const ArgoDbInstanceName = 'ArgoDb'; +// /** Argo Database name */ +// export const ArgoDbName = 'argo'; +// /** Argo Database user */ +// export const ArgoDbUser = 'argo_user'; +// /** AWS default region for our stack */ export const DefaultRegion = 'ap-southeast-2'; /** @@ -22,7 +22,7 @@ export const UseNodeLocalDns = true; export const CfnOutputKeys = { ClusterEndpoint: 'ClusterEndpoint', - ArgoDbEndpoint: 'ArgoDbEndpoint', + // ArgoDbEndpoint: 'ArgoDbEndpoint', KarpenterServiceAccountName: 'KarpenterServiceAccountName', KarpenterServiceAccountRoleArn: 'KarpenterServiceAccountRoleArn',