The OCI runtime configuration supports hooks, which are custom actions related to the lifecycle of a container. This plugins performs OCI hook injection into containers using the Hook Manager package of podman. 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.
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
(hook-injector -idx 10
), put a suitable OCI hook configuration
in place, then create a pod with matching containers and check the results.
You can use the sample hook configuration, the sample hook and the sample pod spec to test this.