questions.yaml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. groups:
  2. - name: "Container Images"
  3. description: "Image to be used for container"
  4. - name: "Container Entrypoint"
  5. description: "Configuration of the executable that will be run when the container is started"
  6. - name: "Container Environment Variables"
  7. description: "Set the environment that will be visible to the container"
  8. - name: "Networking"
  9. description: "Configure networking for container"
  10. - name: "Port Forwarding"
  11. description: "Configure ports to forward to workload"
  12. - name: "Storage"
  13. description: "Persist and share data that is separate from the lifecycle of the container"
  14. - name: "Health Check"
  15. description: "Define mechanism to periodically probe the container to ensure it's functioning as desired"
  16. - name: "Workload Details"
  17. description: "Configure how workload should be deployed"
  18. - name: "Scaling/Upgrade Policy"
  19. description: "Configure how pods are replaced when configuration is upgraded"
  20. - name: "Restart Policy"
  21. description: "Configure when pod should be restarted in case of failure"
  22. - name: "Resource Reservation"
  23. description: "Specify resources to be allocated to workload"
  24. - name: "Resource Limits"
  25. description: "Set CPU/memory limits for Kubernetes Pod"
  26. - name: "Portal Configuration"
  27. description: "Configure UI web portal"
  28. questions:
  29. - variable: enableUIPortal
  30. label: "Enable WebUI Portal (only supported in TrueNAS SCALE Bluefin)"
  31. description: "Enable webui portal for easier access to workload ( Only valid for TrueNAS SCALE Bluefin )"
  32. group: "Portal Configuration"
  33. schema:
  34. type: boolean
  35. default: false
  36. - variable: portalDetails
  37. label: "WebUI Portal"
  38. description: "Configure WebUI Portal"
  39. group: "Portal Configuration"
  40. schema:
  41. show_if: [["enableUIPortal", "=", true]]
  42. type: dict
  43. attrs:
  44. - variable: portalName
  45. label: "Portal Name"
  46. description: "Specify a UI Portal name to use which would be displayed in the UI"
  47. schema:
  48. type: string
  49. default: "Web Portal"
  50. - variable: protocol
  51. label: "Protocol for Portal"
  52. description: "Specify protocol for portal"
  53. schema:
  54. type: string
  55. default: "http"
  56. enum:
  57. - value: "http"
  58. description: "HTTP Protocol"
  59. - value: "https"
  60. description: "HTTPS Protocol"
  61. - variable: useNodeIP
  62. label: "Use Node IP for Portal IP/Domain"
  63. schema:
  64. type: boolean
  65. default: true
  66. - variable: host
  67. description: "IP/Domain to use for accessing the portal"
  68. label: "Portal IP/Domain"
  69. schema:
  70. show_if: [["useNodeIP", "=", false]]
  71. type: string
  72. $ref:
  73. - "definitions/nodeIP"
  74. - variable: port
  75. label: "Port"
  76. description: "Specify port to be used for Portal access"
  77. schema:
  78. type: int
  79. max: 65535
  80. default: 15000
  81. # Workload type
  82. - variable: workloadType
  83. description: "Please specify type of workload to deploy"
  84. label: "Workload Type"
  85. group: "Workload Details"
  86. schema:
  87. type: string
  88. hidden: true
  89. default: "Deployment"
  90. required: true
  91. enum:
  92. - value: "Deployment"
  93. description: "Deploy a Deployment workload"
  94. - value: "Job"
  95. description: "Deploy job workload"
  96. - value: "CronJob"
  97. description: "Deploy cronjob workload"
  98. # Cronjob schedule
  99. - variable: cronSchedule
  100. label: "Cron Schedule"
  101. group: "Workload Details"
  102. schema:
  103. hidden: true
  104. type: cron
  105. show_if: [["workloadType", "=", "CronJob"]]
  106. default:
  107. minute: "5"
  108. # Image related
  109. - variable: image
  110. description: "Docker Image Details"
  111. label: "Docker Image"
  112. group: "Container Images"
  113. schema:
  114. type: dict
  115. required: true
  116. attrs:
  117. - variable: repository
  118. description: "Docker image repository"
  119. label: "Image repository"
  120. schema:
  121. type: string
  122. required: true
  123. - variable: tag
  124. description: "Tag to use for specified image"
  125. label: "Image Tag"
  126. schema:
  127. type: string
  128. default: "latest"
  129. - variable: pullPolicy
  130. description: "Docker Image Pull Policy"
  131. label: "Image Pull Policy"
  132. schema:
  133. type: string
  134. default: "IfNotPresent"
  135. enum:
  136. - value: "IfNotPresent"
  137. description: "Only pull image if not present on host"
  138. - value: "Always"
  139. description: "Always pull image even if present on host"
  140. - value: "Never"
  141. description: "Never pull image even if it's not present on host"
  142. # Update strategy
  143. - variable: updateStrategy
  144. description: "Upgrade Policy"
  145. label: "Update Strategy"
  146. group: "Scaling/Upgrade Policy"
  147. schema:
  148. type: string
  149. show_if: [["workloadType", "=", "Deployment"]]
  150. default: "Recreate"
  151. enum:
  152. - value: "RollingUpdate"
  153. description: "Create new pods and then kill old ones"
  154. - value: "Recreate"
  155. description: "Kill existing pods before creating new ones"
  156. # Restart Policy
  157. - variable: jobRestartPolicy
  158. description: "Restart Policy for Job"
  159. label: "Restart Policy"
  160. group: "Restart Policy"
  161. schema:
  162. hidden: true
  163. type: string
  164. default: "OnFailure"
  165. show_if: [["workloadType", "!=", "Deployment"]]
  166. enum:
  167. - value: "OnFailure"
  168. description: "Only restart job if it fails"
  169. - value: "Never"
  170. description: "Never restart job even if it fails"
  171. # Configurable CMD / Entrypoint / Environment Variables
  172. - variable: containerCommand
  173. description: "Commands to execute inside container overriding image CMD default"
  174. label: "Container CMD"
  175. group: "Container Entrypoint"
  176. schema:
  177. type: list
  178. items:
  179. - variable: command
  180. description: "Container Command"
  181. label: "Command"
  182. schema:
  183. type: string
  184. - variable: containerArgs
  185. description: "Specify arguments for container command"
  186. label: "Container Args"
  187. group: "Container Entrypoint"
  188. schema:
  189. type: list
  190. items:
  191. - variable: arg
  192. description: "Container Arg"
  193. label: "Arg"
  194. schema:
  195. type: string
  196. - variable: containerEnvironmentVariables
  197. description: "Container Environment Variables"
  198. label: "Container Environment Variables"
  199. group: "Container Environment Variables"
  200. schema:
  201. type: list
  202. items:
  203. - variable: environmentVariable
  204. description: "Container Environment Variable"
  205. label: "Container Environment Variable"
  206. schema:
  207. type: dict
  208. attrs:
  209. - variable: name
  210. description: "Environment Variable Name"
  211. label: "Environment Variable Name"
  212. schema:
  213. type: string
  214. required: true
  215. - variable: value
  216. description: "Environment Variable Value"
  217. label: "Environment Variable Value"
  218. schema:
  219. type: string
  220. required: true
  221. # Networking options
  222. - variable: externalInterfaces
  223. description: "Add External Interfaces"
  224. label: "Add external Interfaces"
  225. group: "Networking"
  226. schema:
  227. type: list
  228. items:
  229. - variable: interfaceConfiguration
  230. description: "Interface Configuration"
  231. label: "Interface Configuration"
  232. schema:
  233. type: dict
  234. $ref:
  235. - "normalize/interfaceConfiguration"
  236. attrs:
  237. - variable: hostInterface
  238. description: "Please specify host interface"
  239. label: "Host Interface"
  240. schema:
  241. type: string
  242. required: true
  243. $ref:
  244. - "definitions/interface"
  245. - variable: ipam
  246. description: "Define how IP Address will be managed"
  247. label: "IP Address Management"
  248. schema:
  249. type: dict
  250. required: true
  251. attrs:
  252. - variable: type
  253. description: "Specify type for IPAM"
  254. label: "IPAM Type"
  255. schema:
  256. type: string
  257. required: true
  258. enum:
  259. - value: "dhcp"
  260. description: "Use DHCP"
  261. - value: "static"
  262. description: "Use static IP"
  263. show_subquestions_if: "static"
  264. subquestions:
  265. - variable: staticIPConfigurations
  266. label: "Static IP Addresses"
  267. schema:
  268. type: list
  269. items:
  270. - variable: staticIP
  271. label: "Static IP"
  272. schema:
  273. type: ipaddr
  274. cidr: true
  275. - variable: staticRoutes
  276. label: "Static Routes"
  277. schema:
  278. type: list
  279. items:
  280. - variable: staticRouteConfiguration
  281. label: "Static Route Configuration"
  282. schema:
  283. type: dict
  284. attrs:
  285. - variable: destination
  286. label: "Destination"
  287. schema:
  288. type: ipaddr
  289. cidr: true
  290. required: true
  291. - variable: gateway
  292. label: "Gateway"
  293. schema:
  294. type: ipaddr
  295. cidr: false
  296. required: true
  297. - variable: dnsPolicy
  298. label: "DNS Policy"
  299. description: "Default behaviour is where Pod inherits the name resolution configuration from the node that the pods run on, if None is specified, It allows a Pod to ignore DNS settings from the Kubernetes environment."
  300. group: "Networking"
  301. schema:
  302. type: string
  303. default: "Default"
  304. enum:
  305. - value: "Default"
  306. description: "Use Default DNS Policy where Pod will inherit the name resolution configuration from the node."
  307. - value: "ClusterFirst"
  308. description: >
  309. "Kubernetes internal DNS will be prioritised and resolved first. If the domain does not resolve with internal
  310. kubernetes DNS, the DNS query will be forwarded to the upstream nameserver inherited from the node. This is
  311. useful if the workload needs to access other service(s)/workload(s) using kubernetes internal DNS."
  312. - value: "ClusterFirstWithHostNet"
  313. description: "For Pods running with hostNetwork and wanting to prioritise internal kubernetes DNS should make use of this policy."
  314. - value: "None"
  315. description: "Ignore DNS settings from the Kubernetes cluster"
  316. - variable: dnsConfig
  317. label: "DNS Configuration"
  318. group: "Networking"
  319. description: "Specify custom DNS configuration which will be applied to the pod"
  320. schema:
  321. type: dict
  322. attrs:
  323. - variable: nameservers
  324. label: "Nameservers"
  325. schema:
  326. default: []
  327. type: list
  328. items:
  329. - variable: nameserver
  330. label: "Nameserver"
  331. schema:
  332. type: string
  333. - variable: searches
  334. label: "Searches"
  335. schema:
  336. default: []
  337. type: list
  338. items:
  339. - variable: search
  340. label: "Search Entry"
  341. schema:
  342. type: string
  343. - variable: options
  344. label: "DNS Options"
  345. schema:
  346. type: list
  347. items:
  348. - variable: optionsEntry
  349. label: "Option Entry Configuration"
  350. schema:
  351. type: dict
  352. attrs:
  353. - variable: name
  354. label: "Option Name"
  355. schema:
  356. type: string
  357. required: true
  358. - variable: value
  359. label: "Option Value"
  360. schema:
  361. type: string
  362. required: true
  363. - variable: hostNetwork
  364. label: "Provide access to node network namespace for the workload"
  365. group: "Networking"
  366. schema:
  367. type: boolean
  368. default: false
  369. show_if: [["externalInterfaces", "=", []]]
  370. - variable: hostPortsList
  371. label: "Specify host ports for the workload"
  372. description: "Only use host ports if scaling of a workload is not required"
  373. group: "Networking"
  374. schema:
  375. show_if: [["updateStrategy", "=", "Recreate"]]
  376. type: list
  377. hidden: true
  378. items:
  379. - variable: hostPortConfiguration
  380. label: "Host Port Configuration"
  381. schema:
  382. type: dict
  383. attrs:
  384. - variable: containerPort
  385. label: "Container Port"
  386. schema:
  387. type: string
  388. required: true
  389. - variable: hostPort
  390. label: "Host Port"
  391. schema:
  392. type: string
  393. required: true
  394. - variable: portForwardingList
  395. label: "Specify Node ports to forward to workload"
  396. group: "Port Forwarding"
  397. description: "Specify ports of node and workload to forward traffic from node port to workload port"
  398. schema:
  399. type: list
  400. show_if: [["hostNetwork", "=", false]]
  401. items:
  402. - variable: portForwarding
  403. label: "Port Forwarding Configuration"
  404. schema:
  405. type: dict
  406. attrs:
  407. - variable: containerPort
  408. label: "Container Port"
  409. schema:
  410. type: int
  411. required: true
  412. - variable: nodePort
  413. label: "Node Port"
  414. schema:
  415. type: int
  416. required: true
  417. min: 9000
  418. max: 65535
  419. - variable: protocol
  420. label: "Protocol"
  421. schema:
  422. type: string
  423. default: "TCP"
  424. enum:
  425. - value: "TCP"
  426. description: "TCP Protocol"
  427. - value: "UDP"
  428. description: "UDP Protocol"
  429. # Storage Options
  430. # Host path based volumes
  431. - variable: hostPathVolumes
  432. label: "Host Path Volumes"
  433. group: "Storage"
  434. schema:
  435. type: list
  436. items:
  437. - variable: hostPathConfiguration
  438. label: "Host Path Configuration"
  439. schema:
  440. type: dict
  441. attrs:
  442. - variable: hostPath
  443. label: "Host Path"
  444. schema:
  445. type: hostpath
  446. required: true
  447. - variable: mountPath
  448. label: "Mount Path"
  449. description: "Path where host path will be mounted inside the pod"
  450. schema:
  451. type: path
  452. required: true
  453. - variable: readOnly
  454. label: "Read Only"
  455. schema:
  456. type: boolean
  457. default: false
  458. - variable: emptyDirVolumes
  459. label: "Memory Backed Volumes"
  460. description: "Mount memory based temporary volumes for fast access i.e consuming /dev/shm"
  461. group: "Storage"
  462. schema:
  463. type: list
  464. items:
  465. - variable: emptyDirVolume
  466. label: "Memory Backed Volume"
  467. schema:
  468. type: dict
  469. attrs:
  470. - variable: mountPath
  471. label: "Mount Path"
  472. description: "Path where temporary path will be mounted inside the pod"
  473. schema:
  474. type: path
  475. required: true
  476. # Volumes
  477. - variable: volumes
  478. label: "Volumes"
  479. group: "Storage"
  480. schema:
  481. type: list
  482. items:
  483. - variable: volume
  484. label: "Volume"
  485. schema:
  486. type: dict
  487. $ref:
  488. - "normalize/ixVolume"
  489. attrs:
  490. - variable: mountPath
  491. label: "Mount Path"
  492. description: "Path where the volume will be mounted inside the pod"
  493. schema:
  494. type: path
  495. required: true
  496. - variable: datasetName
  497. label: "Dataset Name"
  498. schema:
  499. type: string
  500. required: true
  501. # Pod Probes
  502. # Liveness Probe
  503. - variable: livenessProbe
  504. label: "Liveness Probe"
  505. description: "Configure Liveness Probe"
  506. group: "Health Check"
  507. schema:
  508. hidden: true
  509. type: dict
  510. default: null
  511. "null": true
  512. attrs:
  513. - variable: command
  514. label: "Liveness command"
  515. description: "Specify a command to determine liveness of pod"
  516. schema:
  517. type: list
  518. required: true
  519. items:
  520. - variable: commandArg
  521. label: "Command Arg"
  522. schema:
  523. type: string
  524. - variable: initialDelaySeconds
  525. label: "Seconds Delay"
  526. description: "Seconds to delay the first liveness probe"
  527. schema:
  528. type: int
  529. default: 5
  530. - variable: periodSeconds
  531. label: "Period Seconds"
  532. description: "Specify number of seconds to run liveness probe"
  533. schema:
  534. type: int
  535. default: 10
  536. # Specify GPU configuration
  537. - variable: gpuConfiguration
  538. label: "GPU Configuration"
  539. group: "Resource Reservation"
  540. schema:
  541. type: dict
  542. $ref:
  543. - "definitions/gpuConfiguration"
  544. attrs: []
  545. - variable: tty
  546. label: "Enable TTY"
  547. description: "Determines whether containers in a pod runs with TTY enabled. By default pod has it disabled."
  548. group: "Workload Details"
  549. schema:
  550. type: boolean
  551. default: false
  552. - variable: stdin
  553. label: "Enable STDIN"
  554. description: "Determines whether containers in a pod runs with stdin enabled. By default pod has it disabled."
  555. group: "Workload Details"
  556. schema:
  557. type: boolean
  558. default: false
  559. - variable: securityContext
  560. label: "Security Context"
  561. group: "Workload Details"
  562. schema:
  563. type: dict
  564. attrs:
  565. - variable: privileged
  566. label: "Privileged Mode"
  567. description: "Determines if any container in a pod can enable privileged mode. By default a container is not allowed to access any devices on the host, but a 'privileged' container is given access to all devices on the host. This allows the container nearly all the same access as processes running on the host."
  568. schema:
  569. type: boolean
  570. default: false
  571. - variable: capabilities
  572. label: "Capabilities"
  573. description: "With Linux capabilities, you can grant certain privileges to a process without granting all the privileges of the root user."
  574. schema:
  575. type: list
  576. items:
  577. - variable: capability
  578. description: "Add Capability"
  579. label: "Add Capability"
  580. schema:
  581. type: string
  582. - variable: enableRunAsUser
  583. label: "Configure Container User and Group ID"
  584. description: "Configure security context runAsUser and runAsGroup variables"
  585. schema:
  586. type: boolean
  587. default: false
  588. show_subquestions_if: true
  589. subquestions:
  590. - variable: runAsUser
  591. label: "Run Container As User"
  592. description: "Configure user id for container."
  593. schema:
  594. type: int
  595. default: 568
  596. - variable: runAsGroup
  597. label: "Run Container As Group"
  598. description: "Configure group id for container."
  599. schema:
  600. type: int
  601. default: 568
  602. - variable: enableResourceLimits
  603. label: "Enable Pod resource limits"
  604. group: "Resource Limits"
  605. schema:
  606. type: boolean
  607. default: false
  608. - variable: cpuLimit
  609. label: "CPU Limit"
  610. description: "CPU resource limit allow plain integer values with suffix m(milli) e.g 1000m, 100."
  611. group: "Resource Limits"
  612. schema:
  613. type: string
  614. show_if: [["enableResourceLimits", "=", true]]
  615. valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)"
  616. default: "4000m"
  617. - variable: memLimit
  618. label: "Memory Limit"
  619. group: "Resource Limits"
  620. description: "Memory limits is specified by number of bytes. Followed by quantity suffix like E,P,T,G,M,k and Ei,Pi,Ti,Mi,Gi,Ki can also be used. e.g 129e6, 129M, 128974848000m, 123Mi"
  621. schema:
  622. type: string
  623. show_if: [["enableResourceLimits", "=", true]]
  624. valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
  625. default: "8Gi"