Skip to content

Commit 65eda50

Browse files
authored
Merge pull request #196 from marquiz/devel/plugin-images-documentation
Add minimal documentation for plugin images
2 parents 5cf60eb + 43e98ee commit 65eda50

File tree

10 files changed

+231
-3
lines changed

10 files changed

+231
-3
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,18 @@ The following sample plugins exist for NRI:
424424
Please see the documentation of these plugins for further details
425425
about what and how each of these plugins can be used for.
426426

427+
Ready-built container images for these plugins are available at
428+
ghcr.io/containerd/nri/plugins/<plugin>.
429+
430+
Minimal [kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/)
431+
overlays for deploying the sample are available at
432+
[contrib/kustomize](contrib/kustomize). See plugin-specific documentation for
433+
detailed examples.
434+
435+
> [!CAUTION]
436+
> Use at your own risk. The kustomize overlays provided in this repository is
437+
> offered as a convenience for testing and demonstration purposes.
438+
427439
### WebAssembly support
428440

429441
The NRI supports WebAssembly plugins through a SDK provided by

plugins/device-injector/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,35 @@ The annotation value syntax for mount injection is
101101
...
102102
```
103103

104+
## Deployment
105+
106+
The NRI repository contains minimal kustomize overlays for this plugin at
107+
[contrib/kustomize/device-injector](../../contrib/kustomize/device-injector).
108+
109+
Deploy the latest release with:
110+
111+
```bash
112+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/device-injector
113+
```
114+
115+
Deploy a specific release with:
116+
117+
```bash
118+
RELEASE_TAG=v0.10.0
119+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/device-injector?ref=${RELEASE_TAG}"
120+
```
121+
122+
Deploy the latest development build from tip of the main branch with:
123+
124+
```bash
125+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/device-injector/unstable
126+
```
127+
104128
## Testing
105129

106130
You can test this plugin using a kubernetes cluster/node with a container
107131
runtime that has NRI support enabled. Start the plugin on the target node
108132
(`device-injector -idx 10`), create a pod with some annotated devices or
109133
mounts, then verify that those get injected to the containers according
110134
to the annotations. See the [sample pod spec](sample-device-inject.yaml)
111-
for an example.
135+
for an example.

plugins/differ/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ The plugin can register itself multiple times at multiple indices, so a single
66
differ instance can be used to track and show step-by-step all the changes
77
made to a container.
88

9+
## Deployment
10+
11+
The NRI repository contains minimal kustomize overlays for this plugin at
12+
[contrib/kustomize/differ](../../contrib/kustomize/differ).
13+
14+
Deploy the latest release with:
15+
16+
```bash
17+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/differ
18+
```
19+
20+
Deploy a specific release with:
21+
22+
```bash
23+
RELEASE_TAG=v0.10.0
24+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/differ?ref=${RELEASE_TAG}"
25+
```
26+
27+
Deploy the latest development build from tip of the main branch with:
28+
29+
```bash
30+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/differ/unstable
31+
```
32+
933
## Testing
1034

1135
You can test this plugin by registering it to the desired indices (for

plugins/hook-injector/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
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.
44

5+
## Deployment
6+
7+
The NRI repository contains minimal kustomize overlays for this plugin at
8+
[contrib/kustomize/hook-injector](../../contrib/kustomize/hook-injector).
9+
10+
Deploy the latest release with:
11+
12+
```bash
13+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/hook-injector
14+
```
15+
16+
Deploy a specific release with:
17+
18+
```bash
19+
RELEASE_TAG=v0.10.0
20+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/hook-injector?ref=${RELEASE_TAG}"
21+
```
22+
23+
Deploy the latest development build from tip of the main branch with:
24+
25+
```bash
26+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/hook-injector/unstable
27+
```
28+
529
## Testing
630

731
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`
1236

1337
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.
1438

15-
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`
39+
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`

plugins/logger/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,27 @@ and illustrative purposes.
77

88
Note that the [differ plugin](../differ) is probably better suited for actual
99
debugging purposes than this simple logger.
10+
11+
## Deployment
12+
13+
The NRI repository contains minimal kustomize overlays for this plugin at
14+
[contrib/kustomize/logger](../../contrib/kustomize/logger).
15+
16+
Deploy the latest release with:
17+
18+
```bash
19+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/logger
20+
```
21+
22+
Deploy a specific release with:
23+
24+
```bash
25+
RELEASE_TAG=v0.10.0
26+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/logger?ref=${RELEASE_TAG}"
27+
```
28+
29+
Deploy the latest development build from tip of the main branch with:
30+
31+
```bash
32+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/logger/unstable
33+
```

plugins/network-device-injector/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,30 @@ the rest of the parameters are optional.
4747
The plugin only injects interfaces on the Pod network namespace for which the containers are attached when created,
4848
for more advanced networking configuration like routing, traffic redirection or dynamic address configuration new plugins can be created.
4949

50+
## Deployment
51+
52+
The NRI repository contains minimal kustomize overlays for this plugin at
53+
[contrib/kustomize/network-device-injector](../../contrib/kustomize/network-device-injector).
54+
55+
Deploy the latest release with:
56+
57+
```bash
58+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-device-injector
59+
```
60+
61+
Deploy a specific release with:
62+
63+
```bash
64+
RELEASE_TAG=v0.10.0
65+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/network-device-injector?ref=${RELEASE_TAG}"
66+
```
67+
68+
Deploy the latest development build from tip of the main branch with:
69+
70+
```bash
71+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-device-injector/unstable
72+
```
73+
5074
## Testing
5175

5276
You can test this plugin using a kubernetes cluster/node with a container

plugins/network-logger/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ plugin has created the network interface and allocated the IPs.
3030

3131
- RemovePodSandbox: It happens after all the network resources were released.
3232

33+
## Deployment
34+
35+
The NRI repository contains minimal kustomize overlays for this plugin at
36+
[contrib/kustomize/network-logger](../../contrib/kustomize/network-logger).
37+
38+
Deploy the latest release with:
39+
40+
```bash
41+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-logger
42+
```
43+
44+
Deploy a specific release with:
45+
46+
```bash
47+
RELEASE_TAG=v0.10.0
48+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/network-logger?ref=${RELEASE_TAG}"
49+
```
50+
51+
Deploy the latest development build from tip of the main branch with:
52+
53+
```bash
54+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/network-logger/unstable
55+
```
56+
3357
## Testing
3458

3559
You can test this plugin using a kubernetes cluster/node with a container

plugins/template/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,27 @@
33
This is a minimal example plugin that demonstrates how to interact with
44
container lifecycle events with NRI. This plugin can be deployed for testing
55
and demonstration purposes and used as a base for implementing new NRI plugins.
6+
7+
## Deployment
8+
9+
The NRI repository contains minimal kustomize overlays for this plugin at
10+
[contrib/kustomize/template](../../contrib/kustomize/template).
11+
12+
Deploy the latest release with:
13+
14+
```bash
15+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/template
16+
```
17+
18+
Deploy a specific release with:
19+
20+
```bash
21+
RELEASE_TAG=v0.10.0
22+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/template?ref=${RELEASE_TAG}"
23+
```
24+
25+
Deploy the latest development build from tip of the main branch with:
26+
27+
```bash
28+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/template/unstable
29+
```

plugins/ulimit-adjuster/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,34 @@ missing). The `type` field accepts names in uppercase letters
2828
("RLIMIT_NOFILE"), lowercase letters ("rlimit_memlock"), and omitting the
2929
"RLIMIT_" prefix ("nproc").
3030

31+
## Deployment
32+
33+
The NRI repository contains minimal kustomize overlays for this plugin at
34+
[contrib/kustomize/ulimit-adjuster](../../contrib/kustomize/ulimit-adjuster).
35+
36+
Deploy the latest release with:
37+
38+
```bash
39+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/ulimit-adjuster
40+
```
41+
42+
Deploy a specific release with:
43+
44+
```bash
45+
RELEASE_TAG=v0.10.0
46+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/ulimit-adjuster?ref=${RELEASE_TAG}"
47+
```
48+
49+
Deploy the latest development build from tip of the main branch with:
50+
51+
```bash
52+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/ulimit-adjuster/unstable
53+
```
54+
3155
## Testing
3256

3357
You can test this plugin using a kubernetes cluster/node with a container
3458
runtime that has NRI support enabled. Start the plugin on the target node
3559
(`ulimit-adjuster -idx 10`), create a pod with some annotated ulimits, then
3660
verify that those get adjusted in the container. See the
37-
[sample pod spec](sample-ulimit-adjust.yaml) for an example.
61+
[sample pod spec](sample-ulimit-adjust.yaml) for an example.

plugins/v010-adapter/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,30 @@ receives. It is not guaranteed to be 100% identical to the data provided by
88
the original interface but believed to be close enough to allow old plugins
99
to function.
1010

11+
## Deployment
12+
13+
The NRI repository contains minimal kustomize overlays for this plugin at
14+
[contrib/kustomize/v010-adapter](../../contrib/kustomize/v010-adapter).
15+
16+
Deploy the latest release with:
17+
18+
```bash
19+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/v010-adapter
20+
```
21+
22+
Deploy a specific release with:
23+
24+
```bash
25+
RELEASE_TAG=v0.10.0
26+
kubectl apply -k "github.com/containerd/nri/contrib/kustomize/v010-adapter?ref=${RELEASE_TAG}"
27+
```
28+
29+
Deploy the latest development build from tip of the main branch with:
30+
31+
```bash
32+
kubectl apply -k https://github.com/containerd/nri/contrib/kustomize/v010-adapter/unstable
33+
```
34+
1135
## Testing
1236

1337
You can enable backward compatibility by compiling this plugin, installing,

0 commit comments

Comments
 (0)