Skip to content

Commit 7fa35db

Browse files
author
Yuntong Qu
committed
update to v2
1 parent 0ec47b3 commit 7fa35db

2 files changed

Lines changed: 65 additions & 32 deletions

File tree

docs/getting-started.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,7 @@ You can download one of the latest builds for containerd on the [github releases
1616
If you are using systemd, we have a `containerd.service` file at the root of the repository that you can use.
1717

1818
The daemon also uses a configuration file located in `/etc/containerd/config.toml` for specifying daemon level options.
19-
A sample configuration file looks like this:
20-
21-
```toml
22-
oom_score = -999
23-
24-
[debug]
25-
level = "debug"
26-
27-
[metrics]
28-
address = "127.0.0.1:1338"
29-
30-
[plugins.linux]
31-
runtime = "runc"
32-
shim_debug = true
33-
```
19+
A sample configuration file can be found [here](containerd/docs/man/containerd-config.toml.5.md)
3420

3521
The default configuration can be generated via `containerd config default > /etc/containerd/config.toml`.
3622

docs/man/containerd-config.toml.5.md

Lines changed: 64 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,32 @@ settings.
2323

2424
## FORMAT
2525

26+
**version**
27+
: The version of the config file
28+
2629
**root**
2730
: The root directory for containerd metadata. (Default: "/var/lib/containerd")
2831

2932
**state**
3033
: The state directory for containerd (Default: "/run/containerd")
3134

32-
**oom_score**
33-
: The out of memory (OOM) score applied to the containerd daemon process (Default: 0)
34-
35-
**imports**
36-
: Imports is a list of additional configuration files to include.
37-
This allows to split the main configuration file and keep some sections
38-
separately (for example vendors may keep a custom runtime configuration in a
39-
separate file without modifying the main `config.toml`).
40-
Imported files will overwrite simple fields like `int` or
41-
`string` (if not empty) and will append `array` and `map` fields.
42-
Imported files are also versioned, and the version can't be higher than
43-
the main config.
35+
**plugin_dir**
36+
: The directory for dynamic plugins to be stored
4437

4538
**[grpc]**
46-
: Section for gRPC socket listener settings. Contains three properties:
39+
: Section for gRPC socket listener settings. Contains properties:
4740
- **address** (Default: "/run/containerd/containerd.sock")
41+
- **tcp_address**
42+
- **tcp_tls_cert**
43+
- **tcp_tls_key**
44+
- **uid** (Default: 0)
45+
- **gid** (Default: 0)
46+
- **max_recv_message_size**
47+
- **max_send_message_size**
48+
49+
**[ttrpc]**
50+
: Section for TTRPC settings. Contains properties:
51+
- **address** (Default: "")
4852
- **uid** (Default: 0)
4953
- **gid** (Default: 0)
5054

@@ -59,10 +63,14 @@ the main config.
5963
: Section to enable and configure a metrics listener. Contains two properties:
6064
- **address** (Default: "") Metrics endpoint does not listen by default
6165
- **grpc_histogram** (Default: false) Turn on or off gRPC histogram metrics
66+
67+
**disabled_plugins**
68+
: DisabledPlugins are IDs of plugins to disable. Disabled plugins won't be
69+
initialized and started.
6270

63-
**[cgroup]**
64-
: Section for Linux cgroup specific settings
65-
- **path** (Default: "") Specify a custom cgroup path for created containers
71+
**required_plugins**
72+
: RequiredPlugins are IDs of required plugins. Containerd exits if any
73+
required plugin doesn't exist or fails to be initialized or started.
6674

6775
**[plugins]**
6876
: The plugins section contains configuration options exposed from installed plugins.
@@ -77,12 +85,51 @@ documentation.
7785
**runtime_root** is the root directory used by the runtime (Default: **""**),
7886
**no_shim** specifies whether to use a shim or not (Default: **false**),
7987
**shim_debug** turns on debugging for the shim (Default: **false**)
80-
- **[plugins.scheduler]** has several options that perform advanced tuning for the scheduler:
88+
- **[plugins.io.containerd.gc.v1.scheduler]** has several options that perform advanced tuning for the scheduler:
8189
**pause_threshold** is the maximum amount of time GC should be scheduled (Default: **0.02**),
8290
**deletion_threshold** guarantees GC is scheduled after n number of deletions (Default: **0** [not triggered]),
8391
**mutation_threshold** guarantees GC is scheduled after n number of database mutations (Default: **100**),
8492
**schedule_delay** defines the delay after trigger event before scheduling a GC (Default **"0ms"** [immediate]),
8593
**startup_delay** defines the delay after startup before scheduling a GC (Default **"100ms"**)
94+
95+
**oom_score**
96+
: The out of memory (OOM) score applied to the containerd daemon process (Default: 0)
97+
98+
**[cgroup]**
99+
: Section for Linux cgroup specific settings
100+
- **path** (Default: "") Specify a custom cgroup path for created containers
101+
102+
**[proxy_plugins]**
103+
: ProxyPlugins configures plugins which are communicated to over GRPC
104+
- **type** (Default: "")
105+
- **address** (Default: "")
106+
107+
**timeouts**
108+
: Timeouts specified as a duration
109+
110+
- **[plugins.cgroup]** has one option __no_prometheus__ (Default: **false**)
111+
112+
<!-- [timeouts]
113+
"io.containerd.timeout.shim.cleanup" = "5s"
114+
"io.containerd.timeout.shim.load" = "5s"
115+
"io.containerd.timeout.shim.shutdown" = "3s"
116+
"io.containerd.timeout.task.state" = "2s" -->
117+
118+
**imports**
119+
: Imports is a list of additional configuration files to include.
120+
This allows to split the main configuration file and keep some sections
121+
separately (for example vendors may keep a custom runtime configuration in a
122+
separate file without modifying the main `config.toml`).
123+
Imported files will overwrite simple fields like `int` or
124+
`string` (if not empty) and will append `array` and `map` fields.
125+
Imported files are also versioned, and the version can't be higher than
126+
the main config.
127+
128+
**stream_processors**
129+
- **accepts** (Default: "[]") Accepts specific media-types
130+
- **returns** (Default: "") Returns the media-type
131+
- **path** (Default: "") Path or name of the binary
132+
- **args** (Default: "[]") Args to the binary
86133

87134
## EXAMPLE
88135

0 commit comments

Comments
 (0)