@@ -270,31 +270,6 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF
270
270
] , 'hostports' ) ;
271
271
const helmInstallName = "gitpod" ;
272
272
273
- // trigger certificate issuing
274
- werft . log ( 'certificate' , "organizing a certificate for the preview environment..." ) ;
275
- // let namespaceRecreatedResolve = undefined;
276
- // let namespaceRecreatedPromise = new Promise((resolve) => {
277
- // namespaceRecreatedResolve = resolve;
278
- // });
279
- const certificatePromise = ( async function ( ) {
280
- if ( ! wsCluster ) {
281
- await issueMetaCerts ( ) ;
282
- }
283
- if ( k3sWsCluster ) {
284
- await issueK3sWsCerts ( ) ;
285
- }
286
-
287
- werft . log ( 'certificate' , 'waiting for preview env namespace being re-created...' ) ;
288
- // await namespaceRecreatedPromise;
289
-
290
- await installMetaCertificates ( ) ;
291
-
292
- if ( k3sWsCluster ) {
293
- await installWsCertificates ( ) ;
294
- }
295
-
296
- } ) ( ) ;
297
-
298
273
try {
299
274
if ( deploymentConfig . cleanSlateDeployment ) {
300
275
// re-create namespace
@@ -311,23 +286,26 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF
311
286
createNamespace ( "" , namespace , { slice : 'prep' } ) ;
312
287
}
313
288
setKubectlContextNamespace ( namespace , { slice : 'prep' } ) ;
314
- // namespaceRecreatedResolve(); // <-- signal for certificate
315
- werft . done ( 'prep' ) ;
316
- } catch ( err ) {
317
- werft . fail ( 'prep' , err ) ;
318
- }
319
289
290
+ // trigger certificate issuing
291
+ werft . log ( 'certificate' , "organizing a certificate for the preview environment..." ) ;
292
+ if ( ! wsCluster ) {
293
+ await issueMetaCerts ( ) ;
294
+ }
295
+ if ( k3sWsCluster ) {
296
+ await issueK3sWsCerts ( ) ;
297
+ }
320
298
321
- if ( certificatePromise ) {
322
- // Delay success until certificate is actually present
323
- werft . log ( 'certificate' , "awaiting promised certificate" )
324
- try {
325
- await certificatePromise ;
326
- werft . done ( 'certificate' ) ;
327
- } catch ( err ) {
328
- werft . log ( 'certificate' , err . toString ( ) ) ; // This ensures the err message is picked up by the werft UI
329
- werft . fail ( 'certificate' , err ) ;
299
+ await installMetaCertificates ( ) ;
300
+
301
+ if ( k3sWsCluster ) {
302
+ await installWsCertificates ( ) ;
330
303
}
304
+ werft . done ( 'certificate' ) ;
305
+
306
+ werft . done ( 'prep' ) ;
307
+ } catch ( err ) {
308
+ werft . fail ( 'prep' , err ) ;
331
309
}
332
310
333
311
// core-dev specific section start
@@ -404,11 +382,6 @@ export async function deployToDev(deploymentConfig: DeploymentConfig, workspaceF
404
382
const pathToVersions = `${ shell . pwd ( ) . toString ( ) } /versions.yaml` ;
405
383
flags += ` -f ${ pathToVersions } ` ;
406
384
407
- if ( ! certificatePromise ) {
408
- // it's not possible to set certificatesSecret={} so we set secretName to empty string
409
- flags += ` --set certificatesSecret.secretName=""` ;
410
- }
411
-
412
385
try {
413
386
shell . cd ( "chart" ) ;
414
387
werft . log ( 'helm' , 'installing Gitpod' ) ;
0 commit comments