schema.go 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. }
  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. "dns": {"type": "object"},
  77. "interfaces": {"type": "object"},
  78. "post_cmds": {"$ref": "#/definitions/list_of_strings"},
  79. "http_proxy": {"type": "string"},
  80. "https_proxy": {"type": "string"},
  81. "no_proxy": {"type": "string"}
  82. }
  83. },
  84. "upgrade_config": {
  85. "id": "#/definitions/upgrade_config",
  86. "type": "object",
  87. "additionalProperties": false,
  88. "properties": {
  89. "url": {"type": "string"},
  90. "image": {"type": "string"},
  91. "rollback": {"type": "string"}
  92. }
  93. },
  94. "docker_config": {
  95. "id": "#/definitions/docker_config",
  96. "type": "object",
  97. "additionalProperties": false,
  98. "properties": {
  99. "engine": {"type": "string"},
  100. "tls": {"type": "boolean"},
  101. "tls_args": {"$ref": "#/definitions/list_of_strings"},
  102. "args": {"$ref": "#/definitions/list_of_strings"},
  103. "extra_args": {"$ref": "#/definitions/list_of_strings"},
  104. "server_cert": {"type": "string"},
  105. "server_key": {"type": "string"},
  106. "ca_cert": {"type": "string"},
  107. "ca_key": {"type": "string"},
  108. "environment": {"$ref": "#/definitions/list_of_strings"},
  109. "storage_context": {"type": "string"},
  110. "exec": {"type": ["boolean", "null"]},
  111. "bridge": {"type": "string"},
  112. "config_file": {"type": "string"},
  113. "containerd": {"type": "string"},
  114. "debug": {"type": ["boolean", "null"]},
  115. "exec_root": {"type": "string"},
  116. "group": {"type": "string"},
  117. "graph": {"type": "string"},
  118. "host": {"type": "array"},
  119. "live_restore": {"type": ["boolean", "null"]},
  120. "log_driver": {"type": "string"},
  121. "log_opts": {"type": "object"},
  122. "pid_file": {"type": "string"},
  123. "registry_mirror": {"type": "string"},
  124. "restart": {"type": ["boolean", "null"]},
  125. "selinux_enabled": {"type": ["boolean", "null"]},
  126. "storage_driver": {"type": "string"},
  127. "userland_proxy": {"type": ["boolean", "null"]},
  128. "insecure_registry": {"$ref": "#/definitions/list_of_strings"}
  129. }
  130. },
  131. "ssh_config": {
  132. "id": "#/definitions/ssh_config",
  133. "type": "object",
  134. "additionalProperties": false,
  135. "properties": {
  136. "keys": {"type": "object"},
  137. "daemon": {"type": "boolean"}
  138. }
  139. },
  140. "state_config": {
  141. "id": "#/definitions/state_config",
  142. "type": "object",
  143. "additionalProperties": false,
  144. "properties": {
  145. "directory": {"type": "string"},
  146. "fstype": {"type": "string"},
  147. "dev": {"type": "string"},
  148. "wait": {"type": "boolean"},
  149. "required": {"type": "boolean"},
  150. "autoformat": {"$ref": "#/definitions/list_of_strings"},
  151. "mdadm_scan": {"type": "boolean"},
  152. "script": {"type": "string"},
  153. "oem_fstype": {"type": "string"},
  154. "oem_dev": {"type": "string"}
  155. }
  156. },
  157. "cloud_init_config": {
  158. "id": "#/definitions/cloud_init_config",
  159. "type": "object",
  160. "additionalProperties": false,
  161. "properties": {
  162. "datasources": {"$ref": "#/definitions/list_of_strings"}
  163. }
  164. },
  165. "defaults_config": {
  166. "id": "#/definitions/defaults_config",
  167. "type": "object",
  168. "additionalProperties": false,
  169. "properties": {
  170. "hostname": {"type": "string"},
  171. "docker": {"type": "object"},
  172. "network": {"$ref": "#/definitions/network_config"}
  173. }
  174. },
  175. "list_of_strings": {
  176. "type": "array",
  177. "items": {"type": "string"},
  178. "uniqueItems": true
  179. }
  180. }
  181. }
  182. `