forms.go 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262
  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: net_settings_single_az_nat_gateway
  734. contents:
  735. - type: checkbox
  736. variable: single_az_nat_gateway
  737. label: "Place a NAT gateway inside a single AZ. Disabling this will place a NAT gateway in each AZ, for each subnet in your cluster's VPC."
  738. settings:
  739. default: true
  740. - name: nginx_settings
  741. contents:
  742. - type: heading
  743. label: NGINX Settings
  744. - type: checkbox
  745. variable: disable_nginx_load_balancer
  746. label: Disable NGINX load balancer and expose NGINX only on a cluster IP address.
  747. settings:
  748. default: false
  749. - name: prometheus_settings
  750. contents:
  751. - type: heading
  752. label: Prometheus Settings
  753. - type: checkbox
  754. variable: additional_prometheus_node_group
  755. label: Add an additional prometheus node group to ensure monitoring stability.
  756. settings:
  757. default: false
  758. - name: prometheus_machine_settings
  759. show_if: additional_prometheus_node_group
  760. contents:
  761. - type: select
  762. label: ⚙️ AWS Prometheus Machine Type
  763. variable: additional_prometheus_machine_type
  764. settings:
  765. default: t2.medium
  766. options:
  767. - label: t2.medium
  768. value: t2.medium
  769. - label: t2.large
  770. value: t2.large
  771. - label: t2.xlarge
  772. value: t2.xlarge
  773. - label: t3.medium
  774. value: t3.medium
  775. - label: t3.large
  776. value: t3.large
  777. - label: t3.xlarge
  778. value: t3.xlarge
  779. - type: string-input
  780. label: Add custom node labels to the monitoring node group. If you are adding multiple labels, they should be comma separated.
  781. variable: custom_node_labels_monitoring
  782. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  783. settings:
  784. default: ""
  785. - name: kms_secret_encryption
  786. contents:
  787. - type: heading
  788. label: KMS Encryption
  789. - type: checkbox
  790. variable: is_kms_enabled
  791. label: Encrypt all Kubernetes secrets with AWS Key Management Service (KMS)
  792. settings:
  793. default: false
  794. - name: enable_logging
  795. contents:
  796. - type: heading
  797. label: Enable AWS Logging
  798. - type: checkbox
  799. variable: vpc_flow_logs_enabled
  800. label: Enable VPC Flow Logs
  801. settings:
  802. default: false
  803. - type: checkbox
  804. variable: eks_control_plane_logs_enabled
  805. label: Enable EKS Control Plane Logs
  806. settings:
  807. default: false
  808. - name: add_custom_tags
  809. contents:
  810. - type: heading
  811. label: Add Custom Tags on AWS Resources Provisioned by Porter
  812. - type: key-value-array
  813. variable: custom_tags
  814. settings:
  815. default: {}
  816. `
  817. const gcrForm = `name: GCR
  818. hasSource: false
  819. includeHiddenFields: true
  820. tabs:
  821. - name: main
  822. label: Configuration
  823. sections:
  824. - name: section_one
  825. contents:
  826. - type: heading
  827. label: GCR Configuration
  828. - type: select
  829. label: 📍 GCP Region
  830. variable: gcp_region
  831. settings:
  832. default: us-central1
  833. options:
  834. - label: asia-east1
  835. value: asia-east1
  836. - label: asia-east2
  837. value: asia-east2
  838. - label: asia-northeast1
  839. value: asia-northeast1
  840. - label: asia-northeast2
  841. value: asia-northeast2
  842. - label: asia-northeast3
  843. value: asia-northeast3
  844. - label: asia-south1
  845. value: asia-south1
  846. - label: asia-south2
  847. value: asia-south2
  848. - label: asia-southeast1
  849. value: asia-southeast1
  850. - label: asia-southeast2
  851. value: asia-southeast2
  852. - label: australia-southeast1
  853. value: australia-southeast1
  854. - label: australia-southeast2
  855. value: australia-southeast2
  856. - label: europe-central2
  857. value: europe-central2
  858. - label: europe-north1
  859. value: europe-north1
  860. - label: europe-west1
  861. value: europe-west1
  862. - label: europe-west2
  863. value: europe-west2
  864. - label: europe-west3
  865. value: europe-west3
  866. - label: europe-west4
  867. value: europe-west4
  868. - label: europe-west6
  869. value: europe-west6
  870. - label: europe-west8
  871. value: europe-west8
  872. - label: europe-west9
  873. value: europe-west9
  874. - label: europe-southwest1
  875. value: europe-southwest1
  876. - label: northamerica-northeast1
  877. value: northamerica-northeast1
  878. - label: northamerica-northeast2
  879. value: northamerica-northeast2
  880. - label: southamerica-east1
  881. value: southamerica-east1
  882. - label: southamerica-west1
  883. value: southamerica-west1
  884. - label: us-central1
  885. value: us-central1
  886. - label: us-east1
  887. value: us-east1
  888. - label: us-east4
  889. value: us-east4
  890. - label: us-east5
  891. value: us-east5
  892. - label: us-south1
  893. value: us-south1
  894. - label: us-west1
  895. value: us-west1
  896. - label: us-west2
  897. value: us-west2
  898. - label: us-west3
  899. value: us-west3
  900. - label: us-west4
  901. value: us-west4
  902. `
  903. const garForm = `name: GAR
  904. hasSource: false
  905. includeHiddenFields: true
  906. tabs:
  907. - name: main
  908. label: Configuration
  909. sections:
  910. - name: section_one
  911. contents:
  912. - type: heading
  913. label: GAR Configuration
  914. - type: select
  915. label: 📍 GCP Region
  916. variable: gcp_region
  917. settings:
  918. default: us-central1
  919. options:
  920. - label: asia-east1
  921. value: asia-east1
  922. - label: asia-east2
  923. value: asia-east2
  924. - label: asia-northeast1
  925. value: asia-northeast1
  926. - label: asia-northeast2
  927. value: asia-northeast2
  928. - label: asia-northeast3
  929. value: asia-northeast3
  930. - label: asia-south1
  931. value: asia-south1
  932. - label: asia-south2
  933. value: asia-south2
  934. - label: asia-southeast1
  935. value: asia-southeast1
  936. - label: asia-southeast2
  937. value: asia-southeast2
  938. - label: australia-southeast1
  939. value: australia-southeast1
  940. - label: australia-southeast2
  941. value: australia-southeast2
  942. - label: europe-central2
  943. value: europe-central2
  944. - label: europe-north1
  945. value: europe-north1
  946. - label: europe-west1
  947. value: europe-west1
  948. - label: europe-west2
  949. value: europe-west2
  950. - label: europe-west3
  951. value: europe-west3
  952. - label: europe-west4
  953. value: europe-west4
  954. - label: europe-west6
  955. value: europe-west6
  956. - label: europe-west8
  957. value: europe-west8
  958. - label: europe-west9
  959. value: europe-west9
  960. - label: europe-southwest1
  961. value: europe-southwest1
  962. - label: northamerica-northeast1
  963. value: northamerica-northeast1
  964. - label: northamerica-northeast2
  965. value: northamerica-northeast2
  966. - label: southamerica-east1
  967. value: southamerica-east1
  968. - label: southamerica-west1
  969. value: southamerica-west1
  970. - label: us-central1
  971. value: us-central1
  972. - label: us-east1
  973. value: us-east1
  974. - label: us-east4
  975. value: us-east4
  976. - label: us-east5
  977. value: us-east5
  978. - label: us-south1
  979. value: us-south1
  980. - label: us-west1
  981. value: us-west1
  982. - label: us-west2
  983. value: us-west2
  984. - label: us-west3
  985. value: us-west3
  986. - label: us-west4
  987. value: us-west4
  988. - label: us (multi-region)
  989. value: us
  990. - label: europe (multi-region)
  991. value: europe
  992. - label: asia (multi-region)
  993. value: asia
  994. `
  995. const gkeForm = `name: GKE
  996. hasSource: false
  997. includeHiddenFields: true
  998. tabs:
  999. - name: main
  1000. label: Configuration
  1001. sections:
  1002. - name: section_one
  1003. contents:
  1004. - type: heading
  1005. label: GKE Configuration
  1006. - type: select
  1007. label: 📍 GCP Region
  1008. variable: gcp_region
  1009. settings:
  1010. default: us-central1
  1011. options:
  1012. - label: asia-east1
  1013. value: asia-east1
  1014. - label: asia-east2
  1015. value: asia-east2
  1016. - label: asia-northeast1
  1017. value: asia-northeast1
  1018. - label: asia-northeast2
  1019. value: asia-northeast2
  1020. - label: asia-northeast3
  1021. value: asia-northeast3
  1022. - label: asia-south1
  1023. value: asia-south1
  1024. - label: asia-south2
  1025. value: asia-south2
  1026. - label: asia-southeast1
  1027. value: asia-southeast1
  1028. - label: asia-southeast2
  1029. value: asia-southeast2
  1030. - label: australia-southeast1
  1031. value: australia-southeast1
  1032. - label: australia-southeast2
  1033. value: australia-southeast2
  1034. - label: europe-central2
  1035. value: europe-central2
  1036. - label: europe-north1
  1037. value: europe-north1
  1038. - label: europe-west1
  1039. value: europe-west1
  1040. - label: europe-west2
  1041. value: europe-west2
  1042. - label: europe-west3
  1043. value: europe-west3
  1044. - label: europe-west4
  1045. value: europe-west4
  1046. - label: europe-west6
  1047. value: europe-west6
  1048. - label: europe-west8
  1049. value: europe-west8
  1050. - label: europe-west9
  1051. value: europe-west9
  1052. - label: europe-southwest1
  1053. value: europe-southwest1
  1054. - label: northamerica-northeast1
  1055. value: northamerica-northeast1
  1056. - label: northamerica-northeast2
  1057. value: northamerica-northeast2
  1058. - label: southamerica-east1
  1059. value: southamerica-east1
  1060. - label: southamerica-west1
  1061. value: southamerica-west1
  1062. - label: us-central1
  1063. value: us-central1
  1064. - label: us-east1
  1065. value: us-east1
  1066. - label: us-east4
  1067. value: us-east4
  1068. - label: us-east5
  1069. value: us-east5
  1070. - label: us-south1
  1071. value: us-south1
  1072. - label: us-west1
  1073. value: us-west1
  1074. - label: us-west2
  1075. value: us-west2
  1076. - label: us-west3
  1077. value: us-west3
  1078. - label: us-west4
  1079. value: us-west4
  1080. - type: string-input
  1081. label: 👤 Issuer Email
  1082. required: true
  1083. placeholder: example@example.com
  1084. variable: issuer_email
  1085. - type: string-input
  1086. label: GKE Cluster Name
  1087. required: true
  1088. placeholder: my-cluster
  1089. variable: cluster_name
  1090. `
  1091. const docrForm = `name: DOCR
  1092. hasSource: false
  1093. includeHiddenFields: true
  1094. tabs:
  1095. - name: main
  1096. label: Configuration
  1097. sections:
  1098. - name: section_one
  1099. contents:
  1100. - type: heading
  1101. label: DOCR Configuration
  1102. - type: select
  1103. label: DO Subscription Tier
  1104. variable: docr_subscription_tier
  1105. settings:
  1106. default: basic
  1107. options:
  1108. - label: Basic
  1109. value: basic
  1110. - label: Professional
  1111. value: professional
  1112. - type: string-input
  1113. label: DOCR Name
  1114. required: true
  1115. placeholder: my-awesome-registry
  1116. variable: docr_name
  1117. `
  1118. const doksForm = `name: DOKS
  1119. hasSource: false
  1120. includeHiddenFields: true
  1121. tabs:
  1122. - name: main
  1123. label: Configuration
  1124. sections:
  1125. - name: section_one
  1126. contents:
  1127. - type: heading
  1128. label: DOKS Configuration
  1129. - type: select
  1130. label: 📍 DO Region
  1131. variable: do_region
  1132. settings:
  1133. default: nyc1
  1134. options:
  1135. - label: Amsterdam 3
  1136. value: ams3
  1137. - label: Bangalore 1
  1138. value: blr1
  1139. - label: Frankfurt 1
  1140. value: fra1
  1141. - label: London 1
  1142. value: lon1
  1143. - label: New York 1
  1144. value: nyc1
  1145. - label: New York 3
  1146. value: nyc3
  1147. - label: San Francisco 2
  1148. value: sfo2
  1149. - label: San Francisco 3
  1150. value: sfo3
  1151. - label: Singapore 1
  1152. value: sgp1
  1153. - label: Toronto 1
  1154. value: tor1
  1155. - type: string-input
  1156. label: 👤 Issuer Email
  1157. required: true
  1158. placeholder: example@example.com
  1159. variable: issuer_email
  1160. - type: string-input
  1161. label: DOKS Cluster Name
  1162. required: true
  1163. placeholder: my-cluster
  1164. variable: cluster_name
  1165. `
  1166. const acrForm = `name: ACR
  1167. hasSource: false
  1168. includeHiddenFields: true
  1169. isClusterScoped: false
  1170. tabs:
  1171. - name: main
  1172. label: Configuration
  1173. sections:
  1174. - name: section_one
  1175. contents:
  1176. - type: heading
  1177. label: ACR Configuration
  1178. - type: select
  1179. label: 📍 Azure Region
  1180. variable: aks_region
  1181. settings:
  1182. default: East US
  1183. options:
  1184. - label: East US
  1185. value: East US
  1186. - label: East US 2
  1187. value: East US 2
  1188. - label: West US 2
  1189. value: West US 2
  1190. - label: West US 3
  1191. value: West US 3
  1192. - label: Norway East
  1193. value: Norway East
  1194. - type: string-input
  1195. label: ACR Name
  1196. required: true
  1197. placeholder: my-registry
  1198. variable: acr_name
  1199. `
  1200. const aksForm = `name: AKS
  1201. hasSource: false
  1202. includeHiddenFields: true
  1203. isClusterScoped: false
  1204. tabs:
  1205. - name: main
  1206. label: Configuration
  1207. sections:
  1208. - name: section_one
  1209. contents:
  1210. - type: heading
  1211. label: AKS Configuration
  1212. - type: select
  1213. label: 📍 Azure Region
  1214. variable: aks_region
  1215. settings:
  1216. default: East US
  1217. options:
  1218. - label: East US
  1219. value: East US
  1220. - label: East US 2
  1221. value: East US 2
  1222. - label: West US 2
  1223. value: West US 2
  1224. - label: West US 3
  1225. value: West US 3
  1226. - label: Norway East
  1227. value: Norway East
  1228. - type: select
  1229. label: ⚙️ Application Machine Type
  1230. variable: app_machine_type
  1231. settings:
  1232. default: Standard_A2_v2
  1233. options:
  1234. - label: Standard A2
  1235. value: Standard_A2_v2
  1236. - label: Standard A4
  1237. value: Standard_A4_v2
  1238. - label: Standard D2
  1239. value: Standard_D2_v3
  1240. - type: string-input
  1241. label: 👤 Issuer Email
  1242. required: true
  1243. placeholder: example@example.com
  1244. variable: issuer_email
  1245. - type: string-input
  1246. label: AKS Cluster Name
  1247. required: true
  1248. placeholder: my-cluster
  1249. variable: cluster_name
  1250. `