Add minimal documentation for plugin images

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
This commit is contained in:
Markus Lehtonen 2025-08-07 13:40:37 +03:00
parent b382750eac
commit 43e98eee13
10 changed files with 231 additions and 3 deletions

View File

@ -424,6 +424,18 @@ The following sample plugins exist for NRI:
Please see the documentation of these plugins for further details
about what and how each of these plugins can be used for.
Ready-built container images for these plugins are available at
ghcr.io/containerd/nri/plugins/<plugin>.
Minimal [kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/)
overlays for deploying the sample are available at
[contrib/kustomize](contrib/kustomize). See plugin-specific documentation for
detailed examples.
> [!CAUTION]
> Use at your own risk. The kustomize overlays provided in this repository is
> offered as a convenience for testing and demonstration purposes.
### WebAssembly support
The NRI supports WebAssembly plugins through a SDK provided by

View File

@ -101,6 +101,30 @@ The annotation value syntax for mount injection is
...
```
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/device-injector](../../contrib/kustomize/device-injector).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/device-injector
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/device-injector?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/device-injector/unstable
```
## Testing
You can test this plugin using a kubernetes cluster/node with a container
@ -108,4 +132,4 @@ runtime that has NRI support enabled. Start the plugin on the target node
(`device-injector -idx 10`), create a pod with some annotated devices or
mounts, then verify that those get injected to the containers according
to the annotations. See the [sample pod spec](sample-device-inject.yaml)
for an example.
for an example.

View File

@ -6,6 +6,30 @@ The plugin can register itself multiple times at multiple indices, so a single
differ instance can be used to track and show step-by-step all the changes
made to a container.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/differ](../../contrib/kustomize/differ).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/differ
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/differ?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/differ/unstable
```
## Testing
You can test this plugin by registering it to the desired indices (for

View File

@ -2,6 +2,30 @@
The [OCI runtime configuration](https://github.com/opencontainers/runtime-spec/blob/main/spec.md) supports [hooks](https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-hooks), which are custom actions related to the lifecycle of a container. This plugin performs OCI hook injection into containers using the [Hook Manager](https://github.com/containers/podman/tree/8bcc086b1b9d8aa0ef3bb08d37542adf9de26ac5/pkg/hooks) package of [podman](https://github.com/containers/podman). [CRI-O](https://github.com/cri-o/cri-o) has native hook injection support using the same package. This plugin essentially achieves CRI-O compatible OCI hook injection for other runtimes using NRI.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/hook-injector](../../contrib/kustomize/hook-injector).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/hook-injector
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/hook-injector?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/hook-injector/unstable
```
## Testing
You can test this plugin using a Kubernetes cluster/node with a container runtime that has NRI support enabled ([Enabling NRI in Containerd](https://github.com/containerd/containerd/blob/main/docs/NRI.md#enabling-nri-support-in-containerd)). Once you've enabled NRI on your runtime, you can use the sample hook configuration, placing it at `/etc/containers/oci/hooks.d`, and the [sample hook](usr/local/sbin/demo-hook.sh), placing it at `/usr/local/sbin/`.
@ -12,4 +36,4 @@ Start the plugin directly on the target node by running `hook-injector -idx 10`
Additional details on hook configuration can be found in the [OCI hook configuration](https://github.com/containers/podman/blob/8bcc086b1b9d8aa0ef3bb08d37542adf9de26ac5/pkg/hooks/docs/oci-hooks.5.md) documentation.
Finally, create a test pod using the [sample pod spec](sample-hook-inject.yaml) and check for the log output of the hook, which will be at `/tmp/demo-hook.log`
Finally, create a test pod using the [sample pod spec](sample-hook-inject.yaml) and check for the log output of the hook, which will be at `/tmp/demo-hook.log`

View File

@ -7,3 +7,27 @@ and illustrative purposes.
Note that the [differ plugin](../differ) is probably better suited for actual
debugging purposes than this simple logger.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/logger](../../contrib/kustomize/logger).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/logger
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/logger?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/logger/unstable
```

View File

@ -47,6 +47,30 @@ the rest of the parameters are optional.
The plugin only injects interfaces on the Pod network namespace for which the containers are attached when created,
for more advanced networking configuration like routing, traffic redirection or dynamic address configuration new plugins can be created.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/network-device-injector](../../contrib/kustomize/network-device-injector).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-device-injector
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/network-device-injector?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-device-injector/unstable
```
## Testing
You can test this plugin using a kubernetes cluster/node with a container

View File

@ -30,6 +30,30 @@ plugin has created the network interface and allocated the IPs.
- RemovePodSandbox: It happens after all the network resources were released.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/network-logger](../../contrib/kustomize/network-logger).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-logger
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/network-logger?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-logger/unstable
```
## Testing
You can test this plugin using a kubernetes cluster/node with a container

View File

@ -3,3 +3,27 @@
This is a minimal example plugin that demonstrates how to interact with
container lifecycle events with NRI. This plugin can be deployed for testing
and demonstration purposes and used as a base for implementing new NRI plugins.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/template](../../contrib/kustomize/template).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/template
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/template?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/template/unstable
```

View File

@ -28,10 +28,34 @@ missing). The `type` field accepts names in uppercase letters
("RLIMIT_NOFILE"), lowercase letters ("rlimit_memlock"), and omitting the
"RLIMIT_" prefix ("nproc").
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/ulimit-adjuster](../../contrib/kustomize/ulimit-adjuster).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/ulimit-adjuster
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/ulimit-adjuster?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/ulimit-adjuster/unstable
```
## Testing
You can test this plugin using a kubernetes cluster/node with a container
runtime that has NRI support enabled. Start the plugin on the target node
(`ulimit-adjuster -idx 10`), create a pod with some annotated ulimits, then
verify that those get adjusted in the container. See the
[sample pod spec](sample-ulimit-adjust.yaml) for an example.
[sample pod spec](sample-ulimit-adjust.yaml) for an example.

View File

@ -8,6 +8,30 @@ receives. It is not guaranteed to be 100% identical to the data provided by
the original interface but believed to be close enough to allow old plugins
to function.
## Deployment
The NRI repository contains minimal kustomize overlays for this plugin at
[contrib/kustomize/v010-adapter](../../contrib/kustomize/v010-adapter).
Deploy the latest release with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/v010-adapter
```
Deploy a specific release with:
```bash
RELEASE_TAG=v0.10.0
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/v010-adapter?ref=${RELEASE_TAG}"
```
Deploy the latest development build from tip of the main branch with:
```bash
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/v010-adapter/unstable
```
## Testing
You can enable backward compatibility by compiling this plugin, installing,