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