2
0

forms.go 35 KB

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