2
0

forms.go 34 KB

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