@@ -22,19 +22,20 @@ interface InfraConfig {
22
22
interface TestConfig {
23
23
DESCRIPTION : string ;
24
24
PHASES : string [ ] ;
25
- CLOUD : string ;
25
+ CLUSTER : string ;
26
26
}
27
27
28
28
// Each of the TEST_CONFIGURATIONS define an integration test end-to-end
29
29
// It should be a combination of multiple INFRA_PHASES, order of PHASES slice is important
30
30
const TEST_CONFIGURATIONS : { [ name : string ] : TestConfig } = {
31
31
STANDARD_GKE_TEST : {
32
- CLOUD : "gcp" ,
32
+ CLUSTER : "gcp" ,
33
33
DESCRIPTION : "Deploy Gitpod on GKE, with managed DNS, and run integration tests" ,
34
34
PHASES : [
35
- "STANDARD_GKE_CLUSTER " ,
35
+ "CREATE_CLUSTER " ,
36
36
"CERT_MANAGER" ,
37
- "GCP_MANAGED_DNS" ,
37
+ "EXTERNALDNS" ,
38
+ "CLUSTER_ISSUER" ,
38
39
"GENERATE_KOTS_CONFIG" ,
39
40
"INSTALL_GITPOD" ,
40
41
"CHECK_INSTALLATION" ,
@@ -44,12 +45,13 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
44
45
] ,
45
46
} ,
46
47
STANDARD_GKE_UPGRADE_TEST : {
47
- CLOUD : "gcp" ,
48
+ CLUSTER : "gcp" ,
48
49
DESCRIPTION : `Deploy Gitpod on GKE, and test upgrade from ${ version } to latest version` ,
49
50
PHASES : [
50
- "STANDARD_GKE_CLUSTER " ,
51
+ "CREATE_CLUSTER " ,
51
52
"CERT_MANAGER" ,
52
- "GCP_MANAGED_DNS" ,
53
+ "EXTERNALDNS" ,
54
+ "CLUSTER_ISSUER" ,
53
55
"GENERATE_KOTS_CONFIG" ,
54
56
"INSTALL_GITPOD" ,
55
57
"CHECK_INSTALLATION" ,
@@ -59,13 +61,14 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
59
61
] ,
60
62
} ,
61
63
STANDARD_K3S_TEST : {
62
- CLOUD : "gcp" , // the cloud provider is still GCP
64
+ CLUSTER : "gcp" , // the cloud provider is still GCP
63
65
DESCRIPTION :
64
66
"Deploy Gitpod on a K3s cluster, created on a GCP instance," +
65
67
" with managed DNS and run integrations tests" ,
66
68
PHASES : [
67
69
"STANDARD_K3S_CLUSTER_ON_GCP" ,
68
70
"CERT_MANAGER" ,
71
+ "CLUSTER_ISSUER" ,
69
72
"GENERATE_KOTS_CONFIG" ,
70
73
"INSTALL_GITPOD" ,
71
74
"CHECK_INSTALLATION" ,
@@ -75,24 +78,26 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
75
78
] ,
76
79
} ,
77
80
STANDARD_K3S_PREVIEW : {
78
- CLOUD : "gcp " ,
81
+ CLUSTER : "k3s " ,
79
82
DESCRIPTION : "Create a SH Gitpod preview environment on a K3s cluster, created on a GCP instance" ,
80
83
PHASES : [
81
- "STANDARD_K3S_CLUSTER_ON_GCP " ,
84
+ "CREATE_CLUSTER " ,
82
85
"CERT_MANAGER" ,
86
+ "CLUSTER_ISSUER" ,
87
+ "EXTERNALDNS" ,
83
88
"GENERATE_KOTS_CONFIG" ,
84
89
"INSTALL_GITPOD" ,
85
90
"CHECK_INSTALLATION" ,
86
91
"RESULTS" ,
87
92
] ,
88
93
} ,
89
94
STANDARD_AKS_TEST : {
90
- CLOUD : "azure " ,
95
+ CLUSTER : "aks " ,
91
96
DESCRIPTION : "Deploy Gitpod on AKS, with managed DNS, and run integration tests" ,
92
97
PHASES : [
93
- "STANDARD_AKS_CLUSTER " ,
98
+ "CREATE_CLUSTER " ,
94
99
"CERT_MANAGER" ,
95
- "AZURE_ISSUER " ,
100
+ "CLUSTER_ISSUER " ,
96
101
"EXTERNALDNS" ,
97
102
"ADD_NS_RECORD" ,
98
103
"GENERATE_KOTS_CONFIG" ,
@@ -104,17 +109,14 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
104
109
] ,
105
110
} ,
106
111
STANDARD_EKS_TEST : {
107
- CLOUD : "aws " ,
108
- DESCRIPTION : "Create an EKS cluster" ,
112
+ CLUSTER : "eks " ,
113
+ DESCRIPTION : "Creates an EKS cluster, install gitpod and run integration tests " ,
109
114
PHASES : [
110
- "STANDARD_GKE_CLUSTER " ,
115
+ "CREATE_CLUSTER " ,
111
116
"CERT_MANAGER" ,
112
117
"EXTERNALDNS" ,
113
- // TODO phases are:
114
- // external dns with aws
115
- // 1) register domains in AWS, associate with route53
116
- // 2) add the associated ns record to gcp(since we use gitpod-self-hsoted.com domain)
117
- // 3) create cluster issuer with route53 as solver
118
+ "CLUSTER_ISSUER" ,
119
+ "ADD_NS_RECORD" ,
118
120
"GENERATE_KOTS_CONFIG" ,
119
121
"INSTALL_GITPOD" ,
120
122
// "CHECK_INSTALLATION",
@@ -126,65 +128,45 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
126
128
} ;
127
129
128
130
const config : TestConfig = TEST_CONFIGURATIONS [ testConfig ] ;
129
- const cloud : string = config . CLOUD ;
131
+ const cluster : string = config . CLUSTER ;
130
132
131
133
// `INFRA_PHASES` describe the phases that can be mixed
132
134
// and matched to form a test configuration
133
135
// Each phase should contain a `makeTarget` which
134
136
// corresponds to a target in the Makefile in ./nightly-tests/Makefile
135
137
const INFRA_PHASES : { [ name : string ] : InfraConfig } = {
136
- STANDARD_GKE_CLUSTER : {
137
- phase : "create-std-gke-cluster" ,
138
- makeTarget : "gke-standard-cluster" ,
139
- description : "Creating a GKE cluster with 1 nodepool each for workspace and server" ,
140
- } ,
141
- STANDARD_K3S_CLUSTER_ON_GCP : {
142
- phase : "create-std-k3s-cluster" ,
143
- makeTarget : "k3s-standard-cluster" ,
144
- description : "Creating a k3s cluster on GCP with 1 node" ,
145
- } ,
146
- STANDARD_AKS_CLUSTER : {
147
- phase : "create-std-aks-cluster" ,
148
- makeTarget : "aks-standard-cluster" ,
149
- description : "Creating an aks cluster(azure)" ,
150
- } ,
151
- STANDARD_EKS_CLUSTER : {
152
- phase : "create-std-eks-cluster" ,
153
- makeTarget : "eks-standard-cluster" ,
154
- description : "Creating a EKS cluster with 1 nodepool each for workspace and server" ,
138
+ CREATE_CLUSTER : {
139
+ phase : "create-cluster" ,
140
+ makeTarget : "create-cluster" ,
141
+ description : `Creating a ${ cluster } cluster` ,
155
142
} ,
156
143
CERT_MANAGER : {
157
144
phase : "setup-cert-manager" ,
158
145
makeTarget : "cert-manager" ,
159
146
description : "Sets up cert-manager and optional cloud dns secret" ,
160
147
} ,
161
- GCP_MANAGED_DNS : {
162
- phase : "setup-external-dns-with-cloud-dns" ,
163
- makeTarget : "managed-dns" ,
164
- description : "Sets up external-dns & cloudDNS config" ,
165
- } ,
166
148
GENERATE_KOTS_CONFIG : {
167
149
phase : "generate-kots-config" ,
168
- makeTarget : `generate-kots-config storage=${ randomize ( "storage" , cloud ) } registry=${ randomize (
150
+ makeTarget : `generate-kots-config storage=${ randomize ( "storage" , cluster ) } registry=${ randomize (
169
151
"registry" ,
170
- cloud ,
171
- ) } db=${ randomize ( "db" , cloud ) } `,
152
+ cluster ,
153
+ ) } db=${ randomize ( "db" , cluster ) } `,
172
154
description : `Generate KOTS Config file` ,
173
155
} ,
174
- AZURE_ISSUER : {
175
- phase : "setup-azure- cluster-issuer" ,
176
- makeTarget : "azure -issuer" ,
177
- description : " Deploys ClusterIssuer for azure" ,
156
+ CLUSTER_ISSUER : {
157
+ phase : "setup-cluster-issuer" ,
158
+ makeTarget : "cluster -issuer" ,
159
+ description : ` Deploys ClusterIssuer for ${ cluster } ` ,
178
160
} ,
179
161
EXTERNALDNS : {
180
162
phase : "external-dns" ,
181
- makeTarget : `external-dns provider= ${ cloud } ` ,
182
- description : `Deploys external-dns with ${ cloud } provider` ,
163
+ makeTarget : `external-dns` ,
164
+ description : `Deploys external-dns with ${ cluster } provider` ,
183
165
} ,
184
166
ADD_NS_RECORD : {
185
167
phase : "add-ns-record" ,
186
168
makeTarget : "add-ns-record" ,
187
- description : " Adds NS record for subdomain under gitpod-self-hosted.com" ,
169
+ description : ` Adds NS record for subdomain under gitpod-self-hosted.com for ${ cluster } ` ,
188
170
} ,
189
171
INSTALL_GITPOD_IGNORE_PREFLIGHTS : {
190
172
phase : "install-gitpod-without-preflights" ,
@@ -214,7 +196,7 @@ const INFRA_PHASES: { [name: string]: InfraConfig } = {
214
196
} ,
215
197
DESTROY : {
216
198
phase : "destroy" ,
217
- makeTarget : " cleanup" ,
199
+ makeTarget : ` cleanup cluster= ${ cluster } ` ,
218
200
description : "Destroy the created infrastucture" ,
219
201
} ,
220
202
RESULTS : {
0 commit comments