diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2023-02-16 21:32:22 -0800 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-02-17 15:34:51 -0500 |
| commit | e43d530e992c2b4880262d86dda9390c1b2649ee (patch) | |
| tree | 2d66bdb09186cc78a5baa2098d7a11cdb8331dd9 | |
| parent | 3a8e830db2dcf98033c8bb4b828d0ab7a055f6e8 (diff) | |
| download | meta-virtualization-e43d530e992c2b4880262d86dda9390c1b2649ee.tar.gz | |
cri-o: update crio.conf to match the current version
The old crio.conf file can cause cri-o start failure. The error
message is as below.
validating runtime config: runtime validation: failed to \
translate monitor fields for runtime runc: cgroupfs manager \
conmon cgroup should be 'pod' or empty
Use new crio.conf file to solve this issue. The file is generated
by 'crio --config="" config --default' command, as indicated in
the old crio.conf file.
With this config file update, the crio.service can now start correctly.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
| -rw-r--r-- | recipes-containers/cri-o/files/crio.conf | 623 |
1 files changed, 525 insertions, 98 deletions
diff --git a/recipes-containers/cri-o/files/crio.conf b/recipes-containers/cri-o/files/crio.conf index 899d255b..84472d88 100644 --- a/recipes-containers/cri-o/files/crio.conf +++ b/recipes-containers/cri-o/files/crio.conf | |||
| @@ -1,146 +1,573 @@ | |||
| 1 | # generated via: crio --config="" config --default | 1 | # generated via: crio --config="" config --default |
| 2 | 2 | ||
| 3 | # The "crio" table contains all of the server options. | 3 | # The CRI-O configuration file specifies all of the available configuration |
| 4 | # options and command-line flags for the crio(8) OCI Kubernetes Container Runtime | ||
| 5 | # daemon, but in a TOML format that can be more easily modified and versioned. | ||
| 6 | # | ||
| 7 | # Please refer to crio.conf(5) for details of all configuration options. | ||
| 8 | |||
| 9 | # CRI-O supports partial configuration reload during runtime, which can be | ||
| 10 | # done by sending SIGHUP to the running process. Currently supported options | ||
| 11 | # are explicitly mentioned with: 'This option supports live configuration | ||
| 12 | # reload'. | ||
| 13 | |||
| 14 | # CRI-O reads its storage defaults from the containers-storage.conf(5) file | ||
| 15 | # located at /etc/containers/storage.conf. Modify this storage configuration if | ||
| 16 | # you want to change the system's defaults. If you want to modify storage just | ||
| 17 | # for CRI-O, you can change the storage configuration options here. | ||
| 4 | [crio] | 18 | [crio] |
| 5 | 19 | ||
| 6 | # root is a path to the "root directory". CRIO stores all of its data, | 20 | # Path to the "root directory". CRI-O stores all of its data, including |
| 7 | # including container images, in this directory. | 21 | # containers images, in this directory. |
| 8 | root = "/var/lib/containers/storage" | 22 | root = "/var/lib/containers/storage" |
| 9 | 23 | ||
| 10 | # run is a path to the "run directory". CRIO stores all of its state | 24 | # Path to the "run directory". CRI-O stores all of its state in this directory. |
| 11 | # in this directory. | 25 | runroot = "/run/containers/storage" |
| 12 | runroot = "/var/run/containers/storage" | ||
| 13 | 26 | ||
| 14 | # storage_driver select which storage driver is used to manage storage | 27 | # Storage driver used to manage the storage of images and containers. Please |
| 15 | # of images and containers. | 28 | # refer to containers-storage.conf(5) to see all available storage drivers. |
| 16 | storage_driver = "" | 29 | storage_driver = "" |
| 17 | 30 | ||
| 18 | # storage_option is used to pass an option to the storage driver. | 31 | # List to pass options to the storage driver. Please refer to |
| 32 | # containers-storage.conf(5) to see all available storage options. | ||
| 19 | storage_option = [ | 33 | storage_option = [ |
| 20 | ] | 34 | ] |
| 21 | 35 | ||
| 22 | # The "crio.api" table contains settings for the kubelet/gRPC | 36 | # The default log directory where all logs will go unless directly specified by |
| 23 | # interface (which is also used by crioctl). | 37 | # the kubelet. The log directory specified must be an absolute directory. |
| 38 | log_dir = "/var/log/crio/pods" | ||
| 39 | |||
| 40 | # Location for CRI-O to lay down the temporary version file. | ||
| 41 | # It is used to check if crio wipe should wipe containers, which should | ||
| 42 | # always happen on a node reboot | ||
| 43 | version_file = "/var/run/crio/version" | ||
| 44 | |||
| 45 | # Location for CRI-O to lay down the persistent version file. | ||
| 46 | # It is used to check if crio wipe should wipe images, which should | ||
| 47 | # only happen when CRI-O has been upgraded | ||
| 48 | version_file_persist = "" | ||
| 49 | |||
| 50 | # InternalWipe is whether CRI-O should wipe containers and images after a reboot when the server starts. | ||
| 51 | # If set to false, one must use the external command 'crio wipe' to wipe the containers and images in these situations. | ||
| 52 | internal_wipe = true | ||
| 53 | |||
| 54 | # Location for CRI-O to lay down the clean shutdown file. | ||
| 55 | # It is used to check whether crio had time to sync before shutting down. | ||
| 56 | # If not found, crio wipe will clear the storage directory. | ||
| 57 | clean_shutdown_file = "/var/lib/crio/clean.shutdown" | ||
| 58 | |||
| 59 | # The crio.api table contains settings for the kubelet/gRPC interface. | ||
| 24 | [crio.api] | 60 | [crio.api] |
| 25 | 61 | ||
| 26 | # listen is the path to the AF_LOCAL socket on which crio will listen. | 62 | # Path to AF_LOCAL socket on which CRI-O will listen. |
| 27 | listen = "/var/run/crio/crio.sock" | 63 | listen = "/var/run/crio/crio.sock" |
| 28 | 64 | ||
| 29 | # stream_address is the IP address on which the stream server will listen | 65 | # IP address on which the stream server will listen. |
| 30 | stream_address = "" | 66 | stream_address = "127.0.0.1" |
| 67 | |||
| 68 | # The port on which the stream server will listen. If the port is set to "0", then | ||
| 69 | # CRI-O will allocate a random free port number. | ||
| 70 | stream_port = "0" | ||
| 71 | |||
| 72 | # Enable encrypted TLS transport of the stream server. | ||
| 73 | stream_enable_tls = false | ||
| 74 | |||
| 75 | # Length of time until open streams terminate due to lack of activity | ||
| 76 | stream_idle_timeout = "" | ||
| 31 | 77 | ||
| 32 | # stream_port is the port on which the stream server will listen | 78 | # Path to the x509 certificate file used to serve the encrypted stream. This |
| 33 | stream_port = "10010" | 79 | # file can change, and CRI-O will automatically pick up the changes within 5 |
| 80 | # minutes. | ||
| 81 | stream_tls_cert = "" | ||
| 34 | 82 | ||
| 35 | # file_locking is whether file-based locking will be used instead of | 83 | # Path to the key file used to serve the encrypted stream. This file can |
| 36 | # in-memory locking | 84 | # change and CRI-O will automatically pick up the changes within 5 minutes. |
| 37 | file_locking = true | 85 | stream_tls_key = "" |
| 38 | 86 | ||
| 39 | # The "crio.runtime" table contains settings pertaining to the OCI | 87 | # Path to the x509 CA(s) file used to verify and authenticate client |
| 40 | # runtime used and options for how to set up and manage the OCI runtime. | 88 | # communication with the encrypted stream. This file can change and CRI-O will |
| 89 | # automatically pick up the changes within 5 minutes. | ||
| 90 | stream_tls_ca = "" | ||
| 91 | |||
| 92 | # Maximum grpc send message size in bytes. If not set or <=0, then CRI-O will default to 16 * 1024 * 1024. | ||
| 93 | grpc_max_send_msg_size = 83886080 | ||
| 94 | |||
| 95 | # Maximum grpc receive message size. If not set or <= 0, then CRI-O will default to 16 * 1024 * 1024. | ||
| 96 | grpc_max_recv_msg_size = 83886080 | ||
| 97 | |||
| 98 | # The crio.runtime table contains settings pertaining to the OCI runtime used | ||
| 99 | # and options for how to set up and manage the OCI runtime. | ||
| 41 | [crio.runtime] | 100 | [crio.runtime] |
| 42 | 101 | ||
| 43 | # runtime is the OCI compatible runtime used for trusted container workloads. | 102 | # A list of ulimits to be set in containers by default, specified as |
| 44 | # This is a mandatory setting as this runtime will be the default one | 103 | # "<ulimit name>=<soft limit>:<hard limit>", for example: |
| 45 | # and will also be used for untrusted container workloads if | 104 | # "nofile=1024:2048" |
| 46 | # runtime_untrusted_workload is not set. | 105 | # If nothing is set here, settings will be inherited from the CRI-O daemon |
| 47 | runtime = "/usr/bin/runc" | 106 | default_ulimits = [ |
| 48 | 107 | ] | |
| 49 | # runtime_untrusted_workload is the OCI compatible runtime used for untrusted | 108 | |
| 50 | # container workloads. This is an optional setting, except if | 109 | # If true, the runtime will not use pivot_root, but instead use MS_MOVE. |
| 51 | # default_container_trust is set to "untrusted". | 110 | no_pivot = false |
| 52 | runtime_untrusted_workload = "" | 111 | |
| 53 | 112 | # decryption_keys_path is the path where the keys required for | |
| 54 | # default_workload_trust is the default level of trust crio puts in container | 113 | # image decryption are stored. This option supports live configuration reload. |
| 55 | # workloads. It can either be "trusted" or "untrusted", and the default | 114 | decryption_keys_path = "/etc/crio/keys/" |
| 56 | # is "trusted". | 115 | |
| 57 | # Containers can be run through different container runtimes, depending on | 116 | # Path to the conmon binary, used for monitoring the OCI runtime. |
| 58 | # the trust hints we receive from kubelet: | 117 | # Will be searched for using $PATH if empty. |
| 59 | # - If kubelet tags a container workload as untrusted, crio will try first to | 118 | # This option is currently deprecated, and will be replaced with RuntimeHandler.MonitorEnv. |
| 60 | # run it through the untrusted container workload runtime. If it is not set, | 119 | conmon = "" |
| 61 | # crio will use the trusted runtime. | 120 | |
| 62 | # - If kubelet does not provide any information about the container workload trust | 121 | # Cgroup setting for conmon |
| 63 | # level, the selected runtime will depend on the default_container_trust setting. | 122 | # This option is currently deprecated, and will be replaced with RuntimeHandler.MonitorCgroup. |
| 64 | # If it is set to "untrusted", then all containers except for the host privileged | 123 | conmon_cgroup = "" |
| 65 | # ones, will be run by the runtime_untrusted_workload runtime. Host privileged | 124 | |
| 66 | # containers are by definition trusted and will always use the trusted container | 125 | # Environment variable list for the conmon process, used for passing necessary |
| 67 | # runtime. If default_container_trust is set to "trusted", crio will use the trusted | 126 | # environment variables to conmon or the runtime. |
| 68 | # container runtime for all containers. | 127 | # This option is currently deprecated, and will be replaced with RuntimeHandler.MonitorEnv. |
| 69 | default_workload_trust = "trusted" | ||
| 70 | |||
| 71 | # conmon is the path to conmon binary, used for managing the runtime. | ||
| 72 | conmon = "/usr/bin/conmon" | ||
| 73 | |||
| 74 | # conmon_env is the environment variable list for conmon process, | ||
| 75 | # used for passing necessary environment variable to conmon or runtime. | ||
| 76 | conmon_env = [ | 128 | conmon_env = [ |
| 77 | "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | ||
| 78 | ] | 129 | ] |
| 79 | 130 | ||
| 80 | # selinux indicates whether or not SELinux will be used for pod | 131 | # Additional environment variables to set for all the |
| 81 | # separation on the host. If you enable this flag, SELinux must be running | 132 | # containers. These are overridden if set in the |
| 82 | # on the host. | 133 | # container image spec or in the container runtime configuration. |
| 83 | selinux = false | 134 | default_env = [ |
| 135 | ] | ||
| 84 | 136 | ||
| 85 | # seccomp_profile is the seccomp json profile path which is used as the | 137 | # If true, SELinux will be used for pod separation on the host. |
| 86 | # default for the runtime. | 138 | selinux = false |
| 87 | seccomp_profile = "/etc/crio/seccomp.json" | ||
| 88 | 139 | ||
| 89 | # apparmor_profile is the apparmor profile name which is used as the | 140 | # Path to the seccomp.json profile which is used as the default seccomp profile |
| 90 | # default for the runtime. | 141 | # for the runtime. If not specified, then the internal default seccomp profile |
| 142 | # will be used. This option supports live configuration reload. | ||
| 143 | seccomp_profile = "" | ||
| 144 | |||
| 145 | # Changes the meaning of an empty seccomp profile. By default | ||
| 146 | # (and according to CRI spec), an empty profile means unconfined. | ||
| 147 | # This option tells CRI-O to treat an empty profile as the default profile, | ||
| 148 | # which might increase security. | ||
| 149 | seccomp_use_default_when_empty = true | ||
| 150 | |||
| 151 | # Used to change the name of the default AppArmor profile of CRI-O. The default | ||
| 152 | # profile name is "crio-default". This profile only takes effect if the user | ||
| 153 | # does not specify a profile via the Kubernetes Pod's metadata annotation. If | ||
| 154 | # the profile is set to "unconfined", then this equals to disabling AppArmor. | ||
| 155 | # This option supports live configuration reload. | ||
| 91 | apparmor_profile = "crio-default" | 156 | apparmor_profile = "crio-default" |
| 92 | 157 | ||
| 93 | # cgroup_manager is the cgroup management implementation to be used | 158 | # Path to the blockio class configuration file for configuring |
| 94 | # for the runtime. | 159 | # the cgroup blockio controller. |
| 95 | cgroup_manager = "cgroupfs" | 160 | blockio_config_file = "" |
| 161 | |||
| 162 | # Used to change irqbalance service config file path which is used for configuring | ||
| 163 | # irqbalance daemon. | ||
| 164 | irqbalance_config_file = "/etc/sysconfig/irqbalance" | ||
| 165 | |||
| 166 | # Path to the RDT configuration file for configuring the resctrl pseudo-filesystem. | ||
| 167 | # This option supports live configuration reload. | ||
| 168 | rdt_config_file = "" | ||
| 169 | |||
| 170 | # Cgroup management implementation used for the runtime. | ||
| 171 | cgroup_manager = "systemd" | ||
| 172 | |||
| 173 | # Specify whether the image pull must be performed in a separate cgroup. | ||
| 174 | separate_pull_cgroup = "" | ||
| 175 | |||
| 176 | # List of default capabilities for containers. If it is empty or commented out, | ||
| 177 | # only the capabilities defined in the containers json file by the user/kube | ||
| 178 | # will be added. | ||
| 179 | default_capabilities = [ | ||
| 180 | "CHOWN", | ||
| 181 | "DAC_OVERRIDE", | ||
| 182 | "FSETID", | ||
| 183 | "FOWNER", | ||
| 184 | "SETGID", | ||
| 185 | "SETUID", | ||
| 186 | "SETPCAP", | ||
| 187 | "NET_BIND_SERVICE", | ||
| 188 | "KILL", | ||
| 189 | ] | ||
| 96 | 190 | ||
| 97 | # hooks_dir_path is the oci hooks directory for automatically executed hooks | 191 | # List of default sysctls. If it is empty or commented out, only the sysctls |
| 98 | hooks_dir_path = "/usr/share/containers/oci/hooks.d" | 192 | # defined in the container json file by the user/kube will be added. |
| 193 | default_sysctls = [ | ||
| 194 | ] | ||
| 99 | 195 | ||
| 100 | # pids_limit is the number of processes allowed in a container | 196 | # List of devices on the host that a |
| 101 | pids_limit = 1024 | 197 | # user can specify with the "io.kubernetes.cri-o.Devices" allowed annotation. |
| 198 | allowed_devices = [ | ||
| 199 | "/dev/fuse", | ||
| 200 | ] | ||
| 201 | |||
| 202 | # List of additional devices. specified as | ||
| 203 | # "<device-on-host>:<device-on-container>:<permissions>", for example: "--device=/dev/sdc:/dev/xvdc:rwm". | ||
| 204 | # If it is empty or commented out, only the devices | ||
| 205 | # defined in the container json file by the user/kube will be added. | ||
| 206 | additional_devices = [ | ||
| 207 | ] | ||
| 102 | 208 | ||
| 103 | # The "crio.image" table contains settings pertaining to the | 209 | # List of directories to scan for CDI Spec files. |
| 104 | # management of OCI images. | 210 | cdi_spec_dirs = [ |
| 211 | "/etc/cdi", | ||
| 212 | "/var/run/cdi", | ||
| 213 | ] | ||
| 214 | |||
| 215 | # Change the default behavior of setting container devices uid/gid from CRI's | ||
| 216 | # SecurityContext (RunAsUser/RunAsGroup) instead of taking host's uid/gid. | ||
| 217 | # Defaults to false. | ||
| 218 | device_ownership_from_security_context = false | ||
| 219 | |||
| 220 | # Path to OCI hooks directories for automatically executed hooks. If one of the | ||
| 221 | # directories does not exist, then CRI-O will automatically skip them. | ||
| 222 | hooks_dir = [ | ||
| 223 | "/usr/share/containers/oci/hooks.d", | ||
| 224 | ] | ||
| 225 | |||
| 226 | # Path to the file specifying the defaults mounts for each container. The | ||
| 227 | # format of the config is /SRC:/DST, one mount per line. Notice that CRI-O reads | ||
| 228 | # its default mounts from the following two files: | ||
| 229 | # | ||
| 230 | # 1) /etc/containers/mounts.conf (i.e., default_mounts_file): This is the | ||
| 231 | # override file, where users can either add in their own default mounts, or | ||
| 232 | # override the default mounts shipped with the package. | ||
| 233 | # | ||
| 234 | # 2) /usr/share/containers/mounts.conf: This is the default file read for | ||
| 235 | # mounts. If you want CRI-O to read from a different, specific mounts file, | ||
| 236 | # you can change the default_mounts_file. Note, if this is done, CRI-O will | ||
| 237 | # only add mounts it finds in this file. | ||
| 238 | # | ||
| 239 | default_mounts_file = "" | ||
| 240 | |||
| 241 | # Maximum number of processes allowed in a container. | ||
| 242 | # This option is deprecated. The Kubelet flag '--pod-pids-limit' should be used instead. | ||
| 243 | pids_limit = 0 | ||
| 244 | |||
| 245 | # Maximum sized allowed for the container log file. Negative numbers indicate | ||
| 246 | # that no size limit is imposed. If it is positive, it must be >= 8192 to | ||
| 247 | # match/exceed conmon's read buffer. The file is truncated and re-opened so the | ||
| 248 | # limit is never exceeded. This option is deprecated. The Kubelet flag '--container-log-max-size' should be used instead. | ||
| 249 | log_size_max = -1 | ||
| 250 | |||
| 251 | # Whether container output should be logged to journald in addition to the kuberentes log file | ||
| 252 | log_to_journald = false | ||
| 253 | |||
| 254 | # Path to directory in which container exit files are written to by conmon. | ||
| 255 | container_exits_dir = "/var/run/crio/exits" | ||
| 256 | |||
| 257 | # Path to directory for container attach sockets. | ||
| 258 | container_attach_socket_dir = "/var/run/crio" | ||
| 259 | |||
| 260 | # The prefix to use for the source of the bind mounts. | ||
| 261 | bind_mount_prefix = "" | ||
| 262 | |||
| 263 | # If set to true, all containers will run in read-only mode. | ||
| 264 | read_only = false | ||
| 265 | |||
| 266 | # Changes the verbosity of the logs based on the level it is set to. Options | ||
| 267 | # are fatal, panic, error, warn, info, debug and trace. This option supports | ||
| 268 | # live configuration reload. | ||
| 269 | log_level = "info" | ||
| 270 | |||
| 271 | # Filter the log messages by the provided regular expression. | ||
| 272 | # This option supports live configuration reload. | ||
| 273 | log_filter = "" | ||
| 274 | |||
| 275 | # The UID mappings for the user namespace of each container. A range is | ||
| 276 | # specified in the form containerUID:HostUID:Size. Multiple ranges must be | ||
| 277 | # separated by comma. | ||
| 278 | uid_mappings = "" | ||
| 279 | |||
| 280 | # The GID mappings for the user namespace of each container. A range is | ||
| 281 | # specified in the form containerGID:HostGID:Size. Multiple ranges must be | ||
| 282 | # separated by comma. | ||
| 283 | gid_mappings = "" | ||
| 284 | |||
| 285 | # If set, CRI-O will reject any attempt to map host UIDs below this value | ||
| 286 | # into user namespaces. A negative value indicates that no minimum is set, | ||
| 287 | # so specifying mappings will only be allowed for pods that run as UID 0. | ||
| 288 | minimum_mappable_uid = -1 | ||
| 289 | |||
| 290 | # If set, CRI-O will reject any attempt to map host GIDs below this value | ||
| 291 | # into user namespaces. A negative value indicates that no minimum is set, | ||
| 292 | # so specifying mappings will only be allowed for pods that run as UID 0. | ||
| 293 | minimum_mappable_gid = -1 | ||
| 294 | |||
| 295 | # The minimal amount of time in seconds to wait before issuing a timeout | ||
| 296 | # regarding the proper termination of the container. The lowest possible | ||
| 297 | # value is 30s, whereas lower values are not considered by CRI-O. | ||
| 298 | ctr_stop_timeout = 30 | ||
| 299 | |||
| 300 | # drop_infra_ctr determines whether CRI-O drops the infra container | ||
| 301 | # when a pod does not have a private PID namespace, and does not use | ||
| 302 | # a kernel separating runtime (like kata). | ||
| 303 | # It requires manage_ns_lifecycle to be true. | ||
| 304 | drop_infra_ctr = true | ||
| 305 | |||
| 306 | # infra_ctr_cpuset determines what CPUs will be used to run infra containers. | ||
| 307 | # You can use linux CPU list format to specify desired CPUs. | ||
| 308 | # To get better isolation for guaranteed pods, set this parameter to be equal to kubelet reserved-cpus. | ||
| 309 | infra_ctr_cpuset = "" | ||
| 310 | |||
| 311 | # The directory where the state of the managed namespaces gets tracked. | ||
| 312 | # Only used when manage_ns_lifecycle is true. | ||
| 313 | namespaces_dir = "/var/run" | ||
| 314 | |||
| 315 | # pinns_path is the path to find the pinns binary, which is needed to manage namespace lifecycle | ||
| 316 | pinns_path = "" | ||
| 317 | |||
| 318 | # default_runtime is the _name_ of the OCI runtime to be used as the default. | ||
| 319 | # The name is matched against the runtimes map below. If this value is changed, | ||
| 320 | # the corresponding existing entry from the runtimes map below will be ignored. | ||
| 321 | default_runtime = "runc" | ||
| 322 | |||
| 323 | # A list of paths that, when absent from the host, | ||
| 324 | # will cause a container creation to fail (as opposed to the current behavior being created as a directory). | ||
| 325 | # This option is to protect from source locations whose existence as a directory could jepordize the health of the node, and whose | ||
| 326 | # creation as a file is not desired either. | ||
| 327 | # An example is /etc/hostname, which will cause failures on reboot if it's created as a directory, but often doesn't exist because | ||
| 328 | # the hostname is being managed dynamically. | ||
| 329 | absent_mount_sources_to_reject = [ | ||
| 330 | ] | ||
| 331 | |||
| 332 | # The "crio.runtime.runtimes" table defines a list of OCI compatible runtimes. | ||
| 333 | # The runtime to use is picked based on the runtime handler provided by the CRI. | ||
| 334 | # If no runtime handler is provided, the runtime will be picked based on the level | ||
| 335 | # of trust of the workload. Each entry in the table should follow the format: | ||
| 336 | # | ||
| 337 | #[crio.runtime.runtimes.runtime-handler] | ||
| 338 | # runtime_path = "/path/to/the/executable" | ||
| 339 | # runtime_type = "oci" | ||
| 340 | # runtime_root = "/path/to/the/root" | ||
| 341 | # privileged_without_host_devices = false | ||
| 342 | # allowed_annotations = [] | ||
| 343 | # Where: | ||
| 344 | # - runtime-handler: name used to identify the runtime | ||
| 345 | # - runtime_path (optional, string): absolute path to the runtime executable in | ||
| 346 | # the host filesystem. If omitted, the runtime-handler identifier should match | ||
| 347 | # the runtime executable name, and the runtime executable should be placed | ||
| 348 | # in $PATH. | ||
| 349 | # - runtime_type (optional, string): type of runtime, one of: "oci", "vm". If | ||
| 350 | # omitted, an "oci" runtime is assumed. | ||
| 351 | # - runtime_root (optional, string): root directory for storage of containers | ||
| 352 | # state. | ||
| 353 | # - runtime_config_path (optional, string): the path for the runtime configuration | ||
| 354 | # file. This can only be used with when using the VM runtime_type. | ||
| 355 | # - privileged_without_host_devices (optional, bool): an option for restricting | ||
| 356 | # host devices from being passed to privileged containers. | ||
| 357 | # - allowed_annotations (optional, array of strings): an option for specifying | ||
| 358 | # a list of experimental annotations that this runtime handler is allowed to process. | ||
| 359 | # The currently recognized values are: | ||
| 360 | # "io.kubernetes.cri-o.userns-mode" for configuring a user namespace for the pod. | ||
| 361 | # "io.kubernetes.cri-o.cgroup2-mount-hierarchy-rw" for mounting cgroups writably when set to "true". | ||
| 362 | # "io.kubernetes.cri-o.Devices" for configuring devices for the pod. | ||
| 363 | # "io.kubernetes.cri-o.ShmSize" for configuring the size of /dev/shm. | ||
| 364 | # "io.kubernetes.cri-o.UnifiedCgroup.$CTR_NAME" for configuring the cgroup v2 unified block for a container. | ||
| 365 | # "io.containers.trace-syscall" for tracing syscalls via the OCI seccomp BPF hook. | ||
| 366 | # "io.kubernetes.cri.rdt-class" for setting the RDT class of a container | ||
| 367 | # - monitor_exec_cgroup (optional, string): if set to "container", indicates exec probes | ||
| 368 | # should be moved to the container's cgroup | ||
| 369 | |||
| 370 | |||
| 371 | [crio.runtime.runtimes.runc] | ||
| 372 | runtime_path = "" | ||
| 373 | runtime_type = "oci" | ||
| 374 | runtime_root = "/run/runc" | ||
| 375 | runtime_config_path = "" | ||
| 376 | |||
| 377 | |||
| 378 | allowed_annotations = [ | ||
| 379 | "io.containers.trace-syscall", | ||
| 380 | ] | ||
| 381 | |||
| 382 | monitor_path = "" | ||
| 383 | |||
| 384 | monitor_env = [ | ||
| 385 | "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | ||
| 386 | ] | ||
| 387 | |||
| 388 | monitor_cgroup = "system.slice" | ||
| 389 | monitor_exec_cgroup = "" | ||
| 390 | |||
| 391 | |||
| 392 | # crun is a fast and lightweight fully featured OCI runtime and C library for | ||
| 393 | # running containers | ||
| 394 | #[crio.runtime.runtimes.crun] | ||
| 395 | |||
| 396 | # Kata Containers is an OCI runtime, where containers are run inside lightweight | ||
| 397 | # VMs. Kata provides additional isolation towards the host, minimizing the host attack | ||
| 398 | # surface and mitigating the consequences of containers breakout. | ||
| 399 | |||
| 400 | # Kata Containers with the default configured VMM | ||
| 401 | #[crio.runtime.runtimes.kata-runtime] | ||
| 402 | |||
| 403 | # Kata Containers with the QEMU VMM | ||
| 404 | #[crio.runtime.runtimes.kata-qemu] | ||
| 405 | |||
| 406 | # Kata Containers with the Firecracker VMM | ||
| 407 | #[crio.runtime.runtimes.kata-fc] | ||
| 408 | |||
| 409 | # The workloads table defines ways to customize containers with different resources | ||
| 410 | # that work based on annotations, rather than the CRI. | ||
| 411 | # Note, the behavior of this table is EXPERIMENTAL and may change at any time. | ||
| 412 | # Each workload, has a name, activation_annotation, annotation_prefix and set of resources it supports mutating. | ||
| 413 | # The currently supported resources are "cpu" (to configure the cpu shares) and "cpuset" to configure the cpuset. | ||
| 414 | # Each resource can have a default value specified, or be empty. | ||
| 415 | # For a container to opt-into this workload, the pod should be configured with the annotation $activation_annotation (key only, value is ignored). | ||
| 416 | # To customize per-container, an annotation of the form $annotation_prefix.$resource/$ctrName = "value" can be specified | ||
| 417 | # signifying for that resource type to override the default value. | ||
| 418 | # If the annotation_prefix is not present, every container in the pod will be given the default values. | ||
| 419 | # Example: | ||
| 420 | # [crio.runtime.workloads.workload-type] | ||
| 421 | # activation_annotation = "io.crio/workload" | ||
| 422 | # annotation_prefix = "io.crio.workload-type" | ||
| 423 | # [crio.runtime.workloads.workload-type.resources] | ||
| 424 | # cpuset = 0 | ||
| 425 | # cpushares = "0-1" | ||
| 426 | # Where: | ||
| 427 | # The workload name is workload-type. | ||
| 428 | # To specify, the pod must have the "io.crio.workload" annotation (this is a precise string match). | ||
| 429 | # This workload supports setting cpuset and cpu resources. | ||
| 430 | # annotation_prefix is used to customize the different resources. | ||
| 431 | # To configure the cpu shares a container gets in the example above, the pod would have to have the following annotation: | ||
| 432 | # "io.crio.workload-type/$container_name = {"cpushares": "value"}" | ||
| 433 | |||
| 434 | |||
| 435 | # The crio.image table contains settings pertaining to the management of OCI images. | ||
| 436 | # | ||
| 437 | # CRI-O reads its configured registries defaults from the system wide | ||
| 438 | # containers-registries.conf(5) located in /etc/containers/registries.conf. If | ||
| 439 | # you want to modify just CRI-O, you can change the registries configuration in | ||
| 440 | # this file. Otherwise, leave insecure_registries and registries commented out to | ||
| 441 | # use the system's defaults from /etc/containers/registries.conf. | ||
| 105 | [crio.image] | 442 | [crio.image] |
| 106 | 443 | ||
| 107 | # default_transport is the prefix we try prepending to an image name if the | 444 | # Default transport for pulling images from a remote container storage. |
| 108 | # image name as we receive it can't be parsed as a valid source reference | ||
| 109 | default_transport = "docker://" | 445 | default_transport = "docker://" |
| 110 | 446 | ||
| 111 | # pause_image is the image which we use to instantiate infra containers. | 447 | # The path to a file containing credentials necessary for pulling images from |
| 112 | pause_image = "kubernetes/pause" | 448 | # secure registries. The file is similar to that of /var/lib/kubelet/config.json |
| 449 | global_auth_file = "" | ||
| 450 | |||
| 451 | # The image used to instantiate infra containers. | ||
| 452 | # This option supports live configuration reload. | ||
| 453 | pause_image = "registry.k8s.io/pause:3.6" | ||
| 113 | 454 | ||
| 114 | # pause_command is the command to run in a pause_image to have a container just | 455 | # The path to a file containing credentials specific for pulling the pause_image from |
| 115 | # sit there. If the image contains the necessary information, this value need | 456 | # above. The file is similar to that of /var/lib/kubelet/config.json |
| 116 | # not be specified. | 457 | # This option supports live configuration reload. |
| 458 | pause_image_auth_file = "" | ||
| 459 | |||
| 460 | # The command to run to have a container stay in the paused state. | ||
| 461 | # When explicitly set to "", it will fallback to the entrypoint and command | ||
| 462 | # specified in the pause image. When commented out, it will fallback to the | ||
| 463 | # default: "/pause". This option supports live configuration reload. | ||
| 117 | pause_command = "/pause" | 464 | pause_command = "/pause" |
| 118 | 465 | ||
| 119 | # signature_policy is the name of the file which decides what sort of policy we | 466 | # Path to the file which decides what sort of policy we use when deciding |
| 120 | # use when deciding whether or not to trust an image that we've pulled. | 467 | # whether or not to trust an image that we've pulled. It is not recommended that |
| 121 | # Outside of testing situations, it is strongly advised that this be left | 468 | # this option be used, as the default behavior of using the system-wide default |
| 122 | # unspecified so that the default system-wide policy will be used. | 469 | # policy (i.e., /etc/containers/policy.json) is most often preferred. Please |
| 470 | # refer to containers-policy.json(5) for more details. | ||
| 123 | signature_policy = "" | 471 | signature_policy = "" |
| 124 | 472 | ||
| 125 | # image_volumes controls how image volumes are handled. | 473 | # List of registries to skip TLS verification for pulling images. Please |
| 126 | # The valid values are mkdir and ignore. | 474 | # consider configuring the registries via /etc/containers/registries.conf before |
| 127 | image_volumes = "mkdir" | 475 | # changing them here. |
| 128 | |||
| 129 | # insecure_registries is used to skip TLS verification when pulling images. | ||
| 130 | insecure_registries = [ | 476 | insecure_registries = [ |
| 131 | ] | 477 | ] |
| 132 | 478 | ||
| 133 | # registries is used to specify a comma separated list of registries to be used | 479 | # Controls how image volumes are handled. The valid values are mkdir, bind and |
| 134 | # when pulling an unqualified image (e.g. fedora:rawhide). | 480 | # ignore; the latter will ignore volumes entirely. |
| 135 | registries = ['docker.io', 'registry.fedoraproject.org', 'registry.access.redhat.com'] | 481 | image_volumes = "mkdir" |
| 482 | |||
| 483 | # Temporary directory to use for storing big files | ||
| 484 | big_files_temporary_dir = "" | ||
| 136 | 485 | ||
| 137 | # The "crio.network" table contains settings pertaining to the | 486 | # The crio.network table containers settings pertaining to the management of |
| 138 | # management of CNI plugins. | 487 | # CNI plugins. |
| 139 | [crio.network] | 488 | [crio.network] |
| 140 | 489 | ||
| 141 | # network_dir is is where CNI network configuration | 490 | # The default CNI network name to be selected. If not set or "", then |
| 142 | # files are stored. | 491 | # CRI-O will pick-up the first one found in network_dir. |
| 492 | # cni_default_network = "" | ||
| 493 | |||
| 494 | # Path to the directory where CNI configuration files are located. | ||
| 143 | network_dir = "/etc/cni/net.d/" | 495 | network_dir = "/etc/cni/net.d/" |
| 144 | 496 | ||
| 145 | # plugin_dir is is where CNI plugin binaries are stored. | 497 | # Paths to directories where CNI plugin binaries are located. |
| 146 | plugin_dir = "/opt/cni/bin" | 498 | plugin_dirs = [ |
| 499 | "/opt/cni/bin/", | ||
| 500 | ] | ||
| 501 | |||
| 502 | # A necessary configuration for Prometheus based metrics retrieval | ||
| 503 | [crio.metrics] | ||
| 504 | |||
| 505 | # Globally enable or disable metrics support. | ||
| 506 | enable_metrics = false | ||
| 507 | |||
| 508 | # Specify enabled metrics collectors. | ||
| 509 | # Per default all metrics are enabled. | ||
| 510 | # It is possible, to prefix the metrics with "container_runtime_" and "crio_". | ||
| 511 | # For example, the metrics collector "operations" would be treated in the same | ||
| 512 | # way as "crio_operations" and "container_runtime_crio_operations". | ||
| 513 | metrics_collectors = [ | ||
| 514 | "operations", | ||
| 515 | "operations_latency_microseconds_total", | ||
| 516 | "operations_latency_microseconds", | ||
| 517 | "operations_errors", | ||
| 518 | "image_pulls_by_digest", | ||
| 519 | "image_pulls_by_name", | ||
| 520 | "image_pulls_by_name_skipped", | ||
| 521 | "image_pulls_failures", | ||
| 522 | "image_pulls_successes", | ||
| 523 | "image_pulls_layer_size", | ||
| 524 | "image_layer_reuse", | ||
| 525 | "containers_oom_total", | ||
| 526 | "containers_oom", | ||
| 527 | "processes_defunct", | ||
| 528 | "operations_total", | ||
| 529 | "operations_latency_seconds", | ||
| 530 | "operations_latency_seconds_total", | ||
| 531 | "operations_errors_total", | ||
| 532 | "image_pulls_bytes_total", | ||
| 533 | "image_pulls_skipped_bytes_total", | ||
| 534 | "image_pulls_failure_total", | ||
| 535 | "image_pulls_success_total", | ||
| 536 | "image_layer_reuse_total", | ||
| 537 | "containers_oom_count_total", | ||
| 538 | ] | ||
| 539 | # The port on which the metrics server will listen. | ||
| 540 | metrics_port = 9090 | ||
| 541 | |||
| 542 | # Local socket path to bind the metrics server to | ||
| 543 | metrics_socket = "" | ||
| 544 | |||
| 545 | # The certificate for the secure metrics server. | ||
| 546 | # If the certificate is not available on disk, then CRI-O will generate a | ||
| 547 | # self-signed one. CRI-O also watches for changes of this path and reloads the | ||
| 548 | # certificate on any modification event. | ||
| 549 | metrics_cert = "" | ||
| 550 | |||
| 551 | # The certificate key for the secure metrics server. | ||
| 552 | # Behaves in the same way as the metrics_cert. | ||
| 553 | metrics_key = "" | ||
| 554 | |||
| 555 | # A necessary configuration for OpenTelemetry trace data exporting | ||
| 556 | [crio.tracing] | ||
| 557 | |||
| 558 | # Globally enable or disable exporting OpenTelemetry traces. | ||
| 559 | enable_tracing = false | ||
| 560 | |||
| 561 | # Address on which the gRPC trace collector listens on. | ||
| 562 | tracing_endpoint = "0.0.0.0:4317" | ||
| 563 | |||
| 564 | # Number of samples to collect per million spans. | ||
| 565 | tracing_sampling_rate_per_million = 0 | ||
| 566 | |||
| 567 | # Necessary information pertaining to container and pod stats reporting. | ||
| 568 | [crio.stats] | ||
| 569 | |||
| 570 | # The number of seconds between collecting pod and container stats. | ||
| 571 | # If set to 0, the stats are collected on-demand instead. | ||
| 572 | stats_collection_period = 0 | ||
| 573 | |||
