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. min: 9000
  80. max: 65535
  81. default: 15000
  82. # Workload type
  83. - variable: workloadType
  84. description: "Please specify type of workload to deploy"
  85. label: "Workload Type"
  86. group: "Workload Details"
  87. schema:
  88. type: string
  89. hidden: true
  90. default: "Deployment"
  91. required: true
  92. enum:
  93. - value: "Deployment"
  94. description: "Deploy a Deployment workload"
  95. - value: "Job"
  96. description: "Deploy job workload"
  97. - value: "CronJob"
  98. description: "Deploy cronjob workload"
  99. # Cronjob schedule
  100. - variable: cronSchedule
  101. label: "Cron Schedule"
  102. group: "Workload Details"
  103. schema:
  104. hidden: true
  105. type: cron
  106. show_if: [["workloadType", "=", "CronJob"]]
  107. default:
  108. minute: "5"
  109. # Image related
  110. - variable: image
  111. description: "Docker Image Details"
  112. label: "Docker Image"
  113. group: "Container Images"
  114. schema:
  115. type: dict
  116. required: true
  117. attrs:
  118. - variable: repository
  119. description: "Docker image repository"
  120. label: "Image repository"
  121. schema:
  122. type: string
  123. required: true
  124. - variable: tag
  125. description: "Tag to use for specified image"
  126. label: "Image Tag"
  127. schema:
  128. type: string
  129. default: "latest"
  130. - variable: pullPolicy
  131. description: "Docker Image Pull Policy"
  132. label: "Image Pull Policy"
  133. schema:
  134. type: string
  135. default: "IfNotPresent"
  136. enum:
  137. - value: "IfNotPresent"
  138. description: "Only pull image if not present on host"
  139. - value: "Always"
  140. description: "Always pull image even if present on host"
  141. - value: "Never"
  142. description: "Never pull image even if it's not present on host"
  143. # Update strategy
  144. - variable: updateStrategy
  145. description: "Upgrade Policy"
  146. label: "Update Strategy"
  147. group: "Scaling/Upgrade Policy"
  148. schema:
  149. type: string
  150. show_if: [["workloadType", "=", "Deployment"]]
  151. default: "Recreate"
  152. enum:
  153. - value: "RollingUpdate"
  154. description: "Create new pods and then kill old ones"
  155. - value: "Recreate"
  156. description: "Kill existing pods before creating new ones"
  157. # Restart Policy
  158. - variable: jobRestartPolicy
  159. description: "Restart Policy for Job"
  160. label: "Restart Policy"
  161. group: "Restart Policy"
  162. schema:
  163. hidden: true
  164. type: string
  165. default: "OnFailure"
  166. show_if: [["workloadType", "!=", "Deployment"]]
  167. enum:
  168. - value: "OnFailure"
  169. description: "Only restart job if it fails"
  170. - value: "Never"
  171. description: "Never restart job even if it fails"
  172. # Configurable CMD / Entrypoint / Environment Variables
  173. - variable: containerCommand
  174. description: "Commands to execute inside container overriding image CMD default"
  175. label: "Container CMD"
  176. group: "Container Entrypoint"
  177. schema:
  178. type: list
  179. items:
  180. - variable: command
  181. description: "Container Command"
  182. label: "Command"
  183. schema:
  184. type: string
  185. - variable: containerArgs
  186. description: "Specify arguments for container command"
  187. label: "Container Args"
  188. group: "Container Entrypoint"
  189. schema:
  190. type: list
  191. items:
  192. - variable: arg
  193. description: "Container Arg"
  194. label: "Arg"
  195. schema:
  196. type: string
  197. - variable: containerEnvironmentVariables
  198. description: "Container Environment Variables"
  199. label: "Container Environment Variables"
  200. group: "Container Environment Variables"
  201. schema:
  202. type: list
  203. items:
  204. - variable: environmentVariable
  205. description: "Container Environment Variable"
  206. label: "Container Environment Variable"
  207. schema:
  208. type: dict
  209. attrs:
  210. - variable: name
  211. description: "Environment Variable Name"
  212. label: "Environment Variable Name"
  213. schema:
  214. type: string
  215. required: true
  216. - variable: value
  217. description: "Environment Variable Value"
  218. label: "Environment Variable Value"
  219. schema:
  220. type: string
  221. required: true
  222. # Networking options
  223. - variable: externalInterfaces
  224. description: "Add External Interfaces"
  225. label: "Add external Interfaces"
  226. group: "Networking"
  227. schema:
  228. type: list
  229. items:
  230. - variable: interfaceConfiguration
  231. description: "Interface Configuration"
  232. label: "Interface Configuration"
  233. schema:
  234. type: dict
  235. $ref:
  236. - "normalize/interfaceConfiguration"
  237. attrs:
  238. - variable: hostInterface
  239. description: "Please specify host interface"
  240. label: "Host Interface"
  241. schema:
  242. type: string
  243. required: true
  244. $ref:
  245. - "definitions/interface"
  246. - variable: ipam
  247. description: "Define how IP Address will be managed"
  248. label: "IP Address Management"
  249. schema:
  250. type: dict
  251. required: true
  252. attrs:
  253. - variable: type
  254. description: "Specify type for IPAM"
  255. label: "IPAM Type"
  256. schema:
  257. type: string
  258. required: true
  259. enum:
  260. - value: "dhcp"
  261. description: "Use DHCP"
  262. - value: "static"
  263. description: "Use static IP"
  264. show_subquestions_if: "static"
  265. subquestions:
  266. - variable: staticIPConfigurations
  267. label: "Static IP Addresses"
  268. schema:
  269. type: list
  270. items:
  271. - variable: staticIP
  272. label: "Static IP"
  273. schema:
  274. type: ipaddr
  275. cidr: true
  276. - variable: staticRoutes
  277. label: "Static Routes"
  278. schema:
  279. type: list
  280. items:
  281. - variable: staticRouteConfiguration
  282. label: "Static Route Configuration"
  283. schema:
  284. type: dict
  285. attrs:
  286. - variable: destination
  287. label: "Destination"
  288. schema:
  289. type: ipaddr
  290. cidr: true
  291. required: true
  292. - variable: gateway
  293. label: "Gateway"
  294. schema:
  295. type: ipaddr
  296. cidr: false
  297. required: true
  298. - variable: dnsPolicy
  299. label: "DNS Policy"
  300. 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."
  301. group: "Networking"
  302. schema:
  303. type: string
  304. default: "Default"
  305. enum:
  306. - value: "Default"
  307. description: "Use Default DNS Policy where Pod will inherit the name resolution configuration from the node."
  308. - value: "ClusterFirst"
  309. description: >
  310. "Kubernetes internal DNS will be prioritised and resolved first. If the domain does not resolve with internal
  311. kubernetes DNS, the DNS query will be forwarded to the upstream nameserver inherited from the node. This is
  312. useful if the workload needs to access other service(s)/workload(s) using kubernetes internal DNS."
  313. - value: "ClusterFirstWithHostNet"
  314. description: "For Pods running with hostNetwork and wanting to prioritise internal kubernetes DNS should make use of this policy."
  315. - value: "None"
  316. description: "Ignore DNS settings from the Kubernetes cluster"
  317. - variable: dnsConfig
  318. label: "DNS Configuration"
  319. group: "Networking"
  320. description: "Specify custom DNS configuration which will be applied to the pod"
  321. schema:
  322. type: dict
  323. attrs:
  324. - variable: nameservers
  325. label: "Nameservers"
  326. schema:
  327. default: []
  328. type: list
  329. items:
  330. - variable: nameserver
  331. label: "Nameserver"
  332. schema:
  333. type: string
  334. - variable: searches
  335. label: "Searches"
  336. schema:
  337. default: []
  338. type: list
  339. items:
  340. - variable: search
  341. label: "Search Entry"
  342. schema:
  343. type: string
  344. - variable: options
  345. label: "DNS Options"
  346. schema:
  347. type: list
  348. items:
  349. - variable: optionsEntry
  350. label: "Option Entry Configuration"
  351. schema:
  352. type: dict
  353. attrs:
  354. - variable: name
  355. label: "Option Name"
  356. schema:
  357. type: string
  358. required: true
  359. - variable: value
  360. label: "Option Value"
  361. schema:
  362. type: string
  363. required: true
  364. - variable: hostNetwork
  365. label: "Provide access to node network namespace for the workload"
  366. group: "Networking"
  367. schema:
  368. type: boolean
  369. default: false
  370. show_if: [["externalInterfaces", "=", []]]
  371. - variable: hostPortsList
  372. label: "Specify host ports for the workload"
  373. description: "Only use host ports if scaling of a workload is not required"
  374. group: "Networking"
  375. schema:
  376. show_if: [["updateStrategy", "=", "Recreate"]]
  377. type: list
  378. hidden: true
  379. items:
  380. - variable: hostPortConfiguration
  381. label: "Host Port Configuration"
  382. schema:
  383. type: dict
  384. attrs:
  385. - variable: containerPort
  386. label: "Container Port"
  387. schema:
  388. type: string
  389. required: true
  390. - variable: hostPort
  391. label: "Host Port"
  392. schema:
  393. type: string
  394. required: true
  395. - variable: portForwardingList
  396. label: "Specify Node ports to forward to workload"
  397. group: "Port Forwarding"
  398. description: "Specify ports of node and workload to forward traffic from node port to workload port"
  399. schema:
  400. type: list
  401. show_if: [["hostNetwork", "=", false]]
  402. items:
  403. - variable: portForwarding
  404. label: "Port Forwarding Configuration"
  405. schema:
  406. type: dict
  407. attrs:
  408. - variable: containerPort
  409. label: "Container Port"
  410. schema:
  411. type: int
  412. required: true
  413. - variable: nodePort
  414. label: "Node Port"
  415. schema:
  416. type: int
  417. required: true
  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"