mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 06:27:39 +00:00
docs: Add swap annotations introduction
Add swap annotations introduction of `io.katacontainers.config.hypervisor.enable_guest_swap`, `io.katacontainers.container.resource.swappiness"` and `io.katacontainers.container.resource.swap_in_bytes"` to how-to-set-sandbox-config-kata.md. Fixes: #2326 Signed-off-by: Hui Zhu <teawater@antfin.com>
This commit is contained in:
parent
9bbaa66f39
commit
2174fee48d
@ -91,6 +91,13 @@ There are several kinds of Kata configurations and they are listed below.
|
|||||||
| `io.katacontainers.config.hypervisor.virtio_fs_cache` | string | the cache mode for virtio-fs, valid values are `always`, `auto` and `none` |
|
| `io.katacontainers.config.hypervisor.virtio_fs_cache` | string | the cache mode for virtio-fs, valid values are `always`, `auto` and `none` |
|
||||||
| `io.katacontainers.config.hypervisor.virtio_fs_daemon` | string | virtio-fs `vhost-user` daemon path |
|
| `io.katacontainers.config.hypervisor.virtio_fs_daemon` | string | virtio-fs `vhost-user` daemon path |
|
||||||
| `io.katacontainers.config.hypervisor.virtio_fs_extra_args` | string | extra options passed to `virtiofs` daemon |
|
| `io.katacontainers.config.hypervisor.virtio_fs_extra_args` | string | extra options passed to `virtiofs` daemon |
|
||||||
|
| `io.katacontainers.config.hypervisor.enable_guest_swap` | `boolean` | enable swap in the guest |
|
||||||
|
|
||||||
|
## Container Options
|
||||||
|
| Key | Value Type | Comments |
|
||||||
|
|-------| ----- | ----- |
|
||||||
|
| `io.katacontainers.container.resource.swappiness"` | `uint64` | specify the `Resources.Memory.Swappiness` |
|
||||||
|
| `io.katacontainers.container.resource.swap_in_bytes"` | `uint64` | specify the `Resources.Memory.Swap` |
|
||||||
|
|
||||||
# CRI-O Configuration
|
# CRI-O Configuration
|
||||||
|
|
||||||
@ -100,11 +107,12 @@ In case of CRI-O, all annotations specified in the pod spec are passed down to K
|
|||||||
|
|
||||||
For containerd, annotations specified in the pod spec are passed down to Kata
|
For containerd, annotations specified in the pod spec are passed down to Kata
|
||||||
starting with version `1.3.0` of containerd. Additionally, extra configuration is
|
starting with version `1.3.0` of containerd. Additionally, extra configuration is
|
||||||
needed for containerd, by providing a `pod_annotations` field in the containerd config
|
needed for containerd, by providing `pod_annotations` field and
|
||||||
file. The `pod_annotations` field is a list of annotations that can be passed down to
|
`container_annotations` field in the containerd config
|
||||||
Kata as OCI annotations. It supports golang match patterns. Since annotations supported
|
file. The `pod_annotations` field and `container_annotations` field are two lists of
|
||||||
by Kata follow the pattern `io.katacontainers.*`, the following configuration would work
|
annotations that can be passed down to Kata as OCI annotations. They support golang match
|
||||||
for passing annotations to Kata from containerd:
|
patterns. Since annotations supported by Kata follow the pattern `io.katacontainers.*`,
|
||||||
|
the following configuration would work for passing annotations to Kata from containerd:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cat /etc/containerd/config
|
$ cat /etc/containerd/config
|
||||||
@ -113,6 +121,7 @@ $ cat /etc/containerd/config
|
|||||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata]
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata]
|
||||||
runtime_type = "io.containerd.kata.v2"
|
runtime_type = "io.containerd.kata.v2"
|
||||||
pod_annotations = ["io.katacontainers.*"]
|
pod_annotations = ["io.katacontainers.*"]
|
||||||
|
container_annotations = ["io.katacontainers.*"]
|
||||||
....
|
....
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user