-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.yaml
executable file
·631 lines (555 loc) · 15.7 KB
/
schema.yaml
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
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
title: "Use OCI DevOps with OKE"
description: "Create and connect an OKE cluster and DevOps Deploy service to manage your Kubernetes deployments."
schemaVersion: 1.1.0
version: "20190304"
locale: "en"
#################
# Variable Groups
#################
variableGroups:
- title: General Configuration
visible: false
variables:
- tenancy_ocid
- region
- node_pool_boot_volume_size_in_gbs
- oke_compartment_description
- user_ocid
- fingerprint
- private_key_path
- network_cidrs
- cluster_options_admission_controller_options_is_pod_security_policy_enabled
- deploy_pipeline_deploy_pipeline_parameters_items_default_value
- deploy_pipeline_deploy_pipeline_parameters_items_description
- deploy_pipeline_deploy_pipeline_parameters_items_name
- release
- title: DevOps Project
visible: true
variables:
- compartment_id
- app_name
- execute_deployment
- show_advanced
- log_group_display_name
- notification_topic_name
- project_description
- project_logging_config_display_name_prefix
- project_logging_config_is_archiving_enabled
- project_logging_config_retention_period_in_days
- title: DevOps Environments
visible:
and:
- show_advanced
variables:
- environment_type
- environment_description
- environment_display_name
- title: DevOps Artifacts
visible:
and:
- show_advanced
variables:
- deploy_artifact_source_type
- deploy_artifact_type
- argument_substitution_mode
- title: Pipelines & Stages
visible:
and:
- show_advanced
variables:
- deploy_pipeline_display_name
- deploy_pipeline_description
- deploy_stage_deploy_stage_type
- deploy_stage_namespace
- deploy_stage_display_name
- deploy_stage_description
- title: Policy Settings
description: Policy setting for the stack deployment
visible: true
variables:
- create_dynamic_group_for_devops_pipln_in_compartment
- create_dynamic_group_for_nodes_in_compartment
- existent_dynamic_group_for_nodes_in_compartment
- create_compartment_policies
- create_tenancy_policies
- title: Encryption Settings
description: Policy setting for the stack deployment
visible: true
variables:
- use_encryption_from_oci_vault
- create_new_encryption_key
- existent_encryption_key_id
- create_vault_policies_for_group
- user_admin_group_for_vault_policy
- title: "OKE Cluster Configuration"
variables:
- create_new_oke_cluster
- existent_oke_cluster_compartment_ocid
- existent_oke_cluster_id
- k8s_version
- cluster_workers_visibility
- cluster_endpoint_visibility
- create_new_compartment_for_oke
- cluster_options_add_ons_is_kubernetes_dashboard_enabled
- title: "OKE Worker Nodes"
variables:
- cluster_autoscaler_enabled
- num_pool_workers
- cluster_autoscaler_min_nodes
- cluster_autoscaler_max_nodes
- existent_oke_nodepool_id_for_autoscaler
- node_pool_shape
- node_pool_node_shape_config_ocpus
- node_pool_node_shape_config_memory_in_gbs
- generate_public_ssh_key
- public_ssh_key
- image_operating_system
- image_operating_system_version
- node_pool_name
#################
# Output Groups
#################
outputGroups:
- title: Service Endpoints
outputs:
- theia_public_ip
- title: Generated Passwords
outputs:
- generated_ssh_private_key
outputs:
theia_public_ip:
type: link
title: Your Theia website
description: Open Theia website
generated_ssh_private_key:
title: "Generated SSH Private Key"
description: "Generated SSH Private Key"
type: copyableString
visible: true
primaryOutputButton: theia_public_ip
######################
# Variable Definitions
######################
variables:
compartment_id:
type: oci:identity:compartment:id
title: "Compartment"
description: "The compartment in which to create resources"
required: true
app_name:
type: string
title: "Project Name"
required: true
execute_deployment:
type: boolean
title: "Execute deployment in DevOps Pipeline?"
description: "Choose if you want to start deployment in DevOps Pipeline as a part of this Terraform automation."
visible: true
default: false
show_advanced:
type: boolean
title: "Show advanced options?"
description: "Shows advanced options, allowing enable customer-managed encryption keys, select your ssh key, select/unselect cluster utilities, do not create policies, and other advanced options"
visible: true
default: false
## DevOps
log_group_display_name:
type: string
title: "Log Group Name"
description: "Display name for the Log Group"
default: "devops-logs"
required: true
visible:
and:
- show_advanced
notification_topic_name:
type: string
title: "Notification Topic Name"
description: "Name of the notification topic used for messages about the project"
default: "devops-topic"
required: true
visible:
and:
- show_advanced
project_description:
type: string
title: "DevOps Project Description"
description: "A short description for the DevOps project"
default: "DevOps Project for OKE deployment"
required: true
visible:
and:
- show_advanced
project_logging_config_display_name_prefix:
type: string
title: "Prefix for Logging Config"
description: "Display name for the Log Group"
default: "demo-"
required: true
visible:
and:
- show_advanced
project_logging_config_is_archiving_enabled:
type: boolean
title: "Archiving enabled for Project Logging "
description: "Display name for the Log Group"
default: false
required: true
visible:
and:
- show_advanced
project_logging_config_retention_period_in_days:
type: string
title: "Project Logs retention period"
description: "Days to retain logs from the Project."
default: 30
required: true
visible:
and:
- show_advanced
#############
# Environment
#############
environment_type:
type: enum
enum:
- "OKE_CLUSTER"
title: "Environment Type"
description: "The type of environment to target. Stack currently supports only OKE_CLUSTER"
default: "OKE_CLUSTER"
visible:
and:
- show_advanced
environment_description:
type: string
title: "Environment Description"
description: "Describe the DevOps Environment"
default: "OKE environment that can be targeted by devops"
visible:
and:
- show_advanced
environment_display_name:
type: string
title: "Environment Name"
description: "Name for the DevOps Environment"
default: "DevOps OKE Environment"
############
# Artifacts
############
deploy_artifact_source_type:
type: enum
enum:
- "INLINE"
title: "Artifact Source Type"
description: "The source type of artifact. Stack currently supports only INLINE"
default: "INLINE"
deploy_artifact_type:
type: enum
enum:
- "KUBERNETES_MANIFEST"
title: "Artifact Type"
description: "The type of Artifact. Stack currently supports only KUBERNETES_MANIFEST"
default: "KUBERNETES_MANIFEST"
argument_substitution_mode:
type: enum
enum:
- "NONE"
title: "Argument substitution for the Artifact"
description: "Artifacts can have arguments that are substituted with values are runtime. Stack currently supports only NONE"
default: "NONE"
###########
# Pipeline
###########
create_dynamic_group_for_devops_pipln_in_compartment:
type: boolean
title: "Create a Dynamic Group for DevOps Pipelines"
description: |
You need to be an administrator to do this.
Alternatively you can have the administrator create Dynamic group for you.
default: true
deploy_pipeline_display_name:
type: string
title: "Pipleline Name"
description: "Display name for the Pipleline"
default: "devops-oke-pipeline"
deploy_pipeline_description:
type: string
title: "Pipeline Description"
description: "Description for the Pipeline"
default: "Devops Pipleline demo for OKE"
deploy_stage_deploy_stage_type:
type: enum
enum:
- "OKE_DEPLOYMENT"
title: "Stage type"
description: "Display name for the Log Group"
default: "OKE_DEPLOYMENT"
deploy_stage_namespace:
type: string
title: "Kubernetes Namespace to use"
description: "Kubernetes namespace to use for deployment."
default: "default"
deploy_stage_display_name:
type: string
title: "Stage Name"
description: "Name for the deployment stage."
default: "deploy_OKE"
deploy_stage_description:
type: string
title: "Stage Description"
description: "Description for the deployment stage"
default: "test deployment to OKE"
####################
## OKE
####################
create_new_oke_cluster:
type: boolean
title: "Create new OKE Cluster"
existent_oke_cluster_compartment_ocid:
type: oci:identity:compartment:id
title: "Existent OKE Cluster Compartment"
description: "The compartment where you find the existent OKE Cluster"
default: compartment_ocid
required: true
visible:
not:
- create_new_oke_cluster
existent_oke_cluster_id:
type: oci:container:cluster:id
title: "Existent OKE Cluster"
required: true
dependsOn:
compartmentId: existent_oke_cluster_compartment_ocid
visible:
not:
- create_new_oke_cluster
k8s_version:
type: enum
enum: # Necessary hardcoded supported versions, as ORM does not retrieve the versions from OKE.
- "Latest"
- "v1.19.7"
- "v1.18.10"
- "v1.17.13"
- "v1.16.15"
title: "Kubernetes Version"
required: true
visible:
and:
- create_new_oke_cluster
- show_advanced
cluster_workers_visibility:
type: enum
enum:
- "Private"
- "Public"
title: "Choose Worker Nodes visibility type"
required: true
visible:
and:
- create_new_oke_cluster
cluster_endpoint_visibility:
type: enum
enum:
# - "Private"
- "Public"
title: "Choose Kubernetes API Endpoint visibility type"
required: true
visible:
and:
- create_new_oke_cluster
create_new_compartment_for_oke:
type: boolean
title: "Create new Compartment"
visible:
and:
- create_new_oke_cluster
- show_advanced
num_pool_workers:
type: integer
title: "Number of Worker Nodes"
minimum: 1
maximum: 1000
required: true
visible:
and:
- create_new_oke_cluster
node_pool_shape:
type: oci:core:instanceshape:name
title: "Select a shape for the Worker Nodes instances"
required: true
dependsOn:
compartmentId: compartment_ocid
visible:
and:
- create_new_oke_cluster
node_pool_node_shape_config_ocpus:
type: integer
minimum: 1
maximum: 64
title: "Number of OCPUs"
visible:
and:
- and:
- create_new_oke_cluster
- or:
- eq:
- node_pool_shape
- "VM.Standard.E3.Flex"
- eq:
- node_pool_shape
- "VM.Standard.E4.Flex"
- eq:
- node_pool_shape
- "VM.Standard.A1.Flex"
node_pool_node_shape_config_memory_in_gbs:
type: integer
minimum: 1
maximum: 1024
title: "Amount of memory (GB)"
visible:
and:
- and:
- create_new_oke_cluster
- or:
- eq:
- node_pool_shape
- "VM.Standard.E3.Flex"
- eq:
- node_pool_shape
- "VM.Standard.E4.Flex"
- eq:
- node_pool_shape
- "VM.Standard.A1.Flex"
node_pool_name:
type: string
title: "Node Pool Name"
required: true
visible:
and:
- create_new_oke_cluster
- show_advanced
cluster_options_add_ons_is_kubernetes_dashboard_enabled:
type: boolean
title: "Kubernetes Dashboard Enabled"
visible: false
generate_public_ssh_key:
type: boolean
title: "Auto generate public ssh key?"
required: true
visible:
and:
- create_new_oke_cluster
- show_advanced
public_ssh_key:
type: oci:core:ssh:publickey
title: "Import your own SSH public key"
additionalProps:
allowMultiple: true
required: false
pattern: "((^(ssh-rsa AAAAB3NzaC1yc2|ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNT|ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzOD|ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1Mj|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5|ssh-dss AAAAB3NzaC1kc3)[0-9A-Za-z+\/]+[=]{0,3})( [^,]*)?)(,((ssh-rsa AAAAB3NzaC1yc2|ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNT|ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzOD|ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1Mj|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5|ssh-dss AAAAB3NzaC1kc3)[0-9A-Za-z+\/]+[=]{0,3})( [^,]*)?)*$"
visible:
and:
- and:
- create_new_oke_cluster
- show_advanced
- not:
- generate_public_ssh_key
image_operating_system:
type: enum
title: "Image OS"
enum:
- "Oracle Linux"
required: true
visible:
and:
- create_new_oke_cluster
- show_advanced
image_operating_system_version:
type: string
required: true
title: "Image OS Version"
visible:
and:
- create_new_oke_cluster
- show_advanced
create_dynamic_group_for_nodes_in_compartment:
type: boolean
title: "Create Dynamic Group for Worker Nodes in the Compartment"
required: true
visible:
and:
- show_advanced
existent_dynamic_group_for_nodes_in_compartment:
type: string
required: true
title: "Existent Dynamic Group"
visible:
and:
- and:
- show_advanced
- or:
- create_compartment_policies
- create_tenancy_policies
- not:
- create_dynamic_group_for_nodes_in_compartment
create_compartment_policies:
type: boolean
title: "Create Compartment Policies"
required: true
visible:
and:
- show_advanced
create_tenancy_policies:
type: boolean
title: "Create Tenancy Policies"
required: true
visible:
and:
- show_advanced
# Encryption options
use_encryption_from_oci_vault:
type: boolean
title: "Encrypt using Customer-Managed Keys instead of Oracle Managed Encryption"
visible:
and:
- create_new_oke_cluster
- show_advanced
create_new_encryption_key:
type: boolean
title: "Create new Vault and Key"
visible:
and:
- create_new_oke_cluster
- show_advanced
- use_encryption_from_oci_vault
existent_encryption_key_id:
type: string
title: "Existent Encryption Key OCID"
required: true
visible:
and:
- and:
- create_new_oke_cluster
- show_advanced
- use_encryption_from_oci_vault
- not:
- create_new_encryption_key
create_vault_policies_for_group:
type: boolean
title: "Create policies for the user group to manage vault and keys"
visible:
and:
- create_new_oke_cluster
- show_advanced
- use_encryption_from_oci_vault
- create_new_encryption_key
user_admin_group_for_vault_policy:
type: string
title: "Specify your group to include the policy"
visible:
and:
- create_new_oke_cluster
- show_advanced
- use_encryption_from_oci_vault
- create_new_encryption_key
- create_vault_policies_for_group