schema.go 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. package config
  2. var schema = `{
  3. "type": "object",
  4. "additionalProperties": false,
  5. "properties": {
  6. "ssh_authorized_keys": {"$ref": "#/definitions/list_of_strings"},
  7. "write_files": {
  8. "type": "array",
  9. "items": {"$ref": "#/definitions/file_config"}
  10. },
  11. "hostname": {"type": "string"},
  12. "mounts": {"type": "array"},
  13. "rancher": {"$ref": "#/definitions/rancher_config"},
  14. "runcmd": {"type": "array"},
  15. "bootcmd": {"type": "array"}
  16. },
  17. "definitions": {
  18. "rancher_config": {
  19. "id": "#/definitions/rancher_config",
  20. "type": "object",
  21. "additionalProperties": false,
  22. "properties": {
  23. "console": {"type": "string"},
  24. "environment": {"type": "object"},
  25. "cloud_init_services": {"type": "object"},
  26. "services": {"type": "object"},
  27. "bootstrap": {"type": "object"},
  28. "autoformat": {"type": "object"},
  29. "bootstrap_docker": {"$ref": "#/definitions/docker_config"},
  30. "cloud_init": {"$ref": "#/definitions/cloud_init_config"},
  31. "debug": {"type": "boolean"},
  32. "rm_usr": {"type": "boolean"},
  33. "no_sharedroot": {"type": "boolean"},
  34. "log": {"type": "boolean"},
  35. "force_console_rebuild": {"type": "boolean"},
  36. "recovery": {"type": "boolean"},
  37. "disable": {"$ref": "#/definitions/list_of_strings"},
  38. "services_include": {"type": "object"},
  39. "modules": {"$ref": "#/definitions/list_of_strings"},
  40. "network": {"$ref": "#/definitions/network_config"},
  41. "repositories": {"type": "object"},
  42. "ssh": {"$ref": "#/definitions/ssh_config"},
  43. "state": {"$ref": "#/definitions/state_config"},
  44. "system_docker": {"$ref": "#/definitions/docker_config"},
  45. "upgrade": {"$ref": "#/definitions/upgrade_config"},
  46. "docker": {"$ref": "#/definitions/docker_config"},
  47. "registry_auths": {"type": "object"},
  48. "defaults": {"$ref": "#/definitions/defaults_config"},
  49. "resize_device": {"type": "string"},
  50. "sysctl": {"type": "object"},
  51. "restart_services": {"type": "array"},
  52. "hypervisor_service": {"type": "boolean"},
  53. "shutdown_timeout": {"type": "integer"},
  54. "preload_wait": {"type": "boolean"}
  55. }
  56. },
  57. "file_config": {
  58. "id": "#/definitions/file_config",
  59. "type": "object",
  60. "additionalProperties": false,
  61. "properties": {
  62. "encoding": {"type": "string"},
  63. "container": {"type": "string"},
  64. "content": {"type": "string"},
  65. "owner": {"type": "string"},
  66. "path": {"type": "string"},
  67. "permissions": {"type": "string"}
  68. }
  69. },
  70. "network_config": {
  71. "id": "#/definitions/network_config",
  72. "type": "object",
  73. "additionalProperties": false,
  74. "properties": {
  75. "pre_cmds": {"$ref": "#/definitions/list_of_strings"},
  76. "dhcp_timeout": {"type": "integer"},
  77. "dns": {"type": "object"},
  78. "interfaces": {"type": "object"},
  79. "post_cmds": {"$ref": "#/definitions/list_of_strings"},
  80. "http_proxy": {"type": "string"},
  81. "https_proxy": {"type": "string"},
  82. "no_proxy": {"type": "string"},
  83. "wifi_networks": {"type": "object"},
  84. "modem_networks": {"type": "object"}
  85. }
  86. },
  87. "upgrade_config": {
  88. "id": "#/definitions/upgrade_config",
  89. "type": "object",
  90. "additionalProperties": false,
  91. "properties": {
  92. "url": {"type": "string"},
  93. "image": {"type": "string"},
  94. "rollback": {"type": "string"},
  95. "policy": {"type": "string"}
  96. }
  97. },
  98. "docker_config": {
  99. "id": "#/definitions/docker_config",
  100. "type": "object",
  101. "additionalProperties": false,
  102. "properties": {
  103. "engine": {"type": "string"},
  104. "tls": {"type": "boolean"},
  105. "tls_args": {"$ref": "#/definitions/list_of_strings"},
  106. "args": {"$ref": "#/definitions/list_of_strings"},
  107. "extra_args": {"$ref": "#/definitions/list_of_strings"},
  108. "server_cert": {"type": "string"},
  109. "server_key": {"type": "string"},
  110. "ca_cert": {"type": "string"},
  111. "ca_key": {"type": "string"},
  112. "environment": {"$ref": "#/definitions/list_of_strings"},
  113. "storage_context": {"type": "string"},
  114. "exec": {"type": ["boolean", "null"]},
  115. "bridge": {"type": "string"},
  116. "bip": {"type": "string"},
  117. "config_file": {"type": "string"},
  118. "containerd": {"type": "string"},
  119. "debug": {"type": ["boolean", "null"]},
  120. "exec_root": {"type": "string"},
  121. "group": {"type": "string"},
  122. "graph": {"type": "string"},
  123. "host": {"type": "array"},
  124. "live_restore": {"type": ["boolean", "null"]},
  125. "log_driver": {"type": "string"},
  126. "log_opts": {"type": "object"},
  127. "pid_file": {"type": "string"},
  128. "registry_mirror": {"type": "string"},
  129. "restart": {"type": ["boolean", "null"]},
  130. "selinux_enabled": {"type": ["boolean", "null"]},
  131. "storage_driver": {"type": "string"},
  132. "userland_proxy": {"type": ["boolean", "null"]},
  133. "insecure_registry": {"$ref": "#/definitions/list_of_strings"}
  134. }
  135. },
  136. "ssh_config": {
  137. "id": "#/definitions/ssh_config",
  138. "type": "object",
  139. "additionalProperties": false,
  140. "properties": {
  141. "keys": {"type": "object"},
  142. "daemon": {"type": "boolean"},
  143. "port": {"type": "integer"},
  144. "listen_address": {"type": "string"}
  145. }
  146. },
  147. "state_config": {
  148. "id": "#/definitions/state_config",
  149. "type": "object",
  150. "additionalProperties": false,
  151. "properties": {
  152. "directory": {"type": "string"},
  153. "fstype": {"type": "string"},
  154. "dev": {"type": "string"},
  155. "wait": {"type": "boolean"},
  156. "required": {"type": "boolean"},
  157. "autoformat": {"$ref": "#/definitions/list_of_strings"},
  158. "mdadm_scan": {"type": "boolean"},
  159. "cryptsetup": {"type": "boolean"},
  160. "lvm_scan": {"type": "boolean"},
  161. "rngd": {"type": "boolean"},
  162. "script": {"type": "string"},
  163. "oem_fstype": {"type": "string"},
  164. "oem_dev": {"type": "string"},
  165. "boot_fstype": {"type": "string"},
  166. "boot_dev": {"type": "string"}
  167. }
  168. },
  169. "cloud_init_config": {
  170. "id": "#/definitions/cloud_init_config",
  171. "type": "object",
  172. "additionalProperties": false,
  173. "properties": {
  174. "datasources": {"$ref": "#/definitions/list_of_strings"}
  175. }
  176. },
  177. "defaults_config": {
  178. "id": "#/definitions/defaults_config",
  179. "type": "object",
  180. "additionalProperties": false,
  181. "properties": {
  182. "hostname": {"type": "string"},
  183. "docker": {"type": "object"},
  184. "network": {"$ref": "#/definitions/network_config"},
  185. "system_docker_logs": {"type": "string"}
  186. }
  187. },
  188. "list_of_strings": {
  189. "type": "array",
  190. "items": {"type": "string"},
  191. "uniqueItems": true
  192. }
  193. }
  194. }
  195. `