schema.go 6.2 KB

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