Skip to content

Commit fe24b91

Browse files
committed
pkg/nri, docs: enable NRI by default.
Signed-off-by: Krisztian Litkey <[email protected]>
1 parent 96bf529 commit fe24b91

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

docs/NRI.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,21 @@ the TODO list.
5252
The main reason for this split of functionality is to allow
5353
NRI plugins for other types of sandboxes and for other container clients other than just for CRI containers in the "k8s.io" namespace.
5454

55-
## Enabling NRI Support in Containerd
55+
## Disabling NRI Support in Containerd
5656

5757
Enabling and disabling NRI support in containerd happens by enabling or
58-
disabling the common containerd NRI plugin. The plugin, and consequently
59-
NRI functionality, is disabled by default. It can be enabled by editing
60-
the `[plugins."io.containerd.nri.v1.nri"]` section in the containerd
61-
configuration file, which by default is `/etc/containerd/config.toml`,
62-
and changing `disable = true` to `disable = false`. Once enabled, the
63-
NRI section should look something like this:
58+
disabling the common containerd NRI plugin. Starting with containerd 2.0
59+
The plugin, and consequently NRI functionality, is enabled by default.
60+
It can be disabled by editing the `[plugins."io.containerd.nri.v1.nri"]`
61+
section in the containerd configuration file, which by default is
62+
`/etc/containerd/config.toml`, and changing `disable = false` to
63+
`disable = true`. The NRI section to disable NRI functionality should
64+
look something like this:
6465

6566
```toml
6667
[plugins."io.containerd.nri.v1.nri"]
67-
# Enable NRI support in containerd.
68-
disable = false
68+
# Disable NRI support in containerd.
69+
disable = true
6970
# Allow connections from externally launched NRI plugins.
7071
disable_connections = false
7172
# plugin_config_path is the directory to search for plugin-specific configuration.

integration/client/testdata/default-1.7.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ version = 2
196196
no_prometheus = false
197197

198198
[plugins."io.containerd.nri.v1.nri"]
199-
disable = true
199+
# Updated in latest
200+
#disable = true
201+
disable = false
200202
disable_connections = false
201203
plugin_config_path = "/etc/nri/conf.d"
202204
plugin_path = "/opt/nri/plugins"

pkg/nri/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type Config struct {
4242
// DefaultConfig returns the default configuration.
4343
func DefaultConfig() *Config {
4444
return &Config{
45-
Disable: true,
45+
Disable: false,
4646
SocketPath: nri.DefaultSocketPath,
4747
PluginPath: nri.DefaultPluginPath,
4848
PluginConfigPath: nri.DefaultPluginConfigPath,

0 commit comments

Comments
 (0)