forms.go 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255
  1. package infra
  2. const testForm = `name: Test
  3. hasSource: false
  4. includeHiddenFields: true
  5. isClusterScoped: true
  6. tabs:
  7. - name: main
  8. label: Configuration
  9. sections:
  10. - name: section_one
  11. contents:
  12. - type: heading
  13. label: String to echo
  14. - type: string-input
  15. variable: echo
  16. settings:
  17. default: hello
  18. `
  19. const s3Form = `name: S3
  20. hasSource: false
  21. includeHiddenFields: true
  22. isClusterScoped: true
  23. tabs:
  24. - name: main
  25. label: Main
  26. sections:
  27. - name: heading
  28. contents:
  29. - type: heading
  30. label: S3 Settings
  31. - name: bucket_name
  32. contents:
  33. - type: string-input
  34. label: Bucket Name
  35. required: true
  36. placeholder: "s3-bucket-name"
  37. variable: bucket_name
  38. `
  39. const rdsForm = `name: RDS
  40. hasSource: false
  41. includeHiddenFields: true
  42. isClusterScoped: true
  43. tabs:
  44. - name: main
  45. label: Main
  46. sections:
  47. - name: heading
  48. contents:
  49. - type: heading
  50. label: Database Settings
  51. - name: user
  52. contents:
  53. - type: string-input
  54. label: Database Master User
  55. required: true
  56. placeholder: "admin"
  57. variable: db_user
  58. - name: password
  59. contents:
  60. - type: string-input
  61. required: true
  62. label: Database Master Password
  63. variable: db_passwd
  64. - name: name
  65. contents:
  66. - type: string-input
  67. label: Database Name
  68. required: true
  69. placeholder: "rds-staging"
  70. variable: db_name
  71. - name: machine-type
  72. contents:
  73. - type: select
  74. label: ⚙️ Database Machine Type
  75. variable: machine_type
  76. settings:
  77. default: db.t3.medium
  78. options:
  79. - label: db.t2.medium
  80. value: db.t2.medium
  81. - label: db.t2.xlarge
  82. value: db.t2.xlarge
  83. - label: db.t2.2xlarge
  84. value: db.t2.2xlarge
  85. - label: db.t3.medium
  86. value: db.t3.medium
  87. - label: db.t3.xlarge
  88. value: db.t3.xlarge
  89. - label: db.t3.2xlarge
  90. value: db.t3.2xlarge
  91. - label: db.r5.large
  92. value: db.r5.large
  93. - label: db.r5.xlarge
  94. value: db.r5.xlarge
  95. - label: db.r5.2xlarge
  96. value: db.r5.2xlarge
  97. - name: family-versions
  98. contents:
  99. - type: select
  100. label: Database Family Version
  101. variable: db_family
  102. settings:
  103. default: postgres13
  104. options:
  105. - label: "Postgres 9"
  106. value: postgres9
  107. - label: "Postgres 10"
  108. value: postgres10
  109. - label: "Postgres 11"
  110. value: postgres11
  111. - label: "Postgres 12"
  112. value: postgres12
  113. - label: "Postgres 13"
  114. value: postgres13
  115. - label: "Postgres 14"
  116. value: postgres14
  117. - name: pg-9-versions
  118. show_if:
  119. is: "postgres9"
  120. variable: db_family
  121. contents:
  122. - type: select
  123. label: Database Version
  124. variable: db_engine_version
  125. settings:
  126. default: "9.6.23"
  127. options:
  128. - label: "v9.6.1"
  129. value: "9.6.1"
  130. - label: "v9.6.2"
  131. value: "9.6.2"
  132. - label: "v9.6.3"
  133. value: "9.6.3"
  134. - label: "v9.6.4"
  135. value: "9.6.4"
  136. - label: "v9.6.5"
  137. value: "9.6.5"
  138. - label: "v9.6.6"
  139. value: "9.6.6"
  140. - label: "v9.6.7"
  141. value: "9.6.7"
  142. - label: "v9.6.8"
  143. value: "9.6.8"
  144. - label: "v9.6.10"
  145. value: "9.6.10"
  146. - label: "v9.6.11"
  147. value: "9.6.11"
  148. - label: "v9.6.12"
  149. value: "9.6.12"
  150. - label: "v9.6.13"
  151. value: "9.6.13"
  152. - label: "v9.6.14"
  153. value: "9.6.14"
  154. - label: "v9.6.15"
  155. value: "9.6.15"
  156. - label: "v9.6.16"
  157. value: "9.6.16"
  158. - label: "v9.6.17"
  159. value: "9.6.17"
  160. - label: "v9.6.18"
  161. value: "9.6.18"
  162. - label: "v9.6.19"
  163. value: "9.6.19"
  164. - label: "v9.6.20"
  165. value: "9.6.20"
  166. - label: "v9.6.21"
  167. value: "9.6.21"
  168. - label: "v9.6.22"
  169. value: "9.6.22"
  170. - label: "v9.6.23"
  171. value: "9.6.23"
  172. - name: pg-10-versions
  173. show_if:
  174. is: "postgres10"
  175. variable: db_family
  176. contents:
  177. - type: select
  178. label: Database Version
  179. variable: db_engine_version
  180. settings:
  181. default: "10.22"
  182. options:
  183. - label: "v10.1"
  184. value: "10.1"
  185. - label: "v10.2"
  186. value: "10.2"
  187. - label: "v10.3"
  188. value: "10.3"
  189. - label: "v10.4"
  190. value: "10.4"
  191. - label: "v10.5"
  192. value: "10.5"
  193. - label: "v10.6"
  194. value: "10.6"
  195. - label: "v10.7"
  196. value: "10.7"
  197. - label: "v10.8"
  198. value: "10.8"
  199. - label: "v10.9"
  200. value: "10.9"
  201. - label: "v10.10"
  202. value: "10.10"
  203. - label: "v10.11"
  204. value: "10.11"
  205. - label: "v10.12"
  206. value: "10.12"
  207. - label: "v10.13"
  208. value: "10.13"
  209. - label: "v10.14"
  210. value: "10.14"
  211. - label: "v10.15"
  212. value: "10.15"
  213. - label: "v10.16"
  214. value: "10.16"
  215. - label: "v10.17"
  216. value: "10.17"
  217. - label: "v10.18"
  218. value: "10.18"
  219. - label: "v10.19"
  220. value: "10.19"
  221. - label: "v10.20"
  222. value: "10.20"
  223. - label: "v10.21"
  224. value: "10.21"
  225. - label: "v10.22"
  226. value: "10.22"
  227. - name: pg-11-versions
  228. show_if:
  229. is: "postgres11"
  230. variable: db_family
  231. contents:
  232. - type: select
  233. label: Database Version
  234. variable: db_engine_version
  235. settings:
  236. default: "11.17"
  237. options:
  238. - label: "v11.1"
  239. value: "11.1"
  240. - label: "v11.2"
  241. value: "11.2"
  242. - label: "v11.3"
  243. value: "11.3"
  244. - label: "v11.4"
  245. value: "11.4"
  246. - label: "v11.5"
  247. value: "11.5"
  248. - label: "v11.6"
  249. value: "11.6"
  250. - label: "v11.7"
  251. value: "11.7"
  252. - label: "v11.8"
  253. value: "11.8"
  254. - label: "v11.9"
  255. value: "11.9"
  256. - label: "v11.10"
  257. value: "11.10"
  258. - label: "v11.11"
  259. value: "11.11"
  260. - label: "v11.12"
  261. value: "11.12"
  262. - label: "v11.13"
  263. value: "11.13"
  264. - label: "v11.14"
  265. value: "11.14"
  266. - label: "v11.15"
  267. value: "11.15"
  268. - label: "v11.16"
  269. value: "11.16"
  270. - label: "v11.17"
  271. value: "11.17"
  272. - name: pg-12-versions
  273. show_if:
  274. is: "postgres12"
  275. variable: db_family
  276. contents:
  277. - type: select
  278. label: Database Version
  279. variable: db_engine_version
  280. settings:
  281. default: "12.12"
  282. options:
  283. - label: "v12.2"
  284. value: "12.2"
  285. - label: "v12.3"
  286. value: "12.3"
  287. - label: "v12.4"
  288. value: "12.4"
  289. - label: "v12.5"
  290. value: "12.5"
  291. - label: "v12.6"
  292. value: "12.6"
  293. - label: "v12.7"
  294. value: "12.7"
  295. - label: "v12.8"
  296. value: "12.8"
  297. - label: "v12.9"
  298. value: "12.9"
  299. - label: "v12.10"
  300. value: "12.10"
  301. - label: "v12.11"
  302. value: "12.11"
  303. - label: "v12.12"
  304. value: "12.12"
  305. - name: pg-13-versions
  306. show_if:
  307. is: "postgres13"
  308. variable: db_family
  309. contents:
  310. - type: select
  311. label: Database Version
  312. variable: db_engine_version
  313. settings:
  314. default: "13.8"
  315. options:
  316. - label: "v13.1"
  317. value: "13.1"
  318. - label: "v13.2"
  319. value: "13.2"
  320. - label: "v13.3"
  321. value: "13.3"
  322. - label: "v13.4"
  323. value: "13.4"
  324. - label: "v13.5"
  325. value: "13.5"
  326. - label: "v13.6"
  327. value: "13.6"
  328. - label: "v13.7"
  329. value: "13.7"
  330. - label: "v13.8"
  331. value: "13.8"
  332. - name: pg-14-versions
  333. show_if:
  334. is: "postgres14"
  335. variable: db_family
  336. contents:
  337. - type: select
  338. label: Database Version
  339. variable: db_engine_version
  340. settings:
  341. default: "14.5"
  342. options:
  343. - label: "v14.1"
  344. value: "14.1"
  345. - label: "v14.2"
  346. value: "14.2"
  347. - label: "v14.3"
  348. value: "14.3"
  349. - label: "v14.4"
  350. value: "14.4"
  351. - label: "v14.5"
  352. value: "14.5"
  353. - name: additional-settings
  354. contents:
  355. - type: heading
  356. label: Additional Settings
  357. - type: checkbox
  358. variable: db_deletion_protection
  359. label: Enable deletion protection for the database.
  360. settings:
  361. default: false
  362. - name: storage
  363. label: Storage
  364. sections:
  365. - name: storage
  366. contents:
  367. - type: heading
  368. label: Storage Settings
  369. - type: number-input
  370. label: Specify the amount of storage to allocate to this instance in gigabytes.
  371. variable: db_allocated_storage
  372. placeholder: "ex: 10"
  373. settings:
  374. default: 10
  375. - type: number-input
  376. label: Specify the maximum storage that this instance can scale to in gigabytes.
  377. variable: db_max_allocated_storage
  378. placeholder: "ex: 20"
  379. settings:
  380. default: 20
  381. - type: checkbox
  382. variable: db_storage_encrypted
  383. label: Enable storage encryption for the database.
  384. settings:
  385. default: false
  386. - name: advanced
  387. label: Advanced
  388. sections:
  389. - name: replicas
  390. contents:
  391. - type: heading
  392. label: Read Replicas
  393. - type: subtitle
  394. label: Specify the number of read replicas to run alongside your RDS instance.
  395. - type: number-input
  396. label: Replicas
  397. variable: db_replicas
  398. placeholder: "ex: 1"
  399. settings:
  400. default: 0`
  401. const ecrForm = `name: ECR
  402. hasSource: false
  403. includeHiddenFields: true
  404. tabs:
  405. - name: main
  406. label: Configuration
  407. sections:
  408. - name: section_one
  409. contents:
  410. - type: heading
  411. label: ECR Configuration
  412. - type: string-input
  413. label: ECR Name
  414. required: true
  415. placeholder: my-awesome-registry
  416. variable: ecr_name
  417. `
  418. const eksForm = `name: EKS
  419. hasSource: false
  420. includeHiddenFields: true
  421. tabs:
  422. - name: main
  423. label: Configuration
  424. sections:
  425. - name: section_one
  426. contents:
  427. - type: heading
  428. label: EKS Configuration
  429. - type: select
  430. label: ⚙️ AWS Machine Type
  431. variable: machine_type
  432. settings:
  433. default: t2.medium
  434. options:
  435. - label: t2.medium
  436. value: t2.medium
  437. - label: t2.large
  438. value: t2.large
  439. - label: t2.xlarge
  440. value: t2.xlarge
  441. - label: t2.2xlarge
  442. value: t2.2xlarge
  443. - label: t3.medium
  444. value: t3.medium
  445. - label: t3.large
  446. value: t3.large
  447. - label: t3.xlarge
  448. value: t3.xlarge
  449. - label: t3.2xlarge
  450. value: t3.2xlarge
  451. - label: c6i.large
  452. value: c6i.large
  453. - label: c6i.xlarge
  454. value: c6i.xlarge
  455. - label: c6i.2xlarge
  456. value: c6i.2xlarge
  457. - label: c6i.4xlarge
  458. value: c6i.4xlarge
  459. - label: m6i.large
  460. value: m6i.large
  461. - label: m6i.xlarge
  462. value: m6i.xlarge
  463. - label: m6i.2xlarge
  464. value: m6i.2xlarge
  465. - label: m6i.4xlarge
  466. value: m6i.4xlarge
  467. - label: r5.large
  468. value: r5.large
  469. - label: r5.xlarge
  470. value: r5.xlarge
  471. - type: string-input
  472. label: 👤 Issuer Email
  473. required: true
  474. placeholder: example@example.com
  475. variable: issuer_email
  476. - type: string-input
  477. label: EKS Cluster Name
  478. required: true
  479. placeholder: my-cluster
  480. variable: cluster_name
  481. - type: select
  482. label: EKS control plane version
  483. variable: cluster_version
  484. settings:
  485. default: "1.22"
  486. options:
  487. - label: "1.20"
  488. value: "1.20"
  489. - label: "1.21"
  490. value: "1.21"
  491. - label: "1.22"
  492. value: "1.22"
  493. - label: "1.23"
  494. value: "1.23"
  495. - label: "1.24"
  496. value: "1.24"
  497. - type: number-input
  498. label: Minimum number of EC2 instances to create in the application autoscaling group.
  499. variable: min_instances
  500. placeholder: "ex: 1"
  501. settings:
  502. default: 1
  503. - type: number-input
  504. label: Maximum number of EC2 instances to create in the application autoscaling group.
  505. variable: max_instances
  506. placeholder: "ex: 10"
  507. settings:
  508. default: 10
  509. - name: additional_nodegroup
  510. label: Additional Node Groups
  511. sections:
  512. - name: is_additional_enabled
  513. contents:
  514. - type: heading
  515. label: Additional Node Groups
  516. - type: checkbox
  517. variable: additional_nodegroup_enabled
  518. label: Enable an additional node group for this cluster.
  519. settings:
  520. default: false
  521. - name: additional_settings
  522. show_if: additional_nodegroup_enabled
  523. contents:
  524. - type: string-input
  525. label: Label for this node group. Multiple labels should be comma separated.
  526. variable: additional_nodegroup_label
  527. placeholder: "ex: porter.run/workload-kind=job"
  528. settings:
  529. default: porter.run/workload-kind=database
  530. - type: string-input
  531. label: Taint for this node group.
  532. variable: additional_nodegroup_taint
  533. placeholder: "ex: porter.run/workload-kind=job:NoSchedule"
  534. settings:
  535. default: porter.run/workload-kind=database:NoSchedule
  536. - type: checkbox
  537. variable: additional_stateful_nodegroup_enabled
  538. label: Stateful Workload
  539. settings:
  540. default: false
  541. - type: select
  542. label: ⚙️ AWS System Machine Type
  543. variable: additional_nodegroup_machine_type
  544. settings:
  545. default: t2.medium
  546. options:
  547. - label: t2.medium
  548. value: t2.medium
  549. - label: t2.large
  550. value: t2.large
  551. - label: t2.xlarge
  552. value: t2.xlarge
  553. - label: t2.2xlarge
  554. value: t2.2xlarge
  555. - label: t3.medium
  556. value: t3.medium
  557. - label: t3.large
  558. value: t3.large
  559. - label: t3.xlarge
  560. value: t3.xlarge
  561. - label: t3.2xlarge
  562. value: t3.2xlarge
  563. - label: c6i.large
  564. value: c6i.large
  565. - label: c6i.xlarge
  566. value: c6i.xlarge
  567. - label: c6i.2xlarge
  568. value: c6i.2xlarge
  569. - label: c6i.4xlarge
  570. value: c6i.4xlarge
  571. - label: m6i.large
  572. value: m6i.large
  573. - label: m6i.xlarge
  574. value: m6i.xlarge
  575. - label: m6i.2xlarge
  576. value: m6i.2xlarge
  577. - label: m6i.4xlarge
  578. value: m6i.4xlarge
  579. - type: number-input
  580. label: Minimum number of EC2 instances to create in the application autoscaling group.
  581. variable: additional_nodegroup_min_instances
  582. placeholder: "ex: 1"
  583. settings:
  584. default: 1
  585. - type: number-input
  586. label: Maximum number of EC2 instances to create in the application autoscaling group.
  587. variable: additional_nodegroup_max_instances
  588. placeholder: "ex: 10"
  589. settings:
  590. default: 10
  591. - name: iam
  592. label: IAM
  593. sections:
  594. - name: toggle_aws_auth
  595. contents:
  596. - type: heading
  597. label: Configure IAM Access
  598. - type: checkbox
  599. variable: manage_aws_auth_configmap
  600. label: Allow Porter to manage AWS authentication for the cluster.
  601. settings:
  602. default: true
  603. - name: aws_auth_warning
  604. show_if:
  605. not: manage_aws_auth_configmap
  606. contents:
  607. - type: subtitle
  608. label: "WARNING - turning this value off will result in the aws-auth configmap getting removed from the cluster, and will take existing AWS nodes offline until the configmap is re-added with the node's IAM role ARN. Make sure you know what you are doing."
  609. - name: arns
  610. show_if: manage_aws_auth_configmap
  611. contents:
  612. - type: heading
  613. label: Users
  614. - type: subtitle
  615. label: "Add AWS users to the cluster. The left input should be a valid AWS user ARN, and the right side should be a group on the cluster. For example, arn:aws:iam::66666666666:user/user1: system:masters."
  616. - type: key-value-array
  617. variable: aws_auth_users
  618. settings:
  619. default: {}
  620. - type: heading
  621. label: Roles
  622. - type: subtitle
  623. label: "Add AWS roles to the cluster. The left input should be a valid AWS role ARN, and the right side should be a group on the cluster. For example, arn:aws:iam::66666666666:role/role1: system:masters."
  624. - type: key-value-array
  625. variable: aws_auth_roles
  626. settings:
  627. default: {}
  628. - name: advanced
  629. label: Advanced
  630. sections:
  631. - name: workload_machine_label
  632. contents:
  633. - type: heading
  634. label: Application Node Group Settings
  635. - type: string-input
  636. label: Add custom node labels to the application node group. If you are adding multiple labels, they should be comma separated.
  637. variable: custom_node_labels_application
  638. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  639. settings:
  640. default: ""
  641. - name: system_machine_type
  642. contents:
  643. - type: heading
  644. label: System Node Group Settings
  645. - type: select
  646. label: ⚙️ AWS System Machine Type
  647. variable: system_machine_type
  648. settings:
  649. default: t2.medium
  650. options:
  651. - label: t2.medium
  652. value: t2.medium
  653. - label: t2.large
  654. value: t2.large
  655. - label: t2.xlarge
  656. value: t2.xlarge
  657. - label: t2.2xlarge
  658. value: t2.2xlarge
  659. - label: t3.medium
  660. value: t3.medium
  661. - label: t3.large
  662. value: t3.large
  663. - label: t3.xlarge
  664. value: t3.xlarge
  665. - label: t3.2xlarge
  666. value: t3.2xlarge
  667. - label: c6i.large
  668. value: c6i.large
  669. - label: c6i.xlarge
  670. value: c6i.xlarge
  671. - label: c6i.2xlarge
  672. value: c6i.2xlarge
  673. - label: c6i.4xlarge
  674. value: c6i.4xlarge
  675. - type: string-input
  676. label: Add custom node labels to the system node group. If you are adding multiple labels, they should be comma separated.
  677. variable: custom_node_labels_system
  678. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  679. settings:
  680. default: ""
  681. - name: spot_instance_should_enable
  682. contents:
  683. - type: heading
  684. label: Spot Instance Settings
  685. - type: checkbox
  686. variable: spot_instances_enabled
  687. label: Enable spot instances for this cluster.
  688. settings:
  689. default: false
  690. - name: spot_instance_price
  691. show_if: spot_instances_enabled
  692. contents:
  693. - type: string-input
  694. label: Assign a bid price for the spot instance (optional).
  695. variable: spot_price
  696. placeholder: "ex: 0.05"
  697. - name: net_settings
  698. contents:
  699. - type: heading
  700. label: Networking Settings
  701. - type: string-input
  702. label: "Add a different CIDR range prefix (first two octets: for example 10.99 will create a VPC with CIDR range 10.99.0.0/16)."
  703. variable: cluster_vpc_cidr_octets
  704. placeholder: "ex: 10.99"
  705. settings:
  706. default: "10.99"
  707. - type: checkbox
  708. label: "Add additional private subnets to the cluster in each AZ."
  709. variable: additional_private_subnets
  710. settings:
  711. default: false
  712. - name: subnet_multiplicity
  713. show_if: additional_private_subnets
  714. contents:
  715. - type: number-input
  716. label: "Multiplicity of the subnet within each AZ."
  717. variable: additional_private_subnets_multiplicity
  718. settings:
  719. default: 3
  720. - name: net_settings_azs_toggle
  721. contents:
  722. - type: checkbox
  723. label: "Specify the AZs to provision this cluster in."
  724. variable: specify_azs
  725. settings:
  726. default: false
  727. - name: net_settings_azs
  728. show_if: specify_azs
  729. contents:
  730. - type: array-input
  731. variable: azs
  732. label: Availability Zones
  733. - name: nginx_settings
  734. contents:
  735. - type: heading
  736. label: NGINX Settings
  737. - type: checkbox
  738. variable: disable_nginx_load_balancer
  739. label: Disable NGINX load balancer and expose NGINX only on a cluster IP address.
  740. settings:
  741. default: false
  742. - name: prometheus_settings
  743. contents:
  744. - type: heading
  745. label: Prometheus Settings
  746. - type: checkbox
  747. variable: additional_prometheus_node_group
  748. label: Add an additional prometheus node group to ensure monitoring stability.
  749. settings:
  750. default: false
  751. - name: prometheus_machine_settings
  752. show_if: additional_prometheus_node_group
  753. contents:
  754. - type: select
  755. label: ⚙️ AWS Prometheus Machine Type
  756. variable: additional_prometheus_machine_type
  757. settings:
  758. default: t2.medium
  759. options:
  760. - label: t2.medium
  761. value: t2.medium
  762. - label: t2.large
  763. value: t2.large
  764. - label: t2.xlarge
  765. value: t2.xlarge
  766. - label: t3.medium
  767. value: t3.medium
  768. - label: t3.large
  769. value: t3.large
  770. - label: t3.xlarge
  771. value: t3.xlarge
  772. - type: string-input
  773. label: Add custom node labels to the monitoring node group. If you are adding multiple labels, they should be comma separated.
  774. variable: custom_node_labels_monitoring
  775. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  776. settings:
  777. default: ""
  778. - name: kms_secret_encryption
  779. contents:
  780. - type: heading
  781. label: KMS Encryption
  782. - type: checkbox
  783. variable: is_kms_enabled
  784. label: Encrypt all Kubernetes secrets with AWS Key Management Service (KMS)
  785. settings:
  786. default: false
  787. - name: enable_logging
  788. contents:
  789. - type: heading
  790. label: Enable AWS Logging
  791. - type: checkbox
  792. variable: vpc_flow_logs_enabled
  793. label: Enable VPC Flow Logs
  794. settings:
  795. default: false
  796. - type: checkbox
  797. variable: eks_control_plane_logs_enabled
  798. label: Enable EKS Control Plane Logs
  799. settings:
  800. default: false
  801. - name: add_custom_tags
  802. contents:
  803. - type: heading
  804. label: Add Custom Tags on AWS Resources Provisioned by Porter
  805. - type: key-value-array
  806. variable: custom_tags
  807. settings:
  808. default: {}
  809. `
  810. const gcrForm = `name: GCR
  811. hasSource: false
  812. includeHiddenFields: true
  813. tabs:
  814. - name: main
  815. label: Configuration
  816. sections:
  817. - name: section_one
  818. contents:
  819. - type: heading
  820. label: GCR Configuration
  821. - type: select
  822. label: 📍 GCP Region
  823. variable: gcp_region
  824. settings:
  825. default: us-central1
  826. options:
  827. - label: asia-east1
  828. value: asia-east1
  829. - label: asia-east2
  830. value: asia-east2
  831. - label: asia-northeast1
  832. value: asia-northeast1
  833. - label: asia-northeast2
  834. value: asia-northeast2
  835. - label: asia-northeast3
  836. value: asia-northeast3
  837. - label: asia-south1
  838. value: asia-south1
  839. - label: asia-south2
  840. value: asia-south2
  841. - label: asia-southeast1
  842. value: asia-southeast1
  843. - label: asia-southeast2
  844. value: asia-southeast2
  845. - label: australia-southeast1
  846. value: australia-southeast1
  847. - label: australia-southeast2
  848. value: australia-southeast2
  849. - label: europe-central2
  850. value: europe-central2
  851. - label: europe-north1
  852. value: europe-north1
  853. - label: europe-west1
  854. value: europe-west1
  855. - label: europe-west2
  856. value: europe-west2
  857. - label: europe-west3
  858. value: europe-west3
  859. - label: europe-west4
  860. value: europe-west4
  861. - label: europe-west6
  862. value: europe-west6
  863. - label: europe-west8
  864. value: europe-west8
  865. - label: europe-west9
  866. value: europe-west9
  867. - label: europe-southwest1
  868. value: europe-southwest1
  869. - label: northamerica-northeast1
  870. value: northamerica-northeast1
  871. - label: northamerica-northeast2
  872. value: northamerica-northeast2
  873. - label: southamerica-east1
  874. value: southamerica-east1
  875. - label: southamerica-west1
  876. value: southamerica-west1
  877. - label: us-central1
  878. value: us-central1
  879. - label: us-east1
  880. value: us-east1
  881. - label: us-east4
  882. value: us-east4
  883. - label: us-east5
  884. value: us-east5
  885. - label: us-south1
  886. value: us-south1
  887. - label: us-west1
  888. value: us-west1
  889. - label: us-west2
  890. value: us-west2
  891. - label: us-west3
  892. value: us-west3
  893. - label: us-west4
  894. value: us-west4
  895. `
  896. const garForm = `name: GAR
  897. hasSource: false
  898. includeHiddenFields: true
  899. tabs:
  900. - name: main
  901. label: Configuration
  902. sections:
  903. - name: section_one
  904. contents:
  905. - type: heading
  906. label: GAR Configuration
  907. - type: select
  908. label: 📍 GCP Region
  909. variable: gcp_region
  910. settings:
  911. default: us-central1
  912. options:
  913. - label: asia-east1
  914. value: asia-east1
  915. - label: asia-east2
  916. value: asia-east2
  917. - label: asia-northeast1
  918. value: asia-northeast1
  919. - label: asia-northeast2
  920. value: asia-northeast2
  921. - label: asia-northeast3
  922. value: asia-northeast3
  923. - label: asia-south1
  924. value: asia-south1
  925. - label: asia-south2
  926. value: asia-south2
  927. - label: asia-southeast1
  928. value: asia-southeast1
  929. - label: asia-southeast2
  930. value: asia-southeast2
  931. - label: australia-southeast1
  932. value: australia-southeast1
  933. - label: australia-southeast2
  934. value: australia-southeast2
  935. - label: europe-central2
  936. value: europe-central2
  937. - label: europe-north1
  938. value: europe-north1
  939. - label: europe-west1
  940. value: europe-west1
  941. - label: europe-west2
  942. value: europe-west2
  943. - label: europe-west3
  944. value: europe-west3
  945. - label: europe-west4
  946. value: europe-west4
  947. - label: europe-west6
  948. value: europe-west6
  949. - label: europe-west8
  950. value: europe-west8
  951. - label: europe-west9
  952. value: europe-west9
  953. - label: europe-southwest1
  954. value: europe-southwest1
  955. - label: northamerica-northeast1
  956. value: northamerica-northeast1
  957. - label: northamerica-northeast2
  958. value: northamerica-northeast2
  959. - label: southamerica-east1
  960. value: southamerica-east1
  961. - label: southamerica-west1
  962. value: southamerica-west1
  963. - label: us-central1
  964. value: us-central1
  965. - label: us-east1
  966. value: us-east1
  967. - label: us-east4
  968. value: us-east4
  969. - label: us-east5
  970. value: us-east5
  971. - label: us-south1
  972. value: us-south1
  973. - label: us-west1
  974. value: us-west1
  975. - label: us-west2
  976. value: us-west2
  977. - label: us-west3
  978. value: us-west3
  979. - label: us-west4
  980. value: us-west4
  981. - label: us (multi-region)
  982. value: us
  983. - label: europe (multi-region)
  984. value: europe
  985. - label: asia (multi-region)
  986. value: asia
  987. `
  988. const gkeForm = `name: GKE
  989. hasSource: false
  990. includeHiddenFields: true
  991. tabs:
  992. - name: main
  993. label: Configuration
  994. sections:
  995. - name: section_one
  996. contents:
  997. - type: heading
  998. label: GKE Configuration
  999. - type: select
  1000. label: 📍 GCP Region
  1001. variable: gcp_region
  1002. settings:
  1003. default: us-central1
  1004. options:
  1005. - label: asia-east1
  1006. value: asia-east1
  1007. - label: asia-east2
  1008. value: asia-east2
  1009. - label: asia-northeast1
  1010. value: asia-northeast1
  1011. - label: asia-northeast2
  1012. value: asia-northeast2
  1013. - label: asia-northeast3
  1014. value: asia-northeast3
  1015. - label: asia-south1
  1016. value: asia-south1
  1017. - label: asia-south2
  1018. value: asia-south2
  1019. - label: asia-southeast1
  1020. value: asia-southeast1
  1021. - label: asia-southeast2
  1022. value: asia-southeast2
  1023. - label: australia-southeast1
  1024. value: australia-southeast1
  1025. - label: australia-southeast2
  1026. value: australia-southeast2
  1027. - label: europe-central2
  1028. value: europe-central2
  1029. - label: europe-north1
  1030. value: europe-north1
  1031. - label: europe-west1
  1032. value: europe-west1
  1033. - label: europe-west2
  1034. value: europe-west2
  1035. - label: europe-west3
  1036. value: europe-west3
  1037. - label: europe-west4
  1038. value: europe-west4
  1039. - label: europe-west6
  1040. value: europe-west6
  1041. - label: europe-west8
  1042. value: europe-west8
  1043. - label: europe-west9
  1044. value: europe-west9
  1045. - label: europe-southwest1
  1046. value: europe-southwest1
  1047. - label: northamerica-northeast1
  1048. value: northamerica-northeast1
  1049. - label: northamerica-northeast2
  1050. value: northamerica-northeast2
  1051. - label: southamerica-east1
  1052. value: southamerica-east1
  1053. - label: southamerica-west1
  1054. value: southamerica-west1
  1055. - label: us-central1
  1056. value: us-central1
  1057. - label: us-east1
  1058. value: us-east1
  1059. - label: us-east4
  1060. value: us-east4
  1061. - label: us-east5
  1062. value: us-east5
  1063. - label: us-south1
  1064. value: us-south1
  1065. - label: us-west1
  1066. value: us-west1
  1067. - label: us-west2
  1068. value: us-west2
  1069. - label: us-west3
  1070. value: us-west3
  1071. - label: us-west4
  1072. value: us-west4
  1073. - type: string-input
  1074. label: 👤 Issuer Email
  1075. required: true
  1076. placeholder: example@example.com
  1077. variable: issuer_email
  1078. - type: string-input
  1079. label: GKE Cluster Name
  1080. required: true
  1081. placeholder: my-cluster
  1082. variable: cluster_name
  1083. `
  1084. const docrForm = `name: DOCR
  1085. hasSource: false
  1086. includeHiddenFields: true
  1087. tabs:
  1088. - name: main
  1089. label: Configuration
  1090. sections:
  1091. - name: section_one
  1092. contents:
  1093. - type: heading
  1094. label: DOCR Configuration
  1095. - type: select
  1096. label: DO Subscription Tier
  1097. variable: docr_subscription_tier
  1098. settings:
  1099. default: basic
  1100. options:
  1101. - label: Basic
  1102. value: basic
  1103. - label: Professional
  1104. value: professional
  1105. - type: string-input
  1106. label: DOCR Name
  1107. required: true
  1108. placeholder: my-awesome-registry
  1109. variable: docr_name
  1110. `
  1111. const doksForm = `name: DOKS
  1112. hasSource: false
  1113. includeHiddenFields: true
  1114. tabs:
  1115. - name: main
  1116. label: Configuration
  1117. sections:
  1118. - name: section_one
  1119. contents:
  1120. - type: heading
  1121. label: DOKS Configuration
  1122. - type: select
  1123. label: 📍 DO Region
  1124. variable: do_region
  1125. settings:
  1126. default: nyc1
  1127. options:
  1128. - label: Amsterdam 3
  1129. value: ams3
  1130. - label: Bangalore 1
  1131. value: blr1
  1132. - label: Frankfurt 1
  1133. value: fra1
  1134. - label: London 1
  1135. value: lon1
  1136. - label: New York 1
  1137. value: nyc1
  1138. - label: New York 3
  1139. value: nyc3
  1140. - label: San Francisco 2
  1141. value: sfo2
  1142. - label: San Francisco 3
  1143. value: sfo3
  1144. - label: Singapore 1
  1145. value: sgp1
  1146. - label: Toronto 1
  1147. value: tor1
  1148. - type: string-input
  1149. label: 👤 Issuer Email
  1150. required: true
  1151. placeholder: example@example.com
  1152. variable: issuer_email
  1153. - type: string-input
  1154. label: DOKS Cluster Name
  1155. required: true
  1156. placeholder: my-cluster
  1157. variable: cluster_name
  1158. `
  1159. const acrForm = `name: ACR
  1160. hasSource: false
  1161. includeHiddenFields: true
  1162. isClusterScoped: false
  1163. tabs:
  1164. - name: main
  1165. label: Configuration
  1166. sections:
  1167. - name: section_one
  1168. contents:
  1169. - type: heading
  1170. label: ACR Configuration
  1171. - type: select
  1172. label: 📍 Azure Region
  1173. variable: aks_region
  1174. settings:
  1175. default: East US
  1176. options:
  1177. - label: East US
  1178. value: East US
  1179. - label: East US 2
  1180. value: East US 2
  1181. - label: West US 2
  1182. value: West US 2
  1183. - label: West US 3
  1184. value: West US 3
  1185. - label: Norway East
  1186. value: Norway East
  1187. - type: string-input
  1188. label: ACR Name
  1189. required: true
  1190. placeholder: my-registry
  1191. variable: acr_name
  1192. `
  1193. const aksForm = `name: AKS
  1194. hasSource: false
  1195. includeHiddenFields: true
  1196. isClusterScoped: false
  1197. tabs:
  1198. - name: main
  1199. label: Configuration
  1200. sections:
  1201. - name: section_one
  1202. contents:
  1203. - type: heading
  1204. label: AKS Configuration
  1205. - type: select
  1206. label: 📍 Azure Region
  1207. variable: aks_region
  1208. settings:
  1209. default: East US
  1210. options:
  1211. - label: East US
  1212. value: East US
  1213. - label: East US 2
  1214. value: East US 2
  1215. - label: West US 2
  1216. value: West US 2
  1217. - label: West US 3
  1218. value: West US 3
  1219. - label: Norway East
  1220. value: Norway East
  1221. - type: select
  1222. label: ⚙️ Application Machine Type
  1223. variable: app_machine_type
  1224. settings:
  1225. default: Standard_A2_v2
  1226. options:
  1227. - label: Standard A2
  1228. value: Standard_A2_v2
  1229. - label: Standard A4
  1230. value: Standard_A4_v2
  1231. - label: Standard D2
  1232. value: Standard_D2_v3
  1233. - type: string-input
  1234. label: 👤 Issuer Email
  1235. required: true
  1236. placeholder: example@example.com
  1237. variable: issuer_email
  1238. - type: string-input
  1239. label: AKS Cluster Name
  1240. required: true
  1241. placeholder: my-cluster
  1242. variable: cluster_name
  1243. `