forms.go 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286
  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: c5.large
  452. value: c5.large
  453. - label: c5.xlarge
  454. value: c5.xlarge
  455. - label: c5.2xlarge
  456. value: c5.2xlarge
  457. - label: c6i.large
  458. value: c6i.large
  459. - label: c6i.xlarge
  460. value: c6i.xlarge
  461. - label: c6i.2xlarge
  462. value: c6i.2xlarge
  463. - label: c6i.4xlarge
  464. value: c6i.4xlarge
  465. - label: g4dn.xlarge
  466. value: g4dn.xlarge
  467. - label: g4dn.2xlarge
  468. value: g4dn.2xlarge
  469. - label: g4dn.4xlarge
  470. value: g4dn.4xlarge
  471. - label: g5.xlarge
  472. value: g5.xlarge
  473. - label: g5.2xlarge
  474. value: g5.2xlarge
  475. - label: g5.4xlarge
  476. value: g5.4xlarge
  477. - label: m6a.large
  478. value: m6a.large
  479. - label: m6a.xlarge
  480. value: m6a.xlarge
  481. - label: m6a.2xlarge
  482. value: m6a.2xlarge
  483. - label: m6i.large
  484. value: m6i.large
  485. - label: m6i.xlarge
  486. value: m6i.xlarge
  487. - label: m6i.2xlarge
  488. value: m6i.2xlarge
  489. - label: m6i.4xlarge
  490. value: m6i.4xlarge
  491. - label: r5.large
  492. value: r5.large
  493. - label: r5.xlarge
  494. value: r5.xlarge
  495. - type: string-input
  496. label: 👤 Issuer Email
  497. required: true
  498. placeholder: example@example.com
  499. variable: issuer_email
  500. - type: string-input
  501. label: EKS Cluster Name
  502. required: true
  503. placeholder: my-cluster
  504. variable: cluster_name
  505. - type: select
  506. label: EKS control plane version
  507. variable: cluster_version
  508. settings:
  509. default: "1.24"
  510. options:
  511. - label: "1.20"
  512. value: "1.20"
  513. - label: "1.21"
  514. value: "1.21"
  515. - label: "1.22"
  516. value: "1.22"
  517. - label: "1.23"
  518. value: "1.23"
  519. - label: "1.24"
  520. value: "1.24"
  521. - type: number-input
  522. label: Minimum number of EC2 instances to create in the application autoscaling group.
  523. variable: min_instances
  524. placeholder: "ex: 1"
  525. settings:
  526. default: 1
  527. - type: number-input
  528. label: Maximum number of EC2 instances to create in the application autoscaling group.
  529. variable: max_instances
  530. placeholder: "ex: 10"
  531. settings:
  532. default: 10
  533. - name: additional_nodegroup
  534. label: Additional Node Groups
  535. sections:
  536. - name: is_additional_enabled
  537. contents:
  538. - type: heading
  539. label: Additional Node Groups
  540. - type: checkbox
  541. variable: additional_nodegroup_enabled
  542. label: Enable an additional node group for this cluster.
  543. settings:
  544. default: false
  545. - name: additional_settings
  546. show_if: additional_nodegroup_enabled
  547. contents:
  548. - type: string-input
  549. label: Label for this node group. Multiple labels should be comma separated.
  550. variable: additional_nodegroup_label
  551. placeholder: "ex: porter.run/workload-kind=job"
  552. settings:
  553. default: porter.run/workload-kind=database
  554. - type: string-input
  555. label: Taint for this node group.
  556. variable: additional_nodegroup_taint
  557. placeholder: "ex: porter.run/workload-kind=job:NoSchedule"
  558. settings:
  559. default: porter.run/workload-kind=database:NoSchedule
  560. - type: checkbox
  561. variable: additional_stateful_nodegroup_enabled
  562. label: Stateful Workload
  563. settings:
  564. default: false
  565. - type: select
  566. label: ⚙️ AWS System Machine Type
  567. variable: additional_nodegroup_machine_type
  568. settings:
  569. default: t2.medium
  570. options:
  571. - label: t2.medium
  572. value: t2.medium
  573. - label: t2.large
  574. value: t2.large
  575. - label: t2.xlarge
  576. value: t2.xlarge
  577. - label: t2.2xlarge
  578. value: t2.2xlarge
  579. - label: t3.medium
  580. value: t3.medium
  581. - label: t3.large
  582. value: t3.large
  583. - label: t3.xlarge
  584. value: t3.xlarge
  585. - label: t3.2xlarge
  586. value: t3.2xlarge
  587. - label: c6i.large
  588. value: c6i.large
  589. - label: c6i.xlarge
  590. value: c6i.xlarge
  591. - label: c6i.2xlarge
  592. value: c6i.2xlarge
  593. - label: c6i.4xlarge
  594. value: c6i.4xlarge
  595. - label: m6i.large
  596. value: m6i.large
  597. - label: m6i.xlarge
  598. value: m6i.xlarge
  599. - label: m6i.2xlarge
  600. value: m6i.2xlarge
  601. - label: m6i.4xlarge
  602. value: m6i.4xlarge
  603. - type: number-input
  604. label: Minimum number of EC2 instances to create in the application autoscaling group.
  605. variable: additional_nodegroup_min_instances
  606. placeholder: "ex: 1"
  607. settings:
  608. default: 1
  609. - type: number-input
  610. label: Maximum number of EC2 instances to create in the application autoscaling group.
  611. variable: additional_nodegroup_max_instances
  612. placeholder: "ex: 10"
  613. settings:
  614. default: 10
  615. - name: iam
  616. label: IAM
  617. sections:
  618. - name: toggle_aws_auth
  619. contents:
  620. - type: heading
  621. label: Configure IAM Access
  622. - type: checkbox
  623. variable: manage_aws_auth_configmap
  624. label: Allow Porter to manage AWS authentication for the cluster.
  625. settings:
  626. default: true
  627. - name: aws_auth_warning
  628. show_if:
  629. not: manage_aws_auth_configmap
  630. contents:
  631. - type: subtitle
  632. 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."
  633. - name: arns
  634. show_if: manage_aws_auth_configmap
  635. contents:
  636. - type: heading
  637. label: Users
  638. - type: subtitle
  639. 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."
  640. - type: key-value-array
  641. variable: aws_auth_users
  642. settings:
  643. default: {}
  644. - type: heading
  645. label: Roles
  646. - type: subtitle
  647. 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."
  648. - type: key-value-array
  649. variable: aws_auth_roles
  650. settings:
  651. default: {}
  652. - name: advanced
  653. label: Advanced
  654. sections:
  655. - name: workload_machine_label
  656. contents:
  657. - type: heading
  658. label: Application Node Group Settings
  659. - type: string-input
  660. label: Add custom node labels to the application node group. If you are adding multiple labels, they should be comma separated.
  661. variable: custom_node_labels_application
  662. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  663. settings:
  664. default: ""
  665. - name: system_machine_type
  666. contents:
  667. - type: heading
  668. label: System Node Group Settings
  669. - type: select
  670. label: ⚙️ AWS System Machine Type
  671. variable: system_machine_type
  672. settings:
  673. default: t2.medium
  674. options:
  675. - label: t2.medium
  676. value: t2.medium
  677. - label: t2.large
  678. value: t2.large
  679. - label: t2.xlarge
  680. value: t2.xlarge
  681. - label: t2.2xlarge
  682. value: t2.2xlarge
  683. - label: t3.medium
  684. value: t3.medium
  685. - label: t3.large
  686. value: t3.large
  687. - label: t3.xlarge
  688. value: t3.xlarge
  689. - label: t3.2xlarge
  690. value: t3.2xlarge
  691. - label: c6i.large
  692. value: c6i.large
  693. - label: c6i.xlarge
  694. value: c6i.xlarge
  695. - label: c6i.2xlarge
  696. value: c6i.2xlarge
  697. - label: c6i.4xlarge
  698. value: c6i.4xlarge
  699. - type: string-input
  700. label: Add custom node labels to the system node group. If you are adding multiple labels, they should be comma separated.
  701. variable: custom_node_labels_system
  702. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  703. settings:
  704. default: ""
  705. - name: spot_instance_should_enable
  706. contents:
  707. - type: heading
  708. label: Spot Instance Settings
  709. - type: checkbox
  710. variable: spot_instances_enabled
  711. label: Enable spot instances for this cluster.
  712. settings:
  713. default: false
  714. - name: spot_instance_price
  715. show_if: spot_instances_enabled
  716. contents:
  717. - type: string-input
  718. label: Assign a bid price for the spot instance (optional).
  719. variable: spot_price
  720. placeholder: "ex: 0.05"
  721. - name: net_settings
  722. contents:
  723. - type: heading
  724. label: Networking Settings
  725. - type: string-input
  726. 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)."
  727. variable: cluster_vpc_cidr_octets
  728. placeholder: "ex: 10.99"
  729. settings:
  730. default: "10.99"
  731. - type: checkbox
  732. label: "Add additional private subnets to the cluster in each AZ."
  733. variable: additional_private_subnets
  734. settings:
  735. default: false
  736. - name: subnet_multiplicity
  737. show_if: additional_private_subnets
  738. contents:
  739. - type: number-input
  740. label: "Multiplicity of the subnet within each AZ."
  741. variable: additional_private_subnets_multiplicity
  742. settings:
  743. default: 3
  744. - name: net_settings_azs_toggle
  745. contents:
  746. - type: checkbox
  747. label: "Specify the AZs to provision this cluster in."
  748. variable: specify_azs
  749. settings:
  750. default: false
  751. - name: net_settings_azs
  752. show_if: specify_azs
  753. contents:
  754. - type: array-input
  755. variable: azs
  756. label: Availability Zones
  757. - name: net_settings_single_az_nat_gateway
  758. contents:
  759. - type: checkbox
  760. variable: single_az_nat_gateway
  761. 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."
  762. settings:
  763. default: true
  764. - name: nginx_settings
  765. contents:
  766. - type: heading
  767. label: NGINX Settings
  768. - type: checkbox
  769. variable: disable_nginx_load_balancer
  770. label: Disable NGINX load balancer and expose NGINX only on a cluster IP address.
  771. settings:
  772. default: false
  773. - name: prometheus_settings
  774. contents:
  775. - type: heading
  776. label: Prometheus Settings
  777. - type: checkbox
  778. variable: additional_prometheus_node_group
  779. label: Add an additional prometheus node group to ensure monitoring stability.
  780. settings:
  781. default: true
  782. - name: prometheus_machine_settings
  783. show_if: additional_prometheus_node_group
  784. contents:
  785. - type: select
  786. label: ⚙️ AWS Prometheus Machine Type
  787. variable: additional_prometheus_machine_type
  788. settings:
  789. default: t2.medium
  790. options:
  791. - label: t2.medium
  792. value: t2.medium
  793. - label: t2.large
  794. value: t2.large
  795. - label: t2.xlarge
  796. value: t2.xlarge
  797. - label: t3.medium
  798. value: t3.medium
  799. - label: t3.large
  800. value: t3.large
  801. - label: t3.xlarge
  802. value: t3.xlarge
  803. - type: string-input
  804. label: Add custom node labels to the monitoring node group. If you are adding multiple labels, they should be comma separated.
  805. variable: custom_node_labels_monitoring
  806. placeholder: "ex: mylabel=custom-label,mylabel2=another-one"
  807. settings:
  808. default: ""
  809. - name: kms_secret_encryption
  810. contents:
  811. - type: heading
  812. label: KMS Encryption
  813. - type: checkbox
  814. variable: is_kms_enabled
  815. label: Encrypt all Kubernetes secrets with AWS Key Management Service (KMS)
  816. settings:
  817. default: false
  818. - name: enable_logging
  819. contents:
  820. - type: heading
  821. label: Enable AWS Logging
  822. - type: checkbox
  823. variable: vpc_flow_logs_enabled
  824. label: Enable VPC Flow Logs
  825. settings:
  826. default: false
  827. - type: checkbox
  828. variable: eks_control_plane_logs_enabled
  829. label: Enable EKS Control Plane Logs
  830. settings:
  831. default: false
  832. - name: add_custom_tags
  833. contents:
  834. - type: heading
  835. label: Add Custom Tags on AWS Resources Provisioned by Porter
  836. - type: key-value-array
  837. variable: custom_tags
  838. settings:
  839. default: {}
  840. `
  841. const gcrForm = `name: GCR
  842. hasSource: false
  843. includeHiddenFields: true
  844. tabs:
  845. - name: main
  846. label: Configuration
  847. sections:
  848. - name: section_one
  849. contents:
  850. - type: heading
  851. label: GCR Configuration
  852. - type: select
  853. label: 📍 GCP Region
  854. variable: gcp_region
  855. settings:
  856. default: us-central1
  857. options:
  858. - label: asia-east1
  859. value: asia-east1
  860. - label: asia-east2
  861. value: asia-east2
  862. - label: asia-northeast1
  863. value: asia-northeast1
  864. - label: asia-northeast2
  865. value: asia-northeast2
  866. - label: asia-northeast3
  867. value: asia-northeast3
  868. - label: asia-south1
  869. value: asia-south1
  870. - label: asia-south2
  871. value: asia-south2
  872. - label: asia-southeast1
  873. value: asia-southeast1
  874. - label: asia-southeast2
  875. value: asia-southeast2
  876. - label: australia-southeast1
  877. value: australia-southeast1
  878. - label: australia-southeast2
  879. value: australia-southeast2
  880. - label: europe-central2
  881. value: europe-central2
  882. - label: europe-north1
  883. value: europe-north1
  884. - label: europe-west1
  885. value: europe-west1
  886. - label: europe-west2
  887. value: europe-west2
  888. - label: europe-west3
  889. value: europe-west3
  890. - label: europe-west4
  891. value: europe-west4
  892. - label: europe-west6
  893. value: europe-west6
  894. - label: europe-west8
  895. value: europe-west8
  896. - label: europe-west9
  897. value: europe-west9
  898. - label: europe-southwest1
  899. value: europe-southwest1
  900. - label: northamerica-northeast1
  901. value: northamerica-northeast1
  902. - label: northamerica-northeast2
  903. value: northamerica-northeast2
  904. - label: southamerica-east1
  905. value: southamerica-east1
  906. - label: southamerica-west1
  907. value: southamerica-west1
  908. - label: us-central1
  909. value: us-central1
  910. - label: us-east1
  911. value: us-east1
  912. - label: us-east4
  913. value: us-east4
  914. - label: us-east5
  915. value: us-east5
  916. - label: us-south1
  917. value: us-south1
  918. - label: us-west1
  919. value: us-west1
  920. - label: us-west2
  921. value: us-west2
  922. - label: us-west3
  923. value: us-west3
  924. - label: us-west4
  925. value: us-west4
  926. `
  927. const garForm = `name: GAR
  928. hasSource: false
  929. includeHiddenFields: true
  930. tabs:
  931. - name: main
  932. label: Configuration
  933. sections:
  934. - name: section_one
  935. contents:
  936. - type: heading
  937. label: GAR Configuration
  938. - type: select
  939. label: 📍 GCP Region
  940. variable: gcp_region
  941. settings:
  942. default: us-central1
  943. options:
  944. - label: asia-east1
  945. value: asia-east1
  946. - label: asia-east2
  947. value: asia-east2
  948. - label: asia-northeast1
  949. value: asia-northeast1
  950. - label: asia-northeast2
  951. value: asia-northeast2
  952. - label: asia-northeast3
  953. value: asia-northeast3
  954. - label: asia-south1
  955. value: asia-south1
  956. - label: asia-south2
  957. value: asia-south2
  958. - label: asia-southeast1
  959. value: asia-southeast1
  960. - label: asia-southeast2
  961. value: asia-southeast2
  962. - label: australia-southeast1
  963. value: australia-southeast1
  964. - label: australia-southeast2
  965. value: australia-southeast2
  966. - label: europe-central2
  967. value: europe-central2
  968. - label: europe-north1
  969. value: europe-north1
  970. - label: europe-west1
  971. value: europe-west1
  972. - label: europe-west2
  973. value: europe-west2
  974. - label: europe-west3
  975. value: europe-west3
  976. - label: europe-west4
  977. value: europe-west4
  978. - label: europe-west6
  979. value: europe-west6
  980. - label: europe-west8
  981. value: europe-west8
  982. - label: europe-west9
  983. value: europe-west9
  984. - label: europe-southwest1
  985. value: europe-southwest1
  986. - label: northamerica-northeast1
  987. value: northamerica-northeast1
  988. - label: northamerica-northeast2
  989. value: northamerica-northeast2
  990. - label: southamerica-east1
  991. value: southamerica-east1
  992. - label: southamerica-west1
  993. value: southamerica-west1
  994. - label: us-central1
  995. value: us-central1
  996. - label: us-east1
  997. value: us-east1
  998. - label: us-east4
  999. value: us-east4
  1000. - label: us-east5
  1001. value: us-east5
  1002. - label: us-south1
  1003. value: us-south1
  1004. - label: us-west1
  1005. value: us-west1
  1006. - label: us-west2
  1007. value: us-west2
  1008. - label: us-west3
  1009. value: us-west3
  1010. - label: us-west4
  1011. value: us-west4
  1012. - label: us (multi-region)
  1013. value: us
  1014. - label: europe (multi-region)
  1015. value: europe
  1016. - label: asia (multi-region)
  1017. value: asia
  1018. `
  1019. const gkeForm = `name: GKE
  1020. hasSource: false
  1021. includeHiddenFields: true
  1022. tabs:
  1023. - name: main
  1024. label: Configuration
  1025. sections:
  1026. - name: section_one
  1027. contents:
  1028. - type: heading
  1029. label: GKE Configuration
  1030. - type: select
  1031. label: 📍 GCP Region
  1032. variable: gcp_region
  1033. settings:
  1034. default: us-central1
  1035. options:
  1036. - label: asia-east1
  1037. value: asia-east1
  1038. - label: asia-east2
  1039. value: asia-east2
  1040. - label: asia-northeast1
  1041. value: asia-northeast1
  1042. - label: asia-northeast2
  1043. value: asia-northeast2
  1044. - label: asia-northeast3
  1045. value: asia-northeast3
  1046. - label: asia-south1
  1047. value: asia-south1
  1048. - label: asia-south2
  1049. value: asia-south2
  1050. - label: asia-southeast1
  1051. value: asia-southeast1
  1052. - label: asia-southeast2
  1053. value: asia-southeast2
  1054. - label: australia-southeast1
  1055. value: australia-southeast1
  1056. - label: australia-southeast2
  1057. value: australia-southeast2
  1058. - label: europe-central2
  1059. value: europe-central2
  1060. - label: europe-north1
  1061. value: europe-north1
  1062. - label: europe-west1
  1063. value: europe-west1
  1064. - label: europe-west2
  1065. value: europe-west2
  1066. - label: europe-west3
  1067. value: europe-west3
  1068. - label: europe-west4
  1069. value: europe-west4
  1070. - label: europe-west6
  1071. value: europe-west6
  1072. - label: europe-west8
  1073. value: europe-west8
  1074. - label: europe-west9
  1075. value: europe-west9
  1076. - label: europe-southwest1
  1077. value: europe-southwest1
  1078. - label: northamerica-northeast1
  1079. value: northamerica-northeast1
  1080. - label: northamerica-northeast2
  1081. value: northamerica-northeast2
  1082. - label: southamerica-east1
  1083. value: southamerica-east1
  1084. - label: southamerica-west1
  1085. value: southamerica-west1
  1086. - label: us-central1
  1087. value: us-central1
  1088. - label: us-east1
  1089. value: us-east1
  1090. - label: us-east4
  1091. value: us-east4
  1092. - label: us-east5
  1093. value: us-east5
  1094. - label: us-south1
  1095. value: us-south1
  1096. - label: us-west1
  1097. value: us-west1
  1098. - label: us-west2
  1099. value: us-west2
  1100. - label: us-west3
  1101. value: us-west3
  1102. - label: us-west4
  1103. value: us-west4
  1104. - type: string-input
  1105. label: 👤 Issuer Email
  1106. required: true
  1107. placeholder: example@example.com
  1108. variable: issuer_email
  1109. - type: string-input
  1110. label: GKE Cluster Name
  1111. required: true
  1112. placeholder: my-cluster
  1113. variable: cluster_name
  1114. `
  1115. const docrForm = `name: DOCR
  1116. hasSource: false
  1117. includeHiddenFields: true
  1118. tabs:
  1119. - name: main
  1120. label: Configuration
  1121. sections:
  1122. - name: section_one
  1123. contents:
  1124. - type: heading
  1125. label: DOCR Configuration
  1126. - type: select
  1127. label: DO Subscription Tier
  1128. variable: docr_subscription_tier
  1129. settings:
  1130. default: basic
  1131. options:
  1132. - label: Basic
  1133. value: basic
  1134. - label: Professional
  1135. value: professional
  1136. - type: string-input
  1137. label: DOCR Name
  1138. required: true
  1139. placeholder: my-awesome-registry
  1140. variable: docr_name
  1141. `
  1142. const doksForm = `name: DOKS
  1143. hasSource: false
  1144. includeHiddenFields: true
  1145. tabs:
  1146. - name: main
  1147. label: Configuration
  1148. sections:
  1149. - name: section_one
  1150. contents:
  1151. - type: heading
  1152. label: DOKS Configuration
  1153. - type: select
  1154. label: 📍 DO Region
  1155. variable: do_region
  1156. settings:
  1157. default: nyc1
  1158. options:
  1159. - label: Amsterdam 3
  1160. value: ams3
  1161. - label: Bangalore 1
  1162. value: blr1
  1163. - label: Frankfurt 1
  1164. value: fra1
  1165. - label: London 1
  1166. value: lon1
  1167. - label: New York 1
  1168. value: nyc1
  1169. - label: New York 3
  1170. value: nyc3
  1171. - label: San Francisco 2
  1172. value: sfo2
  1173. - label: San Francisco 3
  1174. value: sfo3
  1175. - label: Singapore 1
  1176. value: sgp1
  1177. - label: Toronto 1
  1178. value: tor1
  1179. - type: string-input
  1180. label: 👤 Issuer Email
  1181. required: true
  1182. placeholder: example@example.com
  1183. variable: issuer_email
  1184. - type: string-input
  1185. label: DOKS Cluster Name
  1186. required: true
  1187. placeholder: my-cluster
  1188. variable: cluster_name
  1189. `
  1190. const acrForm = `name: ACR
  1191. hasSource: false
  1192. includeHiddenFields: true
  1193. isClusterScoped: false
  1194. tabs:
  1195. - name: main
  1196. label: Configuration
  1197. sections:
  1198. - name: section_one
  1199. contents:
  1200. - type: heading
  1201. label: ACR Configuration
  1202. - type: select
  1203. label: 📍 Azure Region
  1204. variable: aks_region
  1205. settings:
  1206. default: East US
  1207. options:
  1208. - label: East US
  1209. value: East US
  1210. - label: East US 2
  1211. value: East US 2
  1212. - label: West US 2
  1213. value: West US 2
  1214. - label: West US 3
  1215. value: West US 3
  1216. - label: Norway East
  1217. value: Norway East
  1218. - type: string-input
  1219. label: ACR Name
  1220. required: true
  1221. placeholder: my-registry
  1222. variable: acr_name
  1223. `
  1224. const aksForm = `name: AKS
  1225. hasSource: false
  1226. includeHiddenFields: true
  1227. isClusterScoped: false
  1228. tabs:
  1229. - name: main
  1230. label: Configuration
  1231. sections:
  1232. - name: section_one
  1233. contents:
  1234. - type: heading
  1235. label: AKS Configuration
  1236. - type: select
  1237. label: 📍 Azure Region
  1238. variable: aks_region
  1239. settings:
  1240. default: East US
  1241. options:
  1242. - label: East US
  1243. value: East US
  1244. - label: East US 2
  1245. value: East US 2
  1246. - label: West US 2
  1247. value: West US 2
  1248. - label: West US 3
  1249. value: West US 3
  1250. - label: Norway East
  1251. value: Norway East
  1252. - type: select
  1253. label: ⚙️ Application Machine Type
  1254. variable: app_machine_type
  1255. settings:
  1256. default: Standard_A2_v2
  1257. options:
  1258. - label: Standard A2
  1259. value: Standard_A2_v2
  1260. - label: Standard A4
  1261. value: Standard_A4_v2
  1262. - label: Standard D2
  1263. value: Standard_D2_v3
  1264. - type: string-input
  1265. label: 👤 Issuer Email
  1266. required: true
  1267. placeholder: example@example.com
  1268. variable: issuer_email
  1269. - type: string-input
  1270. label: AKS Cluster Name
  1271. required: true
  1272. placeholder: my-cluster
  1273. variable: cluster_name
  1274. `