-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtest.ts
67 lines (57 loc) · 1.72 KB
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { InstanceType } from "aws-cdk-lib/aws-ec2";
import { KubernetesVersion } from "aws-cdk-lib/aws-eks";
import { EngineVersion } from "aws-cdk-lib/aws-opensearchservice";
import { PostgresEngineVersion } from "aws-cdk-lib/aws-rds";
import { EC2_INSTANCE_MAP, OPENSEARCH_INSTANCE_MAP, RDS_INSTANCE_MAP, REDIS_NODE_MAP } from "./constants";
import { StackConfig } from "./stackConfig";
/**
* Configuration for the test stack
*/
export interface TestStackConfig extends StackConfig {
}
export const testConfig: TestStackConfig = {
environment: 'Testing',
region: process.env.CDK_TESTING_REGION || process.env.CDK_DEFAULT_REGION || '',
account: process.env.CDK_TESTING_ACCOUNT || process.env.CDK_DEFAULT_ACCOUNT || '',
cluster: {
version: KubernetesVersion.V1_29,
tags: { "marketplace": "dify" },
managedNodeGroups: {
app: {
desiredSize: 1,
minSize: 1,
maxSize: 1,
instanceType: new InstanceType(EC2_INSTANCE_MAP['4c16m']),
diskSize: 100,
}
},
},
s3: {
removeWhenDestroyed: false,
},
postgresSQL: {
version: PostgresEngineVersion.VER_14_9,
instanceType: new InstanceType(RDS_INSTANCE_MAP['2c8m']),
dbName: 'postgres',
dbCredentialUsername: 'clusteradmin',
backupRetention: 0,
storageSize: 256,
removeWhenDestroyed: true,
},
redis: {
engineVersion: "6.2",
parameterGroup: "default.redis6.x",
nodeType: REDIS_NODE_MAP['6.38m'],
readReplicas: 1,
multiAZ: true
},
openSearch: {
enabled: true,
version: EngineVersion.OPENSEARCH_2_11,
masterNodes: 2,
masterNodeType: OPENSEARCH_INSTANCE_MAP['2c8m'],
dataNodes: 1,
dataNodeType: OPENSEARCH_INSTANCE_MAP['4c16m'],
dataNodeSize: 100
}
}