questions.yaml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  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: "RollingUpdate"
  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 workload"
  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. min: 9000
  419. max: 65535
  420. - variable: protocol
  421. label: "Protocol"
  422. schema:
  423. type: string
  424. default: "TCP"
  425. enum:
  426. - value: "TCP"
  427. description: "TCP Protocol"
  428. - value: "UDP"
  429. description: "UDP Protocol"
  430. # Storage Options
  431. # Host path based volumes
  432. - variable: hostPathVolumes
  433. label: "Host Path Volumes"
  434. group: "Storage"
  435. schema:
  436. type: list
  437. items:
  438. - variable: hostPathConfiguration
  439. label: "Host Path Configuration"
  440. schema:
  441. type: dict
  442. attrs:
  443. - variable: hostPath
  444. label: "Host Path"
  445. schema:
  446. type: hostpath
  447. required: true
  448. - variable: mountPath
  449. label: "Mount Path"
  450. description: "Path where host path will be mounted inside the pod"
  451. schema:
  452. type: path
  453. required: true
  454. - variable: readOnly
  455. label: "Read Only"
  456. schema:
  457. type: boolean
  458. default: false
  459. - variable: emptyDirVolumes
  460. label: "Memory Backed Volumes"
  461. description: "Mount memory based temporary volumes for fast access i.e consuming /dev/shm"
  462. group: "Storage"
  463. schema:
  464. type: list
  465. items:
  466. - variable: emptyDirVolume
  467. label: "Memory Backed Volume"
  468. schema:
  469. type: dict
  470. attrs:
  471. - variable: mountPath
  472. label: "Mount Path"
  473. description: "Path where temporary path will be mounted inside the pod"
  474. schema:
  475. type: path
  476. required: true
  477. # Volumes
  478. - variable: volumes
  479. label: "Volumes"
  480. group: "Storage"
  481. schema:
  482. type: list
  483. items:
  484. - variable: volume
  485. label: "Volume"
  486. schema:
  487. type: dict
  488. $ref:
  489. - "normalize/ixVolume"
  490. attrs:
  491. - variable: mountPath
  492. label: "Mount Path"
  493. description: "Path where the volume will be mounted inside the pod"
  494. schema:
  495. type: path
  496. required: true
  497. - variable: datasetName
  498. label: "Dataset Name"
  499. schema:
  500. type: string
  501. required: true
  502. # Pod Probes
  503. # Liveness Probe
  504. - variable: livenessProbe
  505. label: "Liveness Probe"
  506. description: "Configure Liveness Probe"
  507. group: "Health Check"
  508. schema:
  509. hidden: true
  510. type: dict
  511. default: null
  512. "null": true
  513. attrs:
  514. - variable: command
  515. label: "Liveness command"
  516. description: "Specify a command to determine liveness of pod"
  517. schema:
  518. type: list
  519. required: true
  520. items:
  521. - variable: commandArg
  522. label: "Command Arg"
  523. schema:
  524. type: string
  525. - variable: initialDelaySeconds
  526. label: "Seconds Delay"
  527. description: "Seconds to delay the first liveness probe"
  528. schema:
  529. type: int
  530. default: 5
  531. - variable: periodSeconds
  532. label: "Period Seconds"
  533. description: "Specify number of seconds to run liveness probe"
  534. schema:
  535. type: int
  536. default: 10
  537. # Specify GPU configuration
  538. - variable: gpuConfiguration
  539. label: "GPU Configuration"
  540. group: "Resource Reservation"
  541. schema:
  542. type: dict
  543. $ref:
  544. - "definitions/gpuConfiguration"
  545. attrs: []
  546. - variable: tty
  547. label: "Enable TTY"
  548. description: "Determines whether containers in a pod runs with TTY enabled. By default pod has it disabled."
  549. group: "Workload Details"
  550. schema:
  551. type: boolean
  552. default: false
  553. - variable: stdin
  554. label: "Enable STDIN"
  555. description: "Determines whether containers in a pod runs with stdin enabled. By default pod has it disabled."
  556. group: "Workload Details"
  557. schema:
  558. type: boolean
  559. default: false
  560. - variable: securityContext
  561. label: "Security Context"
  562. group: "Workload Details"
  563. schema:
  564. type: dict
  565. attrs:
  566. - variable: privileged
  567. label: "Privileged Mode"
  568. 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."
  569. schema:
  570. type: boolean
  571. default: false
  572. - variable: capabilities
  573. label: "Capabilities"
  574. description: "With Linux capabilities, you can grant certain privileges to a process without granting all the privileges of the root user."
  575. schema:
  576. type: list
  577. items:
  578. - variable: capability
  579. description: "Add Capability"
  580. label: "Add Capability"
  581. schema:
  582. type: string
  583. - variable: enableResourceLimits
  584. label: "Enable Pod resource limits"
  585. group: "Resource Limits"
  586. schema:
  587. type: boolean
  588. default: false
  589. - variable: cpuLimit
  590. label: "CPU Limit"
  591. description: "CPU resource limit allow plain integer values with suffix m(milli) e.g 1000m, 100."
  592. group: "Resource Limits"
  593. schema:
  594. type: string
  595. show_if: [["enableResourceLimits", "=", true]]
  596. valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)"
  597. default: "4000m"
  598. - variable: memLimit
  599. label: "Memory Limit"
  600. group: "Resource Limits"
  601. 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"
  602. schema:
  603. type: string
  604. show_if: [["enableResourceLimits", "=", true]]
  605. valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
  606. default: "8Gi"