You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

389 lines
15 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # The CRI-O configuration file specifies all of the available configuration
  2. # options and command-line flags for the crio(8) OCI Kubernetes Container Runtime
  3. # daemon, but in a TOML format that can be more easily modified and versioned.
  4. #
  5. # Please refer to crio.conf(5) for details of all configuration options.
  6. # CRI-O supports partial configuration reload during runtime, which can be
  7. # done by sending SIGHUP to the running process. Currently supported options
  8. # are explicitly mentioned with: 'This option supports live configuration
  9. # reload'.
  10. # CRI-O reads its storage defaults from the containers-storage.conf(5) file
  11. # located at /etc/containers/storage.conf. Modify this storage configuration if
  12. # you want to change the system's defaults. If you want to modify storage just
  13. # for CRI-O, you can change the storage configuration options here.
  14. [crio]
  15. # Path to the "root directory". CRI-O stores all of its data, including
  16. # containers images, in this directory.
  17. #root = "/var/lib/containers/storage"
  18. # Path to the "run directory". CRI-O stores all of its state in this directory.
  19. #runroot = "/var/run/containers/storage"
  20. # Storage driver used to manage the storage of images and containers. Please
  21. # refer to containers-storage.conf(5) to see all available storage drivers.
  22. {% if crio_storage_driver is defined %}
  23. storage_driver = "{{ crio_storage_driver }}"
  24. {% endif %}
  25. # List to pass options to the storage driver. Please refer to
  26. # containers-storage.conf(5) to see all available storage options.
  27. #storage_option = [
  28. #]
  29. # The default log directory where all logs will go unless directly specified by
  30. # the kubelet. The log directory specified must be an absolute directory.
  31. log_dir = "/var/log/crio/pods"
  32. # Location for CRI-O to lay down the temporary version file.
  33. # It is used to check if crio wipe should wipe containers, which should
  34. # always happen on a node reboot
  35. version_file = "/var/run/crio/version"
  36. # Location for CRI-O to lay down the persistent version file.
  37. # It is used to check if crio wipe should wipe images, which should
  38. # only happen when CRI-O has been upgraded
  39. version_file_persist = "/var/lib/crio/version"
  40. # The crio.api table contains settings for the kubelet/gRPC interface.
  41. [crio.api]
  42. # Path to AF_LOCAL socket on which CRI-O will listen.
  43. listen = "/var/run/crio/crio.sock"
  44. # IP address on which the stream server will listen.
  45. stream_address = "127.0.0.1"
  46. # The port on which the stream server will listen. If the port is set to "0", then
  47. # CRI-O will allocate a random free port number.
  48. stream_port = "{{ crio_stream_port }}"
  49. # Enable encrypted TLS transport of the stream server.
  50. stream_enable_tls = false
  51. # Path to the x509 certificate file used to serve the encrypted stream. This
  52. # file can change, and CRI-O will automatically pick up the changes within 5
  53. # minutes.
  54. stream_tls_cert = ""
  55. # Path to the key file used to serve the encrypted stream. This file can
  56. # change and CRI-O will automatically pick up the changes within 5 minutes.
  57. stream_tls_key = ""
  58. # Path to the x509 CA(s) file used to verify and authenticate client
  59. # communication with the encrypted stream. This file can change and CRI-O will
  60. # automatically pick up the changes within 5 minutes.
  61. stream_tls_ca = ""
  62. # Maximum grpc send message size in bytes. If not set or <=0, then CRI-O will default to 16 * 1024 * 1024.
  63. grpc_max_send_msg_size = 16777216
  64. # Maximum grpc receive message size. If not set or <= 0, then CRI-O will default to 16 * 1024 * 1024.
  65. grpc_max_recv_msg_size = 16777216
  66. # The crio.runtime table contains settings pertaining to the OCI runtime used
  67. # and options for how to set up and manage the OCI runtime.
  68. [crio.runtime]
  69. # A list of ulimits to be set in containers by default, specified as
  70. # "<ulimit name>=<soft limit>:<hard limit>", for example:
  71. # "nofile=1024:2048"
  72. # If nothing is set here, settings will be inherited from the CRI-O daemon
  73. #default_ulimits = [
  74. #]
  75. # default_runtime is the _name_ of the OCI runtime to be used as the default.
  76. # The name is matched against the runtimes map below.
  77. default_runtime = "runc"
  78. # If true, the runtime will not use pivot_root, but instead use MS_MOVE.
  79. no_pivot = false
  80. # decryption_keys_path is the path where the keys required for
  81. # image decryption are stored. This option supports live configuration reload.
  82. decryption_keys_path = "/etc/crio/keys/"
  83. # Path to the conmon binary, used for monitoring the OCI runtime.
  84. # Will be searched for using $PATH if empty.
  85. conmon = "{{ crio_conmon }}"
  86. # Cgroup setting for conmon
  87. {% if crio_cgroup_manager == "cgroupfs" %}
  88. conmon_cgroup = "pod"
  89. {% else %}
  90. conmon_cgroup = "system.slice"
  91. {% endif %}
  92. # Environment variable list for the conmon process, used for passing necessary
  93. # environment variables to conmon or the runtime.
  94. conmon_env = [
  95. "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
  96. ]
  97. # Additional environment variables to set for all the
  98. # containers. These are overridden if set in the
  99. # container image spec or in the container runtime configuration.
  100. default_env = [
  101. ]
  102. # If true, SELinux will be used for pod separation on the host.
  103. selinux = {{ crio_selinux }}
  104. # Path to the seccomp.json profile which is used as the default seccomp profile
  105. # for the runtime. If not specified, then the internal default seccomp profile
  106. # will be used. This option supports live configuration reload.
  107. seccomp_profile = "{{ crio_seccomp_profile }}"
  108. # Used to change the name of the default AppArmor profile of CRI-O. The default
  109. # profile name is "crio-default". This profile only takes effect if the user
  110. # does not specify a profile via the Kubernetes Pod's metadata annotation. If
  111. # the profile is set to "unconfined", then this equals to disabling AppArmor.
  112. # This option supports live configuration reload.
  113. # apparmor_profile = "crio-default"
  114. # Cgroup management implementation used for the runtime.
  115. cgroup_manager = "{{ crio_cgroup_manager }}"
  116. # List of default capabilities for containers. If it is empty or commented out,
  117. # only the capabilities defined in the containers json file by the user/kube
  118. # will be added.
  119. default_capabilities = [
  120. "CHOWN",
  121. "DAC_OVERRIDE",
  122. "FSETID",
  123. "FOWNER",
  124. "NET_RAW",
  125. "SETGID",
  126. "SETUID",
  127. "SETPCAP",
  128. "NET_BIND_SERVICE",
  129. "SYS_CHROOT",
  130. "KILL",
  131. ]
  132. # List of default sysctls. If it is empty or commented out, only the sysctls
  133. # defined in the container json file by the user/kube will be added.
  134. default_sysctls = [
  135. ]
  136. # List of additional devices. specified as
  137. # "<device-on-host>:<device-on-container>:<permissions>", for example: "--device=/dev/sdc:/dev/xvdc:rwm".
  138. #If it is empty or commented out, only the devices
  139. # defined in the container json file by the user/kube will be added.
  140. additional_devices = [
  141. ]
  142. # Path to OCI hooks directories for automatically executed hooks. If one of the
  143. # directories does not exist, then CRI-O will automatically skip them.
  144. hooks_dir = [
  145. "/usr/share/containers/oci/hooks.d",
  146. ]
  147. # List of default mounts for each container. **Deprecated:** this option will
  148. # be removed in future versions in favor of default_mounts_file.
  149. default_mounts = [
  150. ]
  151. # Path to the file specifying the defaults mounts for each container. The
  152. # format of the config is /SRC:/DST, one mount per line. Notice that CRI-O reads
  153. # its default mounts from the following two files:
  154. #
  155. # 1) /etc/containers/mounts.conf (i.e., default_mounts_file): This is the
  156. # override file, where users can either add in their own default mounts, or
  157. # override the default mounts shipped with the package.
  158. #
  159. # 2) /usr/share/containers/mounts.conf: This is the default file read for
  160. # mounts. If you want CRI-O to read from a different, specific mounts file,
  161. # you can change the default_mounts_file. Note, if this is done, CRI-O will
  162. # only add mounts it finds in this file.
  163. #
  164. #default_mounts_file = ""
  165. # Maximum number of processes allowed in a container.
  166. pids_limit = 1024
  167. # Maximum sized allowed for the container log file. Negative numbers indicate
  168. # that no size limit is imposed. If it is positive, it must be >= 8192 to
  169. # match/exceed conmon's read buffer. The file is truncated and re-opened so the
  170. # limit is never exceeded.
  171. log_size_max = -1
  172. # Whether container output should be logged to journald in addition to the kuberentes log file
  173. log_to_journald = false
  174. # Path to directory in which container exit files are written to by conmon.
  175. container_exits_dir = "/var/run/crio/exits"
  176. # Path to directory for container attach sockets.
  177. container_attach_socket_dir = "/var/run/crio"
  178. # The prefix to use for the source of the bind mounts.
  179. bind_mount_prefix = ""
  180. # If set to true, all containers will run in read-only mode.
  181. read_only = false
  182. # Changes the verbosity of the logs based on the level it is set to. Options
  183. # are fatal, panic, error, warn, info, debug and trace. This option supports
  184. # live configuration reload.
  185. log_level = "{{ crio_log_level }}"
  186. # Filter the log messages by the provided regular expression.
  187. # This option supports live configuration reload.
  188. log_filter = ""
  189. # The UID mappings for the user namespace of each container. A range is
  190. # specified in the form containerUID:HostUID:Size. Multiple ranges must be
  191. # separated by comma.
  192. uid_mappings = ""
  193. # The GID mappings for the user namespace of each container. A range is
  194. # specified in the form containerGID:HostGID:Size. Multiple ranges must be
  195. # separated by comma.
  196. gid_mappings = ""
  197. # The minimal amount of time in seconds to wait before issuing a timeout
  198. # regarding the proper termination of the container. The lowest possible
  199. # value is 30s, whereas lower values are not considered by CRI-O.
  200. ctr_stop_timeout = 30
  201. # **DEPRECATED** this option is being replaced by manage_ns_lifecycle, which is described below.
  202. # manage_network_ns_lifecycle = false
  203. # manage_ns_lifecycle determines whether we pin and remove namespaces
  204. # and manage their lifecycle
  205. {% if kata_containers_enabled %}
  206. manage_ns_lifecycle = true
  207. {% else %}
  208. manage_ns_lifecycle = false
  209. {% endif %}
  210. # The directory where the state of the managed namespaces gets tracked.
  211. # Only used when manage_ns_lifecycle is true.
  212. namespaces_dir = "/var/run"
  213. # pinns_path is the path to find the pinns binary, which is needed to manage namespace lifecycle
  214. pinns_path = ""
  215. # The "crio.runtime.runtimes" table defines a list of OCI compatible runtimes.
  216. # The runtime to use is picked based on the runtime_handler provided by the CRI.
  217. # If no runtime_handler is provided, the runtime will be picked based on the level
  218. # of trust of the workload. Each entry in the table should follow the format:
  219. #
  220. #[crio.runtime.runtimes.runtime-handler]
  221. # runtime_path = "/path/to/the/executable"
  222. # runtime_type = "oci"
  223. # runtime_root = "/path/to/the/root"
  224. #
  225. # Where:
  226. # - runtime-handler: name used to identify the runtime
  227. # - runtime_path (optional, string): absolute path to the runtime executable in
  228. # the host filesystem. If omitted, the runtime-handler identifier should match
  229. # the runtime executable name, and the runtime executable should be placed
  230. # in $PATH.
  231. # - runtime_type (optional, string): type of runtime, one of: "oci", "vm". If
  232. # omitted, an "oci" runtime is assumed.
  233. # - runtime_root (optional, string): root directory for storage of containers
  234. # state.
  235. {% for runtime in crio_runtimes %}
  236. [crio.runtime.runtimes.{{ runtime.name }}]
  237. runtime_path = "{{ runtime.path }}"
  238. runtime_type = "{{ runtime.type }}"
  239. runtime_root = "{{ runtime.root }}"
  240. privileged_without_host_devices = {{ runtime.privileged_without_host_devices|default(false)|lower }}
  241. {% endfor %}
  242. # Kata Containers with the Firecracker VMM
  243. #[crio.runtime.runtimes.kata-fc]
  244. # The crio.image table contains settings pertaining to the management of OCI images.
  245. #
  246. # CRI-O reads its configured registries defaults from the system wide
  247. # containers-registries.conf(5) located in /etc/containers/registries.conf. If
  248. # you want to modify just CRI-O, you can change the registries configuration in
  249. # this file. Otherwise, leave insecure_registries and registries commented out to
  250. # use the system's defaults from /etc/containers/registries.conf.
  251. [crio.image]
  252. # Default transport for pulling images from a remote container storage.
  253. default_transport = "docker://"
  254. # The path to a file containing credentials necessary for pulling images from
  255. # secure registries. The file is similar to that of /var/lib/kubelet/config.json
  256. global_auth_file = ""
  257. # The image used to instantiate infra containers.
  258. # This option supports live configuration reload.
  259. pause_image = "{{ crio_pause_image }}"
  260. # The path to a file containing credentials specific for pulling the pause_image from
  261. # above. The file is similar to that of /var/lib/kubelet/config.json
  262. # This option supports live configuration reload.
  263. pause_image_auth_file = ""
  264. # The command to run to have a container stay in the paused state.
  265. # When explicitly set to "", it will fallback to the entrypoint and command
  266. # specified in the pause image. When commented out, it will fallback to the
  267. # default: "/pause". This option supports live configuration reload.
  268. pause_command = "/pause"
  269. # Path to the file which decides what sort of policy we use when deciding
  270. # whether or not to trust an image that we've pulled. It is not recommended that
  271. # this option be used, as the default behavior of using the system-wide default
  272. # policy (i.e., /etc/containers/policy.json) is most often preferred. Please
  273. # refer to containers-policy.json(5) for more details.
  274. signature_policy = "{{ crio_signature_policy }}"
  275. # List of registries to skip TLS verification for pulling images. Please
  276. # consider configuring the registries via /etc/containers/registries.conf before
  277. # changing them here.
  278. insecure_registries = [
  279. {% for insecure_registry in crio_insecure_registries %}
  280. "{{ insecure_registry }}",
  281. {% endfor %}
  282. ]
  283. # Controls how image volumes are handled. The valid values are mkdir, bind and
  284. # ignore; the latter will ignore volumes entirely.
  285. image_volumes = "mkdir"
  286. # List of registries to be used when pulling an unqualified image (e.g.,
  287. # "alpine:latest"). By default, registries is set to "docker.io" for
  288. # compatibility reasons. Depending on your workload and usecase you may add more
  289. # registries (e.g., "quay.io", "registry.fedoraproject.org",
  290. # "registry.opensuse.org", etc.).
  291. registries = [
  292. {% for registry in crio_registries %}
  293. "{{ registry }}",
  294. {% endfor %}
  295. ]
  296. # The crio.network table containers settings pertaining to the management of
  297. # CNI plugins.
  298. [crio.network]
  299. # The default CNI network name to be selected. If not set or "", then
  300. # CRI-O will pick-up the first one found in network_dir.
  301. # cni_default_network = ""
  302. # Path to the directory where CNI configuration files are located.
  303. network_dir = "/etc/cni/net.d/"
  304. # Paths to directories where CNI plugin binaries are located.
  305. plugin_dirs = [
  306. "/opt/cni/bin",
  307. "/usr/libexec/cni",
  308. ]
  309. # A necessary configuration for Prometheus based metrics retrieval
  310. [crio.metrics]
  311. # Globally enable or disable metrics support.
  312. enable_metrics = {{ crio_enable_metrics | bool | lower }}
  313. # The port on which the metrics server will listen.
  314. metrics_port = {{ crio_metrics_port }}