schema.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. "default_network": {"type": "object"},
  42. "repositories": {"type": "object"},
  43. "ssh": {"$ref": "#/definitions/ssh_config"},
  44. "state": {"$ref": "#/definitions/state_config"},
  45. "system_docker": {"$ref": "#/definitions/docker_config"},
  46. "upgrade": {"$ref": "#/definitions/upgrade_config"},
  47. "docker": {"$ref": "#/definitions/docker_config"},
  48. "registry_auths": {"type": "object"},
  49. "defaults": {"$ref": "#/definitions/defaults_config"},
  50. "resize_device": {"type": "string"},
  51. "sysctl": {"type": "object"},
  52. "restart_services": {"type": "array"},
  53. "hypervisor_service": {"type": "boolean"},
  54. "shutdown_timeout": {"type": "integer"},
  55. "preload_wait": {"type": "boolean"}
  56. }
  57. },
  58. "file_config": {
  59. "id": "#/definitions/file_config",
  60. "type": "object",
  61. "additionalProperties": false,
  62. "properties": {
  63. "encoding": {"type": "string"},
  64. "container": {"type": "string"},
  65. "content": {"type": "string"},
  66. "owner": {"type": "string"},
  67. "path": {"type": "string"},
  68. "permissions": {"type": "string"}
  69. }
  70. },
  71. "network_config": {
  72. "id": "#/definitions/network_config",
  73. "type": "object",
  74. "additionalProperties": false,
  75. "properties": {
  76. "pre_cmds": {"$ref": "#/definitions/list_of_strings"},
  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. }
  84. },
  85. "upgrade_config": {
  86. "id": "#/definitions/upgrade_config",
  87. "type": "object",
  88. "additionalProperties": false,
  89. "properties": {
  90. "url": {"type": "string"},
  91. "image": {"type": "string"},
  92. "rollback": {"type": "string"},
  93. "policy": {"type": "string"}
  94. }
  95. },
  96. "docker_config": {
  97. "id": "#/definitions/docker_config",
  98. "type": "object",
  99. "additionalProperties": false,
  100. "properties": {
  101. "engine": {"type": "string"},
  102. "tls": {"type": "boolean"},
  103. "tls_args": {"$ref": "#/definitions/list_of_strings"},
  104. "args": {"$ref": "#/definitions/list_of_strings"},
  105. "extra_args": {"$ref": "#/definitions/list_of_strings"},
  106. "server_cert": {"type": "string"},
  107. "server_key": {"type": "string"},
  108. "ca_cert": {"type": "string"},
  109. "ca_key": {"type": "string"},
  110. "environment": {"$ref": "#/definitions/list_of_strings"},
  111. "storage_context": {"type": "string"},
  112. "exec": {"type": ["boolean", "null"]},
  113. "bridge": {"type": "string"},
  114. "bip": {"type": "string"},
  115. "config_file": {"type": "string"},
  116. "containerd": {"type": "string"},
  117. "debug": {"type": ["boolean", "null"]},
  118. "exec_root": {"type": "string"},
  119. "group": {"type": "string"},
  120. "graph": {"type": "string"},
  121. "host": {"type": "array"},
  122. "live_restore": {"type": ["boolean", "null"]},
  123. "log_driver": {"type": "string"},
  124. "log_opts": {"type": "object"},
  125. "pid_file": {"type": "string"},
  126. "registry_mirror": {"type": "string"},
  127. "restart": {"type": ["boolean", "null"]},
  128. "selinux_enabled": {"type": ["boolean", "null"]},
  129. "storage_driver": {"type": "string"},
  130. "userland_proxy": {"type": ["boolean", "null"]},
  131. "insecure_registry": {"$ref": "#/definitions/list_of_strings"}
  132. }
  133. },
  134. "ssh_config": {
  135. "id": "#/definitions/ssh_config",
  136. "type": "object",
  137. "additionalProperties": false,
  138. "properties": {
  139. "keys": {"type": "object"},
  140. "daemon": {"type": "boolean"},
  141. "port": {"type": "integer"},
  142. "listen_address": {"type": "string"}
  143. }
  144. },
  145. "state_config": {
  146. "id": "#/definitions/state_config",
  147. "type": "object",
  148. "additionalProperties": false,
  149. "properties": {
  150. "directory": {"type": "string"},
  151. "fstype": {"type": "string"},
  152. "dev": {"type": "string"},
  153. "wait": {"type": "boolean"},
  154. "required": {"type": "boolean"},
  155. "autoformat": {"$ref": "#/definitions/list_of_strings"},
  156. "mdadm_scan": {"type": "boolean"},
  157. "rngd": {"type": "boolean"},
  158. "script": {"type": "string"},
  159. "oem_fstype": {"type": "string"},
  160. "oem_dev": {"type": "string"}
  161. }
  162. },
  163. "cloud_init_config": {
  164. "id": "#/definitions/cloud_init_config",
  165. "type": "object",
  166. "additionalProperties": false,
  167. "properties": {
  168. "datasources": {"$ref": "#/definitions/list_of_strings"}
  169. }
  170. },
  171. "defaults_config": {
  172. "id": "#/definitions/defaults_config",
  173. "type": "object",
  174. "additionalProperties": false,
  175. "properties": {
  176. "hostname": {"type": "string"},
  177. "docker": {"type": "object"},
  178. "network": {"$ref": "#/definitions/network_config"},
  179. "system_docker_logs": {"type": "string"}
  180. }
  181. },
  182. "list_of_strings": {
  183. "type": "array",
  184. "items": {"type": "string"},
  185. "uniqueItems": true
  186. }
  187. }
  188. }
  189. `