-
Notifications
You must be signed in to change notification settings - Fork 1
/
.helm-prep-wizard.ps1
442 lines (395 loc) · 19.7 KB
/
.helm-prep-wizard.ps1
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<#PSScriptInfo
.VERSION 1.9.0
.GUID 0ab56564-8d45-485c-829a-bffed0882237
.AUTHOR Black Duck
.COPYRIGHT Copyright 2024 Black Duck Software, Inc. All rights reserved.
#>
using module @{ModuleName='guided-setup'; RequiredVersion='1.17.0' }
$ErrorActionPreference = 'Stop'
$VerbosePreference = 'Continue'
Set-PSDebug -Strict
Write-Host 'Loading...' -NoNewline
'ps/keyvalue.ps1',
'ps/build/protect.ps1',
'ps/config.ps1',
'ps/steps/step.ps1',
'ps/steps/auth.ps1',
'ps/steps/cpu.ps1',
'ps/steps/database.ps1',
'ps/steps/ephemeralstorage.ps1',
'ps/steps/finish.ps1',
'ps/steps/image.ps1',
'ps/steps/ingress.ps1',
'ps/steps/java.ps1',
'ps/steps/k8s.ps1',
'ps/steps/license.ps1',
'ps/steps/memory.ps1',
'ps/steps/pwd.ps1',
'ps/steps/reg.ps1',
'ps/steps/scanfarm.ps1',
'ps/steps/scanfarm-cache.ps1',
'ps/steps/scanfarm-db.ps1',
'ps/steps/scanfarm-storage.ps1',
'ps/steps/schedule.ps1',
'ps/steps/size.ps1',
'ps/steps/storage.ps1',
'ps/steps/tls.ps1',
'ps/steps/to.ps1',
'ps/steps/volume.ps1',
'ps/steps/welcome.ps1' | ForEach-Object {
Write-Debug "'$PSCommandPath' is including file '$_'"
$path = Join-Path $PSScriptRoot $_
if (-not (Test-Path $path)) {
Write-Error "Unable to find file script dependency at $path. Please download the entire srm-k8s GitHub repository and rerun the downloaded copy of this script."
}
. $path | out-null
}
# Check for keytool (required for validating certs and cacerts file)
if ($null -eq (Get-AppCommandPath keytool)) {
Write-ErrorMessageAndExit "Restart this script after adding Java JRE (specifically Java's keytool program) to your PATH environment variable."
}
$config = [Config]::new()
$graph = New-Object Graph($true)
$s = @{}
[About],
[Abort],
[AddExtraCertificates],
[AdminPassword],
[AuthCookieSecure],
[AuthenticationType],
[CACertsFile],
[CACertsFilePassword],
[CertsCAPath],
[CertManagerIssuer],
[ChooseEnvironment],
[DatabaseReplicaCount],
[DatabaseReplicationPwd],
[DatabaseRootPwd],
[DatabaseUserPwd],
[DefaultCPU],
[DefaultEphemeralStorage],
[DefaultMemory],
[DefaultVolumeSize],
[DockerRepositoryPrefix],
[DockerRegistryHost],
[DockerRegistryPwd],
[DockerRegistryUser],
[DockerImagePullSecret],
[ExternalDatabaseCert],
[ExternalDatabaseHost],
[ExternalDatabasePort],
[ExternalDatabaseName],
[ExternalDatabaseUser],
[ExternalDatabasePwd],
[ExternalDatabaseOneWayAuth],
[ExternalDatabaseTrustCert],
[ExternalStorageEndpoint],
[ExternalStorageTLS],
[ExternalStorageUsername],
[ExternalStoragePassword],
[ExternalStorageBucket],
[ExternalStorageTrustCert],
[ExternalStorageCertificate],
[ExtraCertificates],
[Finish],
[GeneratePwds],
[GetKubernetesPort],
[IngressCertificateArn],
[IngressClassName],
[IngressHostname],
[IngressKind],
[IngressTLS],
[IngressTLSSecretName],
[LdapInstructions],
[Lock],
[MariaDBDockerImageVersion],
[MasterDatabaseCPU],
[MasterDatabaseEphemeralStorage],
[MasterDatabaseMemory],
[MasterDatabaseNodeSelector],
[MasterDatabaseTolerations],
[MasterDatabaseVolumeSize],
[MinioAdminPassword],
[MinioDockerImageVersion],
[MinIOCPU],
[MinIOEphemeralStorage],
[MinIOMemory],
[MinIONodeSelector],
[MinIOTolerations],
[MinIOVolumeSize],
[Namespace],
[ToolOrchestrationDockerImageVersion],
[ReleaseName],
[UseExternalDatabase],
[UseExternalStorage],
[SamlAppName],
[SamlAuthenticationHostBasePath],
[SamlExtraConfig],
[SamlIdpMetadata],
[SamlKeystorePwd],
[SamlPrivateKeyPwd],
[ScanFarmAzureClientId],
[ScanFarmAzureClientSecret],
[ScanFarmAzureEndpoint],
[ScanFarmAzureResourceGroup],
[ScanFarmAzureStorageAccountName],
[ScanFarmAzureStorageAccountKey],
[ScanFarmAzureSubscription],
[ScanFarmAzureTenantId],
[ScanFarmCacheBucketName],
[ScanFarmStorageServiceDatabaseName],
[ScanFarmDatabaseCert],
[ScanFarmDatabaseHost],
[ScanFarmDatabasePort],
[ScanFarmDatabasePwd],
[ScanFarmDatabaseTls],
[ScanFarmDatabaseUsername],
[ScanFarmGcsKey],
[ScanFarmGcsProjectName],
[ScanFarmInClusterStorage],
[ScanFarmInClusterStorageUrl],
[ScanFarmObjectStorageCert],
[ScanFarmObjectStorageHostname],
[ScanFarmObjectStoragePort],
[ScanFarmObjectStorageSecretKey],
[ScanFarmObjectStorageAccessKey],
[ScanFarmObjectStorageTLS],
[ScanFarmRedisAuth],
[ScanFarmRedisCert],
[ScanFarmRedisDatabase],
[ScanFarmRedisHost],
[ScanFarmRedisPassword],
[ScanFarmRedisPort],
[ScanFarmRedisRequirements],
[ScanFarmRedisTls],
[ScanFarmSastLicense],
[ScanFarmScaLicense],
[ScanFarmS3AccessKey],
[ScanFarmS3AccessMethod],
[ScanFarmS3IamRoleServiceAccount],
[ScanFarmS3SecretKey],
[ScanFarmS3StorageContextPath],
[ScanFarmS3StorageExternalURL],
[ScanFarmS3StorageProxy],
[ScanFarmS3Region],
[ScanFarmScanServiceDatabaseName],
[ScanFarmStorage],
[ScanFarmStorageBucketName],
[ScanFarmType],
[ServiceAccountNameToolService],
[ServiceAccountNameWorkflow],
[SignerName],
[RepoUsername],
[RepoPassword],
[Size],
[SrmWebLicense],
[StorageClassName],
[SubordinateDatabaseBackupVolumeSize],
[SubordinateDatabaseCPU],
[SubordinateDatabaseEphemeralStorage],
[SubordinateDatabaseMemory],
[SubordinateDatabaseNodeSelector],
[SubordinateDatabaseTolerations],
[SubordinateDatabaseVolumeSize],
[ToolNodeSelector],
[ToolServiceCPU],
[ToolServiceEphemeralStorage],
[ToolServiceKey],
[ToolServiceMemory],
[ToolServiceNodeSelector],
[ToolServiceReplicaCount],
[ToolServiceTolerations],
[ToolTolerations],
[UseDefaultCACerts],
[UseNetworkPolicyOption],
[UseNodeSelectors],
[UseDockerRegistry],
[UseDockerRegistryCredential],
[UseDockerRepositoryPrefix],
[UseDefaultDockerImages],
[UseScanFarm],
[UseTlsOption],
[UseTolerations],
[UseToolOrchestration],
[Welcome],
[WebCPU],
[WebDockerImageVersion],
[WebEphemeralStorage],
[WebMemory],
[WebVolumeSize],
[WorkDir],
[WorkflowControllerNodeSelector],
[WorkflowControllerTolerations],
[WorkflowCPU],
[WorkflowDockerImageVersion],
[WorkflowEphemeralStorage],
[WorkflowMemory],
[WebNodeSelector],
[WebTolerations] | ForEach-Object {
Write-Debug "Creating $_ object..."
$s[$_] = new-object -type $_ -args $config
Add-Step $graph $s[$_]
}
Add-StepTransitions $graph $s[[UseScanFarm]] $s[[RepoUsername]],$s[[RepoPassword]],$s[[ScanFarmType]],$s[[ScanFarmSastLicense]],$s[[ScanFarmScaLicense]],
$s[[ScanFarmDatabaseHost]],$s[[ScanFarmDatabasePort]],$s[[ScanFarmDatabaseUsername]],$s[[ScanFarmDatabasePwd]],
$s[[ScanFarmDatabaseTls]],$s[[ScanFarmDatabaseCert]],$s[[ScanFarmScanServiceDatabaseName]],$s[[ScanFarmStorageServiceDatabaseName]],
$s[[ScanFarmRedisRequirements]],$s[[ScanFarmRedisHost]],$s[[ScanFarmRedisPort]],$s[[ScanFarmRedisDatabase]],
$s[[ScanFarmRedisAuth]],$s[[ScanFarmRedisPassword]],$s[[ScanFarmRedisTls]],$s[[ScanFarmRedisCert]],
$s[[ScanFarmStorage]],$s[[ScanFarmStorageBucketName]],$s[[ScanFarmCacheBucketName]]
Add-StepTransitions $graph $s[[ScanFarmType]] $s[[ScanFarmScaLicense]]
Add-StepTransitions $graph $s[[ScanFarmSastLicense]] $s[[ScanFarmDatabaseHost]]
Add-StepTransitions $graph $s[[ScanFarmCacheBucketName]] $s[[ScanFarmObjectStorageHostname]],$s[[ScanFarmObjectStoragePort]],$s[[ScanFarmObjectStorageAccessKey]],$s[[ScanFarmObjectStorageSecretKey]],$s[[ScanFarmS3StorageProxy]],$s[[ScanFarmS3StorageContextPath]],$s[[ScanFarmInClusterStorage]],$s[[ScanFarmInClusterStorageUrl]],$s[[ScanFarmObjectStorageTLS]],$s[[ScanFarmObjectStorageCert]],$s[[DockerRegistryHost]]
Add-StepTransitions $graph $s[[ScanFarmS3StorageProxy]] $s[[ScanFarmS3StorageExternalURL]],$s[[ScanFarmInClusterStorage]]
Add-StepTransitions $graph $s[[ScanFarmInClusterStorage]] $s[[ScanFarmObjectStorageTLS]]
Add-StepTransitions $graph $s[[ScanFarmObjectStorageTLS]] $s[[DockerRegistryHost]]
Add-StepTransitions $graph $s[[ScanFarmCacheBucketName]] $s[[ScanFarmS3AccessMethod]],$s[[ScanFarmS3AccessKey]],$s[[ScanFarmS3SecretKey]],$s[[ScanFarmS3Region]],$s[[DockerRegistryHost]]
Add-StepTransitions $graph $s[[ScanFarmCacheBucketName]] $s[[ScanFarmS3AccessMethod]],$s[[ScanFarmS3IamRoleServiceAccount]],$s[[ScanFarmS3Region]],$s[[DockerRegistryHost]]
Add-StepTransitions $graph $s[[ScanFarmCacheBucketName]] $s[[ScanFarmGcsProjectName]],$s[[ScanFarmGcsKey]],$s[[DockerRegistryHost]]
Add-StepTransitions $graph $s[[ScanFarmCacheBucketName]] $s[[ScanFarmAzureSubscription]],$s[[ScanFarmAzureTenantId]],$s[[ScanFarmAzureResourceGroup]],$s[[ScanFarmAzureStorageAccountName]],$s[[ScanFarmAzureStorageAccountKey]],$s[[ScanFarmAzureEndpoint]],$s[[ScanFarmAzureClientId]],$s[[ScanFarmAzureClientSecret]],$s[[DockerRegistryHost]]
Add-StepTransitions $graph $s[[UseToolOrchestration]] $s[[UseExternalStorage]]
Add-StepTransitions $graph $s[[UseExternalDatabase]] $s[[ExternalDatabaseHost]],$s[[ExternalDatabasePort]],$s[[ExternalDatabaseName]],$s[[ExternalDatabaseUser]],$s[[ExternalDatabasePwd]],$s[[ExternalDatabaseOneWayAuth]],$s[[ExternalDatabaseTrustCert]],$s[[ExternalDatabaseCert]],$s[[UseScanFarm]]
Add-StepTransitions $graph $s[[Welcome]] $s[[About]], `
$s[[Size]],
$s[[SrmWebLicense]],
$s[[WorkDir]],
$s[[ChooseEnvironment]],
$s[[Namespace]],
$s[[ReleaseName]],
$s[[UseExternalDatabase]],
$s[[DatabaseReplicaCount]],
$s[[UseScanFarm]],
$s[[UseDockerRegistry]],$s[[DockerRegistryHost]],
$s[[UseDockerRegistryCredential]],$s[[DockerImagePullSecret]],$s[[DockerRegistryUser]],$s[[DockerRegistryPwd]],
$s[[UseToolOrchestration]],$s[[ToolServiceReplicaCount]],
$s[[UseExternalStorage]],$s[[ServiceAccountNameToolService]],$s[[ServiceAccountNameWorkflow]],
$s[[ExternalStorageEndpoint]],$s[[ExternalStorageTLS]],$s[[ExternalStorageUsername]],$s[[ExternalStoragePassword]],$s[[ExternalStorageBucket]],$s[[ExternalStorageTrustCert]],$s[[ExternalStorageCertificate]],
$s[[UseNetworkPolicyOption]],$s[[GetKubernetesPort]],
$s[[UseTlsOption]],$s[[CertsCAPath]],$s[[SignerName]],
$s[[AuthenticationType]],$s[[SamlAuthenticationHostBasePath]],$s[[SamlIdpMetadata]],$s[[SamlAppName]],$s[[SamlKeystorePwd]],$s[[SamlPrivateKeyPwd]],$s[[SamlExtraConfig]],
$s[[IngressKind]],$s[[IngressClassName]],$s[[IngressTLS]],$s[[CertManagerIssuer]],$s[[IngressHostname]],
$s[[UseDefaultCACerts]],$s[[CACertsFile]],$s[[CACertsFilePassword]],$s[[AddExtraCertificates]],$s[[ExtraCertificates]],
$s[[GeneratePwds]],$s[[AdminPassword]],$s[[DatabaseRootPwd]],$s[[DatabaseReplicationPwd]],$s[[DatabaseUserPwd]],$s[[ToolServiceKey]],$s[[MinioAdminPassword]],
$s[[UseDockerRepositoryPrefix]],$s[[DockerRepositoryPrefix]],
$s[[UseDefaultDockerImages]],$s[[WebDockerImageVersion]],$s[[MariaDBDockerImageVersion]],$s[[ToolOrchestrationDockerImageVersion]],$s[[MinioDockerImageVersion]],$s[[WorkflowDockerImageVersion]],
$s[[DefaultCPU]],$s[[WebCPU]],$s[[MasterDatabaseCPU]],$s[[SubordinateDatabaseCPU]],$s[[ToolServiceCPU]],$s[[MinIOCPU]],$s[[WorkflowCPU]],
$s[[DefaultMemory]],$s[[WebMemory]],$s[[MasterDatabaseMemory]],$s[[SubordinateDatabaseMemory]],$s[[ToolServiceMemory]],$s[[MinIOMemory]],$s[[WorkflowMemory]],
$s[[DefaultEphemeralStorage]],$s[[WebEphemeralStorage]],$s[[MasterDatabaseEphemeralStorage]],$s[[SubordinateDatabaseEphemeralStorage]],$s[[ToolServiceEphemeralStorage]],$s[[MinIOEphemeralStorage]],$s[[WorkflowEphemeralStorage]],
$s[[DefaultVolumeSize]],$s[[WebVolumeSize]],$s[[MasterDatabaseVolumeSize]],$s[[SubordinateDatabaseVolumeSize]],$s[[SubordinateDatabaseBackupVolumeSize]],$s[[MinIOVolumeSize]],$s[[StorageClassName]],$s[[AuthCookieSecure]],
$s[[UseNodeSelectors]],$s[[WebNodeSelector]],$s[[MasterDatabaseNodeSelector]],$s[[SubordinateDatabaseNodeSelector]],$s[[ToolServiceNodeSelector]],$s[[MinIONodeSelector]],$s[[WorkflowControllerNodeSelector]],$s[[ToolNodeSelector]],$s[[UseTolerations]],
$s[[WebTolerations]],$s[[MasterDatabaseTolerations]],$s[[SubordinateDatabaseTolerations]],$s[[ToolServiceTolerations]],$s[[MinIOTolerations]],$s[[WorkflowControllerTolerations]],$s[[ToolTolerations]],
$s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[ToolOrchestrationDockerImageVersion]] $s[[WorkflowDockerImageVersion]]
Add-StepTransitions $graph $s[[ExternalStorageTLS]] $s[[ExternalStorageBucket]]
Add-StepTransitions $graph $s[[ToolTolerations]] $s[[Finish]]
Add-StepTransitions $graph $s[[AuthenticationType]] $s[[LdapInstructions]],$s[[IngressKind]]
Add-StepTransitions $graph $s[[AuthenticationType]] $s[[IngressKind]]
Add-StepTransitions $graph $s[[IngressTLS]] $s[[IngressTLSSecretName]],$s[[IngressHostname]]
Add-StepTransitions $graph $s[[IngressTLS]] $s[[IngressHostname]]
Add-StepTransitions $graph $s[[IngressKind]] $s[[IngressCertificateArn]],$s[[UseDefaultCACerts]]
Add-StepTransitions $graph $s[[IngressKind]] $s[[UseDefaultCACerts]]
Add-StepTransitions $graph $s[[IngressKind]] $s[[CACertsFile]]
Add-StepTransitions $graph $s[[IngressCertificateArn]] $s[[CACertsFile]]
Add-StepTransitions $graph $s[[IngressHostname]] $s[[CACertsFile]]
Add-StepTransitions $graph $s[[AddExtraCertificates]] $s[[GeneratePwds]]
Add-StepTransitions $graph $s[[UseExternalDatabase]] $s[[DatabaseReplicaCount]]
Add-StepTransitions $graph $s[[ExternalDatabaseOneWayAuth]] $s[[UseScanFarm]]
Add-StepTransitions $graph $s[[ExternalDatabaseTrustCert]] $s[[UseScanFarm]]
Add-StepTransitions $graph $s[[ExternalDatabaseCert]] $s[[UseScanFarm]]
Add-StepTransitions $graph $s[[GetKubernetesPort]] $s[[AuthenticationType]]
Add-StepTransitions $graph $s[[UseNetworkPolicyOption]] $s[[UseTlsOption]]
Add-StepTransitions $graph $s[[UseNetworkPolicyOption]] $s[[AuthenticationType]]
Add-StepTransitions $graph $s[[ScanFarmDatabaseTls]] $s[[ScanFarmScanServiceDatabaseName]]
Add-StepTransitions $graph $s[[ScanFarmRedisAuth]] $s[[ScanFarmRedisTls]]
Add-StepTransitions $graph $s[[ScanFarmRedisTls]] $s[[ScanFarmStorage]]
Add-StepTransitions $graph $s[[UseDockerRegistry]] $s[[UseToolOrchestration]]
Add-StepTransitions $graph $s[[UseDockerRegistryCredential]] $s[[UseToolOrchestration]]
Add-StepTransitions $graph $s[[UseToolOrchestration]] $s[[UseNetworkPolicyOption]]
Add-StepTransitions $graph $s[[UseExternalStorage]] $s[[ExternalStorageEndpoint]]
Add-StepTransitions $graph $s[[UseExternalStorage]] $s[[UseNetworkPolicyOption]]
Add-StepTransitions $graph $s[[ExternalStorageBucket]] $s[[UseNetworkPolicyOption]]
Add-StepTransitions $graph $s[[ExternalStorageTrustCert]] $s[[UseNetworkPolicyOption]]
Add-StepTransitions $graph $s[[UseTlsOption]] $s[[AuthenticationType]]
Add-StepTransitions $graph $s[[UseDefaultCACerts]] $s[[GeneratePwds]]
Add-StepTransitions $graph $s[[GeneratePwds]] $s[[UseDockerRepositoryPrefix]]
Add-StepTransitions $graph $s[[GeneratePwds]] $s[[UseDefaultDockerImages]]
Add-StepTransitions $graph $s[[AdminPassword]] $s[[ToolServiceKey]]
Add-StepTransitions $graph $s[[DatabaseRootPwd]] $s[[DatabaseUserPwd]]
Add-StepTransitions $graph $s[[AdminPassword]] $s[[UseDockerRepositoryPrefix]]
Add-StepTransitions $graph $s[[AdminPassword]] $s[[UseDefaultDockerImages]]
Add-StepTransitions $graph $s[[DatabaseUserPwd]] $s[[UseDockerRepositoryPrefix]]
Add-StepTransitions $graph $s[[DatabaseUserPwd]] $s[[UseDefaultDockerImages]]
Add-StepTransitions $graph $s[[ToolServiceKey]] $s[[UseDockerRepositoryPrefix]]
Add-StepTransitions $graph $s[[ToolServiceKey]] $s[[UseDefaultDockerImages]]
Add-StepTransitions $graph $s[[MinioAdminPassword]] $s[[UseDefaultDockerImages]]
Add-StepTransitions $graph $s[[UseDockerRepositoryPrefix]] $s[[UseDefaultDockerImages]]
Add-StepTransitions $graph $s[[UseDefaultDockerImages]] $s[[DefaultCPU]]
Add-StepTransitions $graph $s[[MariaDBDockerImageVersion]] $s[[DefaultCPU]]
Add-StepTransitions $graph $s[[WebDockerImageVersion]] $s[[DefaultCPU]]
Add-StepTransitions $graph $s[[UseDefaultDockerImages]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[MariaDBDockerImageVersion]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[WebDockerImageVersion]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[WorkflowDockerImageVersion]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[WebDockerImageVersion]] $s[[ToolOrchestrationDockerImageVersion]]
Add-StepTransitions $graph $s[[WebCPU]] $s[[ToolServiceCPU]]
Add-StepTransitions $graph $s[[WebCPU]] $s[[DefaultMemory]]
Add-StepTransitions $graph $s[[MasterDatabaseCPU]] $s[[ToolServiceCPU]]
Add-StepTransitions $graph $s[[MasterDatabaseCPU]] $s[[DefaultMemory]]
Add-StepTransitions $graph $s[[SubordinateDatabaseCPU]] $s[[DefaultMemory]]
Add-StepTransitions $graph $s[[ToolServiceCPU]] $s[[WorkflowCPU]]
Add-StepTransitions $graph $s[[DefaultCPU]] $s[[DefaultMemory]]
Add-StepTransitions $graph $s[[WebMemory]] $s[[ToolServiceMemory]]
Add-StepTransitions $graph $s[[WebMemory]] $s[[DefaultEphemeralStorage]]
Add-StepTransitions $graph $s[[MasterDatabaseMemory]] $s[[ToolServiceMemory]]
Add-StepTransitions $graph $s[[MasterDatabaseMemory]] $s[[DefaultEphemeralStorage]]
Add-StepTransitions $graph $s[[SubordinateDatabaseMemory]] $s[[DefaultEphemeralStorage]]
Add-StepTransitions $graph $s[[ToolServiceMemory]] $s[[WorkflowMemory]]
Add-StepTransitions $graph $s[[DefaultMemory]] $s[[DefaultEphemeralStorage]]
Add-StepTransitions $graph $s[[WebEphemeralStorage]] $s[[ToolServiceEphemeralStorage]]
Add-StepTransitions $graph $s[[WebEphemeralStorage]] $s[[DefaultVolumeSize]]
Add-StepTransitions $graph $s[[MasterDatabaseEphemeralStorage]] $s[[ToolServiceEphemeralStorage]]
Add-StepTransitions $graph $s[[MasterDatabaseEphemeralStorage]] $s[[DefaultVolumeSize]]
Add-StepTransitions $graph $s[[SubordinateDatabaseEphemeralStorage]] $s[[DefaultVolumeSize]]
Add-StepTransitions $graph $s[[ToolServiceEphemeralStorage]] $s[[WorkflowEphemeralStorage]]
Add-StepTransitions $graph $s[[DefaultEphemeralStorage]] $s[[DefaultVolumeSize]]
Add-StepTransitions $graph $s[[WebVolumeSize]] $s[[MinIOVolumeSize]]
Add-StepTransitions $graph $s[[WebVolumeSize]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[MasterDatabaseVolumeSize]] $s[[MinIOVolumeSize]]
Add-StepTransitions $graph $s[[MasterDatabaseVolumeSize]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[SubordinateDatabaseBackupVolumeSize]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[DefaultVolumeSize]] $s[[StorageClassName]]
Add-StepTransitions $graph $s[[StorageClassName]] $s[[UseNodeSelectors]]
Add-StepTransitions $graph $s[[StorageClassName]] $s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[StorageClassName]] $s[[Finish]]
Add-StepTransitions $graph $s[[AuthCookieSecure]] $s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[AuthCookieSecure]] $s[[Finish]]
Add-StepTransitions $graph $s[[WebNodeSelector]] $s[[ToolServiceNodeSelector]]
Add-StepTransitions $graph $s[[WebNodeSelector]] $s[[UseTolerations]]
Add-StepTransitions $graph $s[[MasterDatabaseNodeSelector]] $s[[ToolServiceNodeSelector]]
Add-StepTransitions $graph $s[[MasterDatabaseNodeSelector]] $s[[UseTolerations]]
Add-StepTransitions $graph $s[[SubordinateDatabaseNodeSelector]] $s[[UseTolerations]]
Add-StepTransitions $graph $s[[ToolServiceNodeSelector]] $s[[WorkflowControllerNodeSelector]]
Add-StepTransitions $graph $s[[UseNodeSelectors]] $s[[UseTolerations]]
Add-StepTransitions $graph $s[[WebTolerations]] $s[[ToolServiceTolerations]]
Add-StepTransitions $graph $s[[WebTolerations]] $s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[WebTolerations]] $s[[Finish]]
Add-StepTransitions $graph $s[[MasterDatabaseTolerations]] $s[[ToolServiceTolerations]]
Add-StepTransitions $graph $s[[MasterDatabaseTolerations]] $s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[MasterDatabaseTolerations]] $s[[Finish]]
Add-StepTransitions $graph $s[[SubordinateDatabaseTolerations]] $s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[SubordinateDatabaseTolerations]] $s[[Finish]]
Add-StepTransitions $graph $s[[ToolServiceTolerations]] $s[[WorkflowControllerTolerations]]
Add-StepTransitions $graph $s[[UseTolerations]] $s[[Lock]],$s[[Finish]]
Add-StepTransitions $graph $s[[UseTolerations]] $s[[Finish]]
if ($DebugPreference -eq 'Continue') {
# Print graph at https://dreampuf.github.io/GraphvizOnline (select 'dot' Engine and use Format 'png-image-element')
write-host 'digraph G {'
$s.keys | ForEach-Object { $node = $s[$_]; ($node.getNeighbors() | ForEach-Object { write-host ('{0} -> {1};' -f $node.name,$_) }) }
write-host '}'
}
try {
$vStack = Invoke-GuidedSetup 'SRM - Helm Prep Wizard' $s[[Welcome]] ($s[[Finish]],$s[[Abort]])
Write-StepGraph (Join-Path ($config.workDir ?? './') 'graph.path') $s $vStack
} catch {
Write-Host "`n`nAn unexpected error occurred: $_`n"
Write-Host $_.ScriptStackTrace
}