<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OPSaid – 容器运行时</title><link>https://opsaid.net/docs/cloud-native/container-runtime/</link><description>Recent content in 容器运行时 on OPSaid</description><generator>Hugo -- gohugo.io</generator><atom:link href="https://opsaid.net/docs/cloud-native/container-runtime/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: Containerd</title><link>https://opsaid.net/docs/cloud-native/container-runtime/containerd/</link><pubDate>Sun, 22 May 2022 15:05:21 +0800</pubDate><guid>https://opsaid.net/docs/cloud-native/container-runtime/containerd/</guid><description>
&lt;h2 id="安装部署">安装部署&lt;/h2>
&lt;p>在githbub官方地址：https://github.com/containerd/containerd/releases，选择需要的版本下载。&lt;/p>
&lt;blockquote>
&lt;p>containerd-{{ containerd_version }}、cri-containerd-{{ containerd_version }}
有以上两种二进制包，&amp;ldquo;cri_containerd&amp;quot;区别于&amp;quot;containerd-&amp;quot;，在于它集合了&amp;quot;runc&amp;quot;等工具。
&amp;rdquo;{{ containerd_version }}&amp;ldquo;是containerd版本，以下均以&amp;quot;1.5.11&amp;quot;为示例。&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>下载二进制&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>https://github.com/containerd/containerd/releases/download/v&lt;span style="color:#ce5c00;font-weight:bold">{{&lt;/span> containerd_version &lt;span style="color:#ce5c00;font-weight:bold">}}&lt;/span>/cri-containerd-cni-&lt;span style="color:#ce5c00;font-weight:bold">{{&lt;/span> containerd_version &lt;span style="color:#ce5c00;font-weight:bold">}}&lt;/span>-linux-amd64.tar.gz
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>解压部署&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>tar xzvf cri-containerd-cni-&lt;span style="color:#ce5c00;font-weight:bold">{{&lt;/span> containerd_version &lt;span style="color:#ce5c00;font-weight:bold">}}&lt;/span>-linux-amd64.tar.gz /
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>解压&amp;rdquo;/&amp;ldquo;目录，二进制路径“/usr/local/bin&amp;rdquo;&lt;/p>
&lt;ul>
&lt;li>&amp;ldquo;containerd-&lt;em>&amp;ldquo;与&amp;quot;cri-containerd-&lt;/em>&amp;ldquo;安装包内容&lt;/li>
&lt;/ul>
&lt;p>&amp;ldquo;containerd-*&amp;rdquo;&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>bin/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bin/containerd-shim-runc-v2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bin/containerd-shim
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bin/ctr
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bin/containerd-shim-runc-v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>bin/containerd
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&amp;ldquo;cri-containerd-*&amp;rdquo;&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>etc/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/cni/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/cni/net.d/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/cni/net.d/10-containerd-net.conflist
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/systemd/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/systemd/system/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/systemd/system/containerd.service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>etc/crictl.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/containerd-shim-runc-v2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/containerd-shim
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/crictl
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/ctr
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/containerd-shim-runc-v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/containerd
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/ctd-decoder
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/critest
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/bin/containerd-stress
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/sbin/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>usr/local/sbin/runc
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/tuning
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/vrf
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/flannel
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/loopback
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/portmap
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/ptp
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/ipvlan
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/host-device
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/macvlan
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/host-local
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/firewall
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/bandwidth
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/sbr
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/vlan
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/static
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/bridge
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/cni/bin/dhcp
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/version
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/cni.template
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/configure.sh
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/env
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/cloud-init/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/cloud-init/master.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>opt/containerd/cluster/gce/cloud-init/node.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="示例配置">示例配置&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">disabled_plugins&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.snapshotter.v1.aufs&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.snapshotter.v1.btrfs&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.snapshotter.v1.devmapper&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.snapshotter.v1.native&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.snapshotter.v1.zfs&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">imports&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">oom_score&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">plugin_dir&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/data/containerd/plugins&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">required_plugins&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">root&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/data/containerd&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">state&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/run/containerd&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">version&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>cgroup&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">path&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>debug&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">address&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/run/containerd/debug.sock&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">format&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">gid&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">level&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">uid&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>grpc&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">address&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/var/run/containerd/containerd.sock&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">gid&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">max_recv_message_size&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16777216&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">max_send_message_size&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16777216&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">tcp_address&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">tcp_tls_cert&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">tcp_tls_key&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">uid&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>metrics&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">address&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;127.0.0.1:1338&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">grpc_histogram&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.gc.v1.scheduler&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">deletion_threshold&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">mutation_threshold&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">100&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">pause_threshold&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> 0.02
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">schedule_delay&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;0s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">startup_delay&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;100ms&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_apparmor&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_cgroup&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_hugetlb_controller&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_proc_mount&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_tcp_service&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">enable_selinux&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">enable_tls_streaming&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">ignore_image_defined_volumes&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">max_concurrent_downloads&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">max_container_log_line_size&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">16384&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">netns_mounts_under_state_dir&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">restrict_oom_score_adj&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">sandbox_image&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;registry.cn-hangzhou.aliyuncs.com/kube-image-repo/pause:3.5-amd64&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">selinux_category_range&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">1024&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">stats_collect_period&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">stream_idle_timeout&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;30m&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">stream_server_address&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;127.0.0.1&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">stream_server_port&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;1339&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">tolerate_missing_hugetlb_controller&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">unset_seccomp_profile&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.cni&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">bin_dir&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/opt/cni/bin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">conf_dir&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/etc/cni/net.d&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">max_conf_num&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.containerd&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">default_runtime_name&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;runc&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_snapshot_annotations&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">discard_unpacked_layers&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">no_pivot&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">snapshotter&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;overlayfs&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.containerd.runtimes&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.containerd.runtimes.runc&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">base_runtime_spec&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">container_annotations&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">pod_annotations&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">privileged_without_host_devices&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">runtime_type&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.runc.v2&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.containerd.runtimes.runc.options&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">SystemdCgroup&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.image_decryption&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">key_model&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;node&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.registry&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">config_path&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/etc/containerd/certs.d&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.internal.v1.opt&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">path&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/opt/containerd&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.internal.v1.restart&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">interval&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;10s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.metadata.v1.bolt&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">content_sharing_policy&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;shared&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.monitor.v1.cgroups&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">no_prometheus&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.runtime.v2.task&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">platforms&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;linux/amd64&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.service.v1.diff-service&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">default&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;walking&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.snapshotter.v1.overlayfs&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">root_path&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>proxy_plugins&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>stream_processors&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>stream_processors.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.ocicrypt.decoder.v1.tar&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">accepts&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;application/vnd.oci.image.layer.v1.tar+encrypted&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">args&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;--decryption-keys-path&amp;#34;&lt;/span>, &lt;span style="color:#4e9a06">&amp;#34;/etc/containerd/ocicrypt/keys&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">env&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;OCICRYPT_KEYPROVIDER_CONFIG=/etc/containerd/ocicrypt/ocicrypt_keyprovider.conf&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">path&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;ctd-decoder&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">returns&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oci.image.layer.v1.tar&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>stream_processors.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.ocicrypt.decoder.v1.tar.gzip&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">accepts&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;application/vnd.oci.image.layer.v1.tar+gzip+encrypted&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">args&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;--decryption-keys-path&amp;#34;&lt;/span>, &lt;span style="color:#4e9a06">&amp;#34;/etc/containerd/ocicrypt/keys&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">env&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;OCICRYPT_KEYPROVIDER_CONFIG=/etc/containerd/ocicrypt/ocicrypt_keyprovider.conf&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">path&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;ctd-decoder&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">returns&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;application/vnd.oci.image.layer.v1.tar+gzip&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>timeouts&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.timeout.shim.cleanup&amp;#34;&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;5s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.timeout.shim.load&amp;#34;&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;5s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.timeout.shim.shutdown&amp;#34;&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;3s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.timeout.task.state&amp;#34;&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;2s&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>ttrpc&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">address&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/run/containerd/containerd.sock.ttrpc&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">gid&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">uid&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="配置数据结构">配置数据结构&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>github.com/containerd/containerd/services/server/config/config.go
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;pre tabindex="0">&lt;code>// 对应 &amp;#34;/etc/containerd/config.toml&amp;#34; 配置的数据结构
type Config struct {
// 配置文件版本，使用版本2
Version int `toml:&amp;#34;version&amp;#34;`
// 用于保存持久化数据的目录,包括content,snapshot,metadata和runtime
Root string `toml:&amp;#34;root&amp;#34;`
// 用于存放containerd的临时数据，如：套接字、PID、运行时状态、装入点和其他在重新启动之间不能持久存在的插件数据
State string `toml:&amp;#34;state&amp;#34;`
// TODO; 插件存放路径
PluginDir string `toml:&amp;#34;plugin_dir&amp;#34;`
// 配置containerd grpc服务监听地址、数据接收大小等
GRPC GRPCConfig `toml:&amp;#34;grpc&amp;#34;`
// 一种适用于低内存环境的GRPC
TTRPC TTRPCConfig `toml:&amp;#34;ttrpc&amp;#34;`
// 开启pprof，配合 ctr pprof 使用
Debug Debug `toml:&amp;#34;debug&amp;#34;`
// 开启 /v1/metrics 接口
Metrics MetricsConfig `toml:&amp;#34;metrics&amp;#34;`
// 禁用某些插件，启动时不做初始化
DisabledPlugins []string `toml:&amp;#34;disabled_plugins&amp;#34;`
// 必须加载成功的插件
RequiredPlugins []string `toml:&amp;#34;required_plugins&amp;#34;`
// 各插件的配置
Plugins map[string]toml.Tree `toml:&amp;#34;plugins&amp;#34;`
// 更改各个容器值 /proc/%d/oom_score_adj
OOMScore int `toml:&amp;#34;oom_score&amp;#34;`
// Cgroup specifies cgroup information for the containerd daemon process
// TODO;
Cgroup CgroupConfig `toml:&amp;#34;cgroup&amp;#34;`
// ProxyPlugins configures plugins which are communicated to over GRPC
// TODO;
ProxyPlugins map[string]ProxyPlugin `toml:&amp;#34;proxy_plugins&amp;#34;`
// 控制shim的几个超时设置
Timeouts map[string]string `toml:&amp;#34;timeouts&amp;#34;`
// 其他路径的配置文件，一同合并至主配置
Imports []string `toml:&amp;#34;imports&amp;#34;`
// TODO；用于镜像解密
// https://github.com/containerd/containerd/blob/main/docs/cri/decryption.md
StreamProcessors map[string]StreamProcessor `toml:&amp;#34;stream_processors&amp;#34;`
}
type GRPCConfig struct {
// 创建grpc在本地unix socket路径地址
Address string `toml:&amp;#34;address&amp;#34;`
// 创建grpc在tcp监听的地址与tls配置
TCPAddress string `toml:&amp;#34;tcp_address&amp;#34;`
TCPTLSCert string `toml:&amp;#34;tcp_tls_cert&amp;#34;`
TCPTLSKey string `toml:&amp;#34;tcp_tls_key&amp;#34;`
// 本地unix socket的用户与组id
UID int `toml:&amp;#34;uid&amp;#34;`
GID int `toml:&amp;#34;gid&amp;#34;`
// 设置grpc服务最大接收与发送字节大小，默认16M
MaxRecvMsgSize int `toml:&amp;#34;max_recv_message_size&amp;#34;`
MaxSendMsgSize int `toml:&amp;#34;max_send_message_size&amp;#34;`
}
type TTRPCConfig struct {
// 同GRPCConfig
Address string `toml:&amp;#34;address&amp;#34;`
UID int `toml:&amp;#34;uid&amp;#34;`
GID int `toml:&amp;#34;gid&amp;#34;`
}
type Debug struct {
// 支持unix socket地址或者ip:port格式
Address string `toml:&amp;#34;address&amp;#34;`
UID int `toml:&amp;#34;uid&amp;#34;`
GID int `toml:&amp;#34;gid&amp;#34;`
Level string `toml:&amp;#34;level&amp;#34;`
// Format represents the logging format
Format string `toml:&amp;#34;format&amp;#34;`
}
type MetricsConfig struct {
// 这里配置的是ip:port地址，非unix socket，默认使用：127.0.0.1:1338
Address string `toml:&amp;#34;address&amp;#34;`
// 开启 grpc_prometheus.EnableHandlingTimeHistogram() 用于评估rpc的请求延迟
GRPCHistogram bool `toml:&amp;#34;grpc_histogram&amp;#34;`
}
// CgroupConfig provides cgroup configuration
type CgroupConfig struct {
Path string `toml:&amp;#34;path&amp;#34;`
}
// ProxyPlugin provides a proxy plugin configuration
type ProxyPlugin struct {
Type string `toml:&amp;#34;type&amp;#34;`
Address string `toml:&amp;#34;address&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h2 id="内置插件">内置插件&lt;/h2>
&lt;p>github.com/containerd/containerd/plugin/plugin.go&lt;/p>
&lt;p>这里 plugins 是一个 map[string]toml.Tree(或map[string]interface{})结构&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>类型&lt;/th>
&lt;th>ID&lt;/th>
&lt;th>代码路径&lt;/th>
&lt;th>用途&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>io.containerd.internal.v1&lt;/td>
&lt;td>restart&lt;/td>
&lt;td>runtime/restart/monitor/monitor.go&lt;/td>
&lt;td>根据&amp;quot;config.interval&amp;quot;配置定时检查存在配置了&amp;quot;restart&amp;quot;标签容器状态是否符合预期&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.internal.v1&lt;/td>
&lt;td>opt&lt;/td>
&lt;td>services/opt/service.go&lt;/td>
&lt;td>创建&amp;quot;config.path&amp;quot;配置路径下&amp;quot;bin&amp;quot;与&amp;quot;lib&amp;quot;目录，同时把&amp;quot;lib&amp;quot;加入&amp;quot;LD_LIBRARY_PATH&amp;quot;变量&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.runtime.v1&lt;/td>
&lt;td>linux&lt;/td>
&lt;td>runtime/v1/linux/runtime.go&lt;/td>
&lt;td>废弃！runtime配置，均使用&amp;quot;runc.v2&amp;quot;版本，由于代码存在依赖，该插件还是不能被禁用&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.runtime.v2&lt;/td>
&lt;td>task&lt;/td>
&lt;td>runtime/v2/manager.go&lt;/td>
&lt;td>TODO; 数据均生成在&amp;rdquo;/run/containerd&amp;quot;路径下&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>cri&lt;/td>
&lt;td>pkg/cri/cri.go&lt;/td>
&lt;td>TODO; 创建cri服务&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>tasks&lt;/td>
&lt;td>services/tasks/service.go&lt;/td>
&lt;td>gRPC接口：api/services/tasks/v1，服务实例：tasks-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>tasks-service&lt;/td>
&lt;td>services/tasks/local.go&lt;/td>
&lt;td>Tasks服务实现&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>snapshots&lt;/td>
&lt;td>services/snapshots/service.go&lt;/td>
&lt;td>gRPC接口：api/services/snapshots/v1，服务实例：snapshots-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>snapshots-service&lt;/td>
&lt;td>services/snapshots/snapshotters.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>images&lt;/td>
&lt;td>services/images/service.go&lt;/td>
&lt;td>gRPC接口：api/services/images/tasks/v1，服务实例：images-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>images-service&lt;/td>
&lt;td>services/images/local.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>healthcheck&lt;/td>
&lt;td>services/healthcheck/service.go&lt;/td>
&lt;td>gRPC接口：google.golang.org/grpc/health&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>content&lt;/td>
&lt;td>services/content/service.go&lt;/td>
&lt;td>gRPC接口：api/services/content/v1，服务实例：snapshots-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>content-service&lt;/td>
&lt;td>services/content/store.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>diff&lt;/td>
&lt;td>services/diff/service.go&lt;/td>
&lt;td>api/services/diff/v1，服务实例：diff-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>diff-service&lt;/td>
&lt;td>services/diff/local.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>introspection&lt;/td>
&lt;td>services/introspection/service.go&lt;/td>
&lt;td>gRPC接口：api/services/introspection/v1，服务实例：introspection-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>introspection-service&lt;/td>
&lt;td>services/introspection/local.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>namespace&lt;/td>
&lt;td>services/namespace/service.go&lt;/td>
&lt;td>gRPC接口：api/services/namespace/v1，服务实例：namespace-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>namespace-service&lt;/td>
&lt;td>services/namespace/local.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>leases&lt;/td>
&lt;td>services/leases/service.go&lt;/td>
&lt;td>gRPC接口：api/services/leases/v1，服务实例：leases-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>leases-service&lt;/td>
&lt;td>services/leases/local.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>version&lt;/td>
&lt;td>services/version/service.go&lt;/td>
&lt;td>gRPC接口：api/services/version/v1，服务实例：leases-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>containers&lt;/td>
&lt;td>services/containers/service.go&lt;/td>
&lt;td>gRPC接口：api/services/containers/v1，服务实例：containers-service&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.service.v1&lt;/td>
&lt;td>containers-service&lt;/td>
&lt;td>services/containers/local.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.grpc.v1&lt;/td>
&lt;td>events&lt;/td>
&lt;td>services/events/service.go&lt;/td>
&lt;td>gRPC接口：api/services/events/v1&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.snapshotter.v1&lt;/td>
&lt;td>btrfs&lt;/td>
&lt;td>snapshots/btrfs/plugin/plugin.go&lt;/td>
&lt;td>TDO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.snapshotter.v1&lt;/td>
&lt;td>native&lt;/td>
&lt;td>snapshots/native/plugin/plugin.go&lt;/td>
&lt;td>TDO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.snapshotter.v1&lt;/td>
&lt;td>windows-lcow&lt;/td>
&lt;td>snapshots/lcow/lcow.go&lt;/td>
&lt;td>TDO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.snapshotter.v1&lt;/td>
&lt;td>devmapper&lt;/td>
&lt;td>snapshots/devmapper/plugin/plugin.go&lt;/td>
&lt;td>TDO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.snapshotter.v1&lt;/td>
&lt;td>windows&lt;/td>
&lt;td>snapshots/windows/windows.go&lt;/td>
&lt;td>TDO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.snapshotter.v1&lt;/td>
&lt;td>overlayfs&lt;/td>
&lt;td>snapshots/overlay/plugin/plugin.go&lt;/td>
&lt;td>TDO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.monitor.v1&lt;/td>
&lt;td>cgroups&lt;/td>
&lt;td>metrics/cgroups/cgroups.go&lt;/td>
&lt;td>容器在cgroup中的性能数据暴露至配置的&amp;quot;Metrics&amp;quot;服务,否则仅有containerd的grpc调用数据&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.differ.v1&lt;/td>
&lt;td>windows-lcow&lt;/td>
&lt;td>diff/lcow/lcow.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.differ.v1&lt;/td>
&lt;td>walking&lt;/td>
&lt;td>diff/walking/plugin/plugin.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.differ.v1&lt;/td>
&lt;td>windows&lt;/td>
&lt;td>diff/windows/windows.go&lt;/td>
&lt;td>TODO&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.metadata.v1&lt;/td>
&lt;td>bolt&lt;/td>
&lt;td>services/server/server.go&lt;/td>
&lt;td>TODO; 管理meta.db文件&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.content.v1&lt;/td>
&lt;td>content&lt;/td>
&lt;td>services/server/server.go&lt;/td>
&lt;td>TODO; 管理本地&amp;quot;ingest&amp;quot;存储&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>io.containerd.gc.v1&lt;/td>
&lt;td>scheduler&lt;/td>
&lt;td>gc/scheduler/scheduler.go&lt;/td>
&lt;td>TODO;&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="iocontainerdinternalv1restart">io.containerd.internal.v1.restart&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config for the restart monitor
type Config struct {
// Interval for how long to wait to check for state changes
Interval duration `toml:&amp;#34;interval&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdinternalv1opt">io.containerd.internal.v1.opt&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config for the opt manager
type Config struct {
// Path for the opt directory
Path string `toml:&amp;#34;path&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdruntimev1linux">io.containerd.runtime.v1.linux&lt;/h3>
&lt;p>废弃！无需更改配置，保持默认即可，目前1.5.x代码里面还有引用，会在以后的版本移除。&lt;/p>
&lt;pre tabindex="0">&lt;code>RuntimeLinuxV1 = &amp;#34;io.containerd.runtime.v1.linux&amp;#34;
RuntimeRuncV1 = &amp;#34;io.containerd.runc.v1&amp;#34;
RuntimeRuncV2 = &amp;#34;io.containerd.runc.v2&amp;#34;
&lt;/code>&lt;/pre>&lt;pre tabindex="0">&lt;code>type Config struct {
// 使用shim的二进制文件名，默认为：containerd-shim
Shim string `toml:&amp;#34;shim&amp;#34;`
// 配合shim的runtime二进制文件名，默认为：runc
Runtime string `toml:&amp;#34;runtime&amp;#34;`
RuntimeRoot string `toml:&amp;#34;runtime_root&amp;#34;`
NoShim bool `toml:&amp;#34;no_shim&amp;#34;`
ShimDebug bool `toml:&amp;#34;shim_debug&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdruntimev2task">io.containerd.runtime.v2.task&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config for the v2 runtime
type Config struct {
// Supported platforms
Platforms []string `toml:&amp;#34;platforms&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdgrpcv1cri">io.containerd.grpc.v1.cri&lt;/h3>
&lt;p>pkg/cri/config/config.go&lt;/p>
&lt;ul>
&lt;li>PluginConfig&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>// PluginConfig contains toml config related to CRI plugin,
// it is a subset of Config.
type PluginConfig struct {
// ContainerdConfig contains config related to containerd
ContainerdConfig `toml:&amp;#34;containerd&amp;#34; json:&amp;#34;containerd&amp;#34;`
// cni相关
CniConfig `toml:&amp;#34;cni&amp;#34; json:&amp;#34;cni&amp;#34;`
// 镜像中心相关
Registry Registry `toml:&amp;#34;registry&amp;#34; json:&amp;#34;registry&amp;#34;`
// 镜像解密相关
ImageDecryption `toml:&amp;#34;image_decryption&amp;#34; json:&amp;#34;imageDecryption&amp;#34;`
// TODO; 不把cri tcp服务注册至&amp;#34;config.grpc.address&amp;#34;配置的地址
DisableTCPService bool `toml:&amp;#34;disable_tcp_service&amp;#34; json:&amp;#34;disableTCPService&amp;#34;`
// 配置本地http服务提供websocket，用于容器的exec, attach, portforward功能
// tcp连接均发生在127.0.0.1
StreamServerAddress string `toml:&amp;#34;stream_server_address&amp;#34; json:&amp;#34;streamServerAddress&amp;#34;`
// 可以配置为0，由containerd判断使用空闲端口
StreamServerPort string `toml:&amp;#34;stream_server_port&amp;#34; json:&amp;#34;streamServerPort&amp;#34;`
// 配置最大的空闲时间，格式使用golang duration语法，如：10m, 30s等
// https://golang.org/pkg/time/#ParseDuration
StreamIdleTimeout string `toml:&amp;#34;stream_idle_timeout&amp;#34; json:&amp;#34;streamIdleTimeout&amp;#34;`
// TODO;
// EnableSelinux indicates to enable the selinux support.
EnableSelinux bool `toml:&amp;#34;enable_selinux&amp;#34; json:&amp;#34;enableSelinux&amp;#34;`
// SelinuxCategoryRange allows the upper bound on the category range to be set.
// If not specified or set to 0, defaults to 1024 from the selinux package.
SelinuxCategoryRange int `toml:&amp;#34;selinux_category_range&amp;#34; json:&amp;#34;selinuxCategoryRange&amp;#34;`
// pause镜像的地址
SandboxImage string `toml:&amp;#34;sandbox_image&amp;#34; json:&amp;#34;sandboxImage&amp;#34;`
// StatsCollectPeriod is the period (in seconds) of snapshots stats collection.
StatsCollectPeriod int `toml:&amp;#34;stats_collect_period&amp;#34; json:&amp;#34;statsCollectPeriod&amp;#34;`
// 开启systemd的cgroup支持，仅使用&amp;#34;io.containerd.runtime.v1.linux&amp;#34;下有效，已被废弃
// 是在：plugins.&amp;#34;io.containerd.grpc.v1.cri&amp;#34; 下的 &amp;#34;systemd_cgroup&amp;#34;
// 由：plugins.&amp;#34;io.containerd.grpc.v1.cri&amp;#34;.containerd.runtimes.runc.options 下的 SystemdCgroup 代替
SystemdCgroup bool `toml:&amp;#34;systemd_cgroup&amp;#34; json:&amp;#34;systemdCgroup&amp;#34;`
// 是否为&amp;#34;StreamServerAddress&amp;#34;配置tls证实，以使用https
EnableTLSStreaming bool `toml:&amp;#34;enable_tls_streaming&amp;#34; json:&amp;#34;enableTLSStreaming&amp;#34;`
X509KeyPairStreaming `toml:&amp;#34;x509_key_pair_streaming&amp;#34; json:&amp;#34;x509KeyPairStreaming&amp;#34;`
// 容器日志单行最大大小，超过该尺寸则切割为多行
// oci默认为4096字节，containerd默认设置为16384
MaxContainerLogLineSize int `toml:&amp;#34;max_container_log_line_size&amp;#34; json:&amp;#34;maxContainerLogSize&amp;#34;`
// TODO; 关闭cgroup的支持，一般当containerd以非root用户运行使用
DisableCgroup bool `toml:&amp;#34;disable_cgroup&amp;#34; json:&amp;#34;disableCgroup&amp;#34;`
// TODO; 关闭apparmor的支持，一般当containerd以非root用户运行使用
DisableApparmor bool `toml:&amp;#34;disable_apparmor&amp;#34; json:&amp;#34;disableApparmor&amp;#34;`
// TODO; 关闭调整oom_score的支持，一般当containerd以非root用户运行使用
RestrictOOMScoreAdj bool `toml:&amp;#34;restrict_oom_score_adj&amp;#34; json:&amp;#34;restrictOOMScoreAdj&amp;#34;`
// 限制最大并行数对每个镜像下载，通过semaphore实现
MaxConcurrentDownloads int `toml:&amp;#34;max_concurrent_downloads&amp;#34; json:&amp;#34;maxConcurrentDownloads&amp;#34;`
// TODO; 在k8s&amp;lt;=1.11版本必须设为&amp;#39;true&amp;#39;
// cri-api/pkg/apis/runtime/v1alpha2/api.proto -&amp;gt; masked_paths
DisableProcMount bool `toml:&amp;#34;disable_proc_mount&amp;#34; json:&amp;#34;disableProcMount&amp;#34;`
// UnsetSeccompProfile is the profile containerd/cri will use If the provided seccomp profile is
// unset (`&amp;#34;&amp;#34;`) for a container (default is `unconfined`)
UnsetSeccompProfile string `toml:&amp;#34;unset_seccomp_profile&amp;#34; json:&amp;#34;unsetSeccompProfile&amp;#34;`
// TolerateMissingHugetlbController if set to false will error out on create/update
// container requests with huge page limits if the cgroup controller for hugepages is not present.
// This helps with supporting Kubernetes &amp;lt;=1.18 out of the box. (default is `true`)
// TODO;
TolerateMissingHugetlbController bool `toml:&amp;#34;tolerate_missing_hugetlb_controller&amp;#34; json:&amp;#34;tolerateMissingHugetlbController&amp;#34;`
// DisableHugetlbController indicates to silently disable the hugetlb controller, even when it is
// present in /sys/fs/cgroup/cgroup.controllers.
// This helps with running rootless mode + cgroup v2 + systemd but without hugetlb delegation.
DisableHugetlbController bool `toml:&amp;#34;disable_hugetlb_controller&amp;#34; json:&amp;#34;disableHugetlbController&amp;#34;`
// IgnoreImageDefinedVolumes ignores volumes defined by the image. Useful for better resource
// isolation, security and early detection of issues in the mount configuration when using
// ReadOnlyRootFilesystem since containers won&amp;#39;t silently mount a temporary volume.
IgnoreImageDefinedVolumes bool `toml:&amp;#34;ignore_image_defined_volumes&amp;#34; json:&amp;#34;ignoreImageDefinedVolumes&amp;#34;`
// NetNSMountsUnderStateDir places all mounts for network namespaces under StateDir/netns instead
// of being placed under the hardcoded directory /var/run/netns. Changing this setting requires
// that all containers are deleted.
NetNSMountsUnderStateDir bool `toml:&amp;#34;netns_mounts_under_state_dir&amp;#34; json:&amp;#34;netnsMountsUnderStateDir&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>ContainerdConfig&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>type ContainerdConfig struct {
// 使用哪个&amp;#34;io.containerd.snapshotter.v1&amp;#34;插件id
Snapshotter string `toml:&amp;#34;snapshotter&amp;#34; json:&amp;#34;snapshotter&amp;#34;`
// 默认使用的容器运行时，名称必须配置在&amp;#34;runtimes&amp;#34;里
DefaultRuntimeName string `toml:&amp;#34;default_runtime_name&amp;#34; json:&amp;#34;defaultRuntimeName&amp;#34;`
// 废弃！使用&amp;#34;DefaultRuntimeName&amp;#34;代替
DefaultRuntime Runtime `toml:&amp;#34;default_runtime&amp;#34; json:&amp;#34;defaultRuntime&amp;#34;`
// 废弃！在&amp;#34;Runtimes&amp;#34;里使用&amp;#34;untrusted&amp;#34;代替
UntrustedWorkloadRuntime Runtime `toml:&amp;#34;untrusted_workload_runtime&amp;#34; json:&amp;#34;untrustedWorkloadRuntime&amp;#34;`
// Runtimes is a map from CRI RuntimeHandler strings, which specify types of runtime
// configurations, to the matching configurations.
Runtimes map[string]Runtime `toml:&amp;#34;runtimes&amp;#34; json:&amp;#34;runtimes&amp;#34;`
// NoPivot disables pivot-root (linux only), required when running a container in a RamDisk with runc
// This only works for runtime type &amp;#34;io.containerd.runtime.v1.linux&amp;#34;.
NoPivot bool `toml:&amp;#34;no_pivot&amp;#34; json:&amp;#34;noPivot&amp;#34;`
// DisableSnapshotAnnotations disables to pass additional annotations (image
// related information) to snapshotters. These annotations are required by
// stargz snapshotter (https://github.com/containerd/stargz-snapshotter).
DisableSnapshotAnnotations bool `toml:&amp;#34;disable_snapshot_annotations&amp;#34; json:&amp;#34;disableSnapshotAnnotations&amp;#34;`
// DiscardUnpackedLayers is a boolean flag to specify whether to allow GC to
// remove layers from the content store after successfully unpacking these
// layers to the snapshotter.
DiscardUnpackedLayers bool `toml:&amp;#34;discard_unpacked_layers&amp;#34; json:&amp;#34;discardUnpackedLayers&amp;#34;`
}
// Runtime struct to contain the type(ID), engine, and root variables for a default runtime
// and a runtime for untrusted worload.
type Runtime struct {
// 运行时使用的类型，如：&amp;#34;io.containerd.runtime.v1.linux&amp;#34;,&amp;#34;io.containerd.runc.v1&amp;#34;,io.containerd.runc.v2&amp;#34;（推荐）
Type string `toml:&amp;#34;runtime_type&amp;#34; json:&amp;#34;runtimeType&amp;#34;`
// 废弃！仅支持类型为&amp;#34;io.containerd.runtime.v1.linux&amp;#34;
Engine string `toml:&amp;#34;runtime_engine&amp;#34; json:&amp;#34;runtimeEngine&amp;#34;`
// PodAnnotations is a list of pod annotations passed to both pod sandbox as well as
// container OCI annotations.
PodAnnotations []string `toml:&amp;#34;pod_annotations&amp;#34; json:&amp;#34;PodAnnotations&amp;#34;`
// ContainerAnnotations is a list of container annotations passed through to the OCI config of the containers.
// Container annotations in CRI are usually generated by other Kubernetes node components (i.e., not users).
// Currently, only device plugins populate the annotations.
ContainerAnnotations []string `toml:&amp;#34;container_annotations&amp;#34; json:&amp;#34;ContainerAnnotations&amp;#34;`
// 废弃！仅支持类型为&amp;#34;io.containerd.runtime.v1.linux&amp;#34;
Root string `toml:&amp;#34;runtime_root&amp;#34; json:&amp;#34;runtimeRoot&amp;#34;`
// Options are config options for the runtime.
// If options is loaded from toml config, it will be map[string]interface{}.
// Options can be converted into toml.Tree using toml.TreeFromMap().
// Using options type as map[string]interface{} helps in correctly marshaling options from Go to JSON.
Options map[string]interface{} `toml:&amp;#34;options&amp;#34; json:&amp;#34;options&amp;#34;`
// PrivilegedWithoutHostDevices overloads the default behaviour for adding host devices to the
// runtime spec when the container is privileged. Defaults to false.
PrivilegedWithoutHostDevices bool `toml:&amp;#34;privileged_without_host_devices&amp;#34; json:&amp;#34;privileged_without_host_devices&amp;#34;`
// BaseRuntimeSpec is a json file with OCI spec to use as base spec that all container&amp;#39;s will be created from.
BaseRuntimeSpec string `toml:&amp;#34;base_runtime_spec&amp;#34; json:&amp;#34;baseRuntimeSpec&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>CniConfig&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>type CniConfig struct {
// cni相关二进制存放目录
NetworkPluginBinDir string `toml:&amp;#34;bin_dir&amp;#34; json:&amp;#34;binDir&amp;#34;`
// cni配置存放目录
NetworkPluginConfDir string `toml:&amp;#34;conf_dir&amp;#34; json:&amp;#34;confDir&amp;#34;`
// 加载配置，默认仅允许加载1个配置，支持后缀：&amp;#34;.conf&amp;#34;, &amp;#34;.conflist&amp;#34;, &amp;#34;.json&amp;#34;
// 后缀判断：github.com/containernetworking/cni/libcni/config.go
NetworkPluginMaxConfNum int `toml:&amp;#34;max_conf_num&amp;#34; json:&amp;#34;maxConfNum&amp;#34;`
// cni的模版，语法使用go template，根据kubelet配置自定生成配置，已被废弃，不建议使用
NetworkPluginConfTemplate string `toml:&amp;#34;conf_template&amp;#34; json:&amp;#34;confTemplate&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>ImageDecryption&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>// 用于对加密的镜像如何解密
type ImageDecryption struct {
// cri获取解密key的方式，与&amp;#34;stream_processors&amp;#34;配置配合使用，官方文档：
// https://github.com/containerd/cri/tree/master/docs/config.md
// https://github.com/containerd/cri/tree/master/docs/decryption.md
KeyModel string `toml:&amp;#34;key_model&amp;#34; json:&amp;#34;keyModel&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>Registry&lt;/li>
&lt;/ul>
&lt;pre tabindex="0">&lt;code>// Registry is registry settings configured
type Registry struct {
// ConfigPath is a path to the root directory containing registry-specific
// configurations.
// If ConfigPath is set, the rest of the registry specific options are ignored.
ConfigPath string `toml:&amp;#34;config_path&amp;#34; json:&amp;#34;configPath&amp;#34;`
// Mirrors are namespace to mirror mapping for all namespaces.
// This option will not be used when ConfigPath is provided.
// DEPRECATED: Use ConfigPath instead. Remove in containerd 1.7.
Mirrors map[string]Mirror `toml:&amp;#34;mirrors&amp;#34; json:&amp;#34;mirrors&amp;#34;`
// Configs are configs for each registry.
// The key is the domain name or IP of the registry.
// This option will be fully deprecated for ConfigPath in the future.
Configs map[string]RegistryConfig `toml:&amp;#34;configs&amp;#34; json:&amp;#34;configs&amp;#34;`
// Auths are registry endpoint to auth config mapping. The registry endpoint must
// be a valid url with host specified.
// DEPRECATED: Use ConfigPath instead. Remove in containerd 1.6.
Auths map[string]AuthConfig `toml:&amp;#34;auths&amp;#34; json:&amp;#34;auths&amp;#34;`
// Headers adds additional HTTP headers that get sent to all registries
Headers map[string][]string `toml:&amp;#34;headers&amp;#34; json:&amp;#34;headers&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;ul>
&lt;li>ConfigPath&lt;/li>
&lt;/ul>
&lt;p>remotes/docker/config/hosts.go&lt;/p>
&lt;pre tabindex="0">&lt;code>struct {
HostFileConfig
// Server specifies the default server. When `host` is
// also specified, those hosts are tried first.
Server string `toml:&amp;#34;server&amp;#34;`
// HostConfigs store the per-host configuration
HostConfigs map[string]hostFileConfig `toml:&amp;#34;host&amp;#34;`
}
type hostFileConfig struct {
// Capabilities determine what operations a host is
// capable of performing. Allowed values
// - pull
// - resolve
// - push
Capabilities []string `toml:&amp;#34;capabilities&amp;#34;`
// CACert can be a string or an array of strings
CACert interface{} `toml:&amp;#34;ca&amp;#34;`
// TODO: Make this an array (two key types, one for pairs (multiple files), one for single file?)
Client interface{} `toml:&amp;#34;client&amp;#34;`
SkipVerify *bool `toml:&amp;#34;skip_verify&amp;#34;`
Header map[string]interface{} `toml:&amp;#34;header&amp;#34;`
// API (default: &amp;#34;docker&amp;#34;)
// API Version (default: &amp;#34;v2&amp;#34;)
// Credentials: helper? name? username? alternate domain? token?
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdsnapshotterv1btrfs">io.containerd.snapshotter.v1.btrfs&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config represents configuration for the btrfs plugin.
type Config struct {
// Root directory for the plugin
RootPath string `toml:&amp;#34;root_path&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdsnapshotterv1native">io.containerd.snapshotter.v1.native&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config represents configuration for the native plugin.
type Config struct {
// Root directory for the plugin
RootPath string `toml:&amp;#34;root_path&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdsnapshotterv1devmapper">io.containerd.snapshotter.v1.devmapper&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config represents device mapper configuration loaded from file.
// Size units can be specified in human-readable string format (like &amp;#34;32KIB&amp;#34;, &amp;#34;32GB&amp;#34;, &amp;#34;32Tb&amp;#34;)
type Config struct {
// Device snapshotter root directory for metadata
RootPath string `toml:&amp;#34;root_path&amp;#34;`
// Name for &amp;#39;thin-pool&amp;#39; device to be used by snapshotter (without /dev/mapper/ prefix)
PoolName string `toml:&amp;#34;pool_name&amp;#34;`
// Defines how much space to allocate when creating base image for container
BaseImageSize string `toml:&amp;#34;base_image_size&amp;#34;`
BaseImageSizeBytes uint64 `toml:&amp;#34;-&amp;#34;`
// Flag to async remove device using Cleanup() callback in snapshots GC
AsyncRemove bool `toml:&amp;#34;async_remove&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdsnapshotterv1overlayfs">io.containerd.snapshotter.v1.overlayfs&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config represents configuration for the overlay plugin.
type Config struct {
// Root directory for the plugin
RootPath string `toml:&amp;#34;root_path&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdmonitorv1cgroups">io.containerd.monitor.v1.cgroups&lt;/h3>
&lt;pre tabindex="0">&lt;code>// Config for the cgroups monitor
type Config struct {
NoPrometheus bool `toml:&amp;#34;no_prometheus&amp;#34;`
}
&lt;/code>&lt;/pre>&lt;h3 id="iocontainerdmetadatav1bolt">io.containerd.metadata.v1.bolt&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>// BoltConfig defines the configuration values &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> the bolt plugin, which is
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>// loaded here, rather than back registered in the metadata package.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">type&lt;/span> BoltConfig struct &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // ContentSharingPolicy sets the sharing policy &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> content between
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // namespaces.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // The default mode &lt;span style="color:#4e9a06">&amp;#34;shared&amp;#34;&lt;/span> will make blobs available in all
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // namespaces once it is pulled into any namespace. The blob will be pulled
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // into the namespace &lt;span style="color:#204a87;font-weight:bold">if&lt;/span> a writer is opened with the &lt;span style="color:#4e9a06">&amp;#34;Expected&amp;#34;&lt;/span> digest that
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // is already present in the backend.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // The alternative mode, &lt;span style="color:#4e9a06">&amp;#34;isolated&amp;#34;&lt;/span> requires that clients prove they have
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // access to the content by providing all of the content to the ingest
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // before the blob is added to the namespace.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // Both modes share backing data, &lt;span style="color:#204a87;font-weight:bold">while&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;shared&amp;#34;&lt;/span> will reduce total
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // bandwidth across namespaces, at the cost of allowing access to any blob
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // just by knowing its digest.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ContentSharingPolicy string &lt;span style="color:#4e9a06">`&lt;/span>toml:&lt;span style="color:#4e9a06">&amp;#34;content_sharing_policy&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="iocontainerdgcv1scheduler">io.containerd.gc.v1.scheduler&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>// config configures the garbage collection policies.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">type&lt;/span> config struct &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // PauseThreshold represents the maximum amount of &lt;span style="color:#204a87">time&lt;/span> garbage
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // collection should be scheduled based on the average pause time.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // For example, a value of 0.02 means that scheduled garbage collection
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // pauses should present at most 2% of real time,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // or 20ms of every second.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // A maximum value of .5 is enforced to prevent over scheduling of the
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // garbage collector, trigger options are available to run in a more
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // predictable &lt;span style="color:#204a87">time&lt;/span> frame after mutation.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // Default is 0.02
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> PauseThreshold float64 &lt;span style="color:#4e9a06">`&lt;/span>toml:&lt;span style="color:#4e9a06">&amp;#34;pause_threshold&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // DeletionThreshold is used to guarantee that a garbage collection is
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // scheduled after configured number of deletions have occurred
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // since the previous garbage collection. A value of &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span> indicates that
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // garbage collection will not be triggered by deletion count.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // Default &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> DeletionThreshold int &lt;span style="color:#4e9a06">`&lt;/span>toml:&lt;span style="color:#4e9a06">&amp;#34;deletion_threshold&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // MutationThreshold is used to guarantee that a garbage collection is
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // run after a configured number of database mutations have occurred
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // since the previous garbage collection. A value of &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span> indicates that
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // garbage collection will only be run after a manual trigger or
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // deletion. Unlike the deletion threshold, the mutation threshold does
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // not cause scheduling of a garbage collection, but ensures GC is run
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // at the next scheduled GC.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // Default &lt;span style="color:#0000cf;font-weight:bold">100&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> MutationThreshold int &lt;span style="color:#4e9a06">`&lt;/span>toml:&lt;span style="color:#4e9a06">&amp;#34;mutation_threshold&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // ScheduleDelay is the duration in the future to schedule a garbage
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // collection triggered manually or by exceeding the configured
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // threshold &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> deletion or mutation. A zero value will immediately
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // schedule. Use suffix &lt;span style="color:#4e9a06">&amp;#34;ms&amp;#34;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> millisecond and &lt;span style="color:#4e9a06">&amp;#34;s&amp;#34;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> second.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // Default is &lt;span style="color:#4e9a06">&amp;#34;0ms&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ScheduleDelay duration &lt;span style="color:#4e9a06">`&lt;/span>toml:&lt;span style="color:#4e9a06">&amp;#34;schedule_delay&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // StartupDelay is the delay duration to &lt;span style="color:#204a87;font-weight:bold">do&lt;/span> an initial garbage
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // collection after startup. The initial garbage collection is used to
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // &lt;span style="color:#204a87">set&lt;/span> the base &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> pause threshold and should be scheduled in the
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // future to avoid slowing down other startup processes. Use suffix
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // &lt;span style="color:#4e9a06">&amp;#34;ms&amp;#34;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> millisecond and &lt;span style="color:#4e9a06">&amp;#34;s&amp;#34;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">for&lt;/span> second.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> //
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> // Default is &lt;span style="color:#4e9a06">&amp;#34;100ms&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> StartupDelay duration &lt;span style="color:#4e9a06">`&lt;/span>toml:&lt;span style="color:#4e9a06">&amp;#34;startup_delay&amp;#34;&lt;/span>&lt;span style="color:#4e9a06">`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="插件使用示例">插件使用示例&lt;/h2>
&lt;h3 id="容器自动重启">容器自动重启&lt;/h3>
&lt;p>需要使用到&amp;quot;io.containerd.internal.v1.restart&amp;quot;插件，配置容器必须维持在&amp;quot;running&amp;quot;状态，也即是自动启动&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>ctr -n k8s.io c label 672bd8283f5c5fbbc22f9c31391132171503ef79b9eb3ca4f2652463d260ce77 containerd.io/restart.status&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>running
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>io.kubernetes.pod.name&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd-192.168.31.201,io.kubernetes.container.name&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>etcd,io.cri-containerd.kind&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>container,containerd.io/restart.status&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>running,io.kubernetes.pod.uid&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>24c002bb538c36d9833eb09e226b1bba,io.kubernetes.pod.namespace&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>kube-system
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="plugin配置">plugin配置&lt;/h2>
&lt;ul>
&lt;li>toml&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.gc.v1.scheduler&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">deletion_threshold&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">mutation_threshold&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#0000cf;font-weight:bold">100&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_apparmor&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">disable_cgroup&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#204a87">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">[&lt;/span>plugins.&lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>.cni&lt;span style="color:#ce5c00;font-weight:bold">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">bin_dir&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/opt/cni/bin&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">conf_dir&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;/etc/cni/net.d&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>json&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;plubins&amp;#34;&lt;/span>: &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.gc.v1.scheduler&amp;#34;&lt;/span>: &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;deletion_threshold&amp;#34;&lt;/span>: 0,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;mutation_threshold&amp;#34;&lt;/span>: &lt;span style="color:#0000cf;font-weight:bold">100&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;io.containerd.grpc.v1.cri&amp;#34;&lt;/span>: &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;disable_apparmor&amp;#34;&lt;/span>: false,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;disable_cgroup&amp;#34;&lt;/span>: false,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;cni&amp;#34;&lt;/span>: &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;bin_dir&amp;#34;&lt;/span>: &lt;span style="color:#4e9a06">&amp;#34;/opt/cni/bin&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#4e9a06">&amp;#34;conf_dir&amp;#34;&lt;/span>: &lt;span style="color:#4e9a06">&amp;#34;/etc/cni/net.d&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>ctr plugins ls
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>// URI returns the full plugin URI
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>func &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>r *Registration&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span> URI&lt;span style="color:#ce5c00;font-weight:bold">()&lt;/span> string &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">return&lt;/span> fmt.Sprintf&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;%s.%s&amp;#34;&lt;/span>, r.Type, r.ID&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>首先需要明白go1.8新增的plugin特性，&lt;/p>
&lt;h2 id="faqs">FAQs&lt;/h2>
&lt;pre tabindex="0">&lt;code>ctr --namespace k8s.io images pull --hosts-dir /etc/containerd/certs.d/ registry.cn-hangzhou.aliyuncs.com/kube-image-repo/pause:3.5-amd64 --http-dump
&lt;/code>&lt;/pre></description></item></channel></rss>