Skip to content

Commit

Permalink
fix: disable NRI plugin in a different way
Browse files Browse the repository at this point in the history
This way it's easy to re-enable NRI plugins with a simple change.

See #10068

I tested that it works e2e with NRI plugins repository.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Jan 9, 2025
1 parent 499695e commit 6d605fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 0 additions & 1 deletion hack/cri-containerd.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version = 3

disabled_plugins = [
"io.containerd.nri.v1.nri",
"io.containerd.internal.v1.tracing",
"io.containerd.snapshotter.v1.blockfile",
"io.containerd.tracing.processor.v1.otlp",
Expand Down
3 changes: 3 additions & 0 deletions hack/cri-plugin.part
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ version = 3

[plugins."io.containerd.cri.v1.runtime".containerd.runtimes.runc]
base_runtime_spec = "/etc/cri/conf.d/base-spec.json"

[plugins."io.containerd.nri.v1.nri"]
disable = true
18 changes: 18 additions & 0 deletions website/content/v1.10/talos-guides/configuration/containerd.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,21 @@ NODE NAMESPACE ID
172.20.0.5 k8s.io kube-system/kube-proxy-xp7jq registry.k8s.io/pause:3.8 1780 SANDBOX_READY
172.20.0.5 k8s.io └─ kube-system/kube-proxy-xp7jq:kube-proxy:84fc77c59e17 registry.k8s.io/kube-proxy:v1.26.0-alpha.3 1843 CONTAINER_RUNNING
```

### Enabling NRI Plugins

By default, Talos disables [NRI](https://github.com/containerd/containerd/blob/main/docs/NRI.md) plugins in `containerd`, as they might have security implications.
However, if you need to enable them, you can do so by adding the following configuration:

```yaml
machine:
files:
- content: |
[plugins]
[plugins."io.containerd.nri.v1.nri"]
disable = false
path: /etc/cri/conf.d/20-customization.part
op: create
```

After applying the configuration, the NRI plugins can be deployed, for example plugins from [this repository](https://containers.github.io/nri-plugins/stable/docs/index.html).

0 comments on commit 6d605fc

Please sign in to comment.