You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change adds a description of standard hooks to the
CDI specification. These hooks can be used to update the LDCache
in the container or to create symlinks.
Signed-off-by: Evan Lezar <[email protected]>
Copy file name to clipboardExpand all lines: SPEC.md
+47
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,53 @@ The `containerEdits` field has the following definition:
245
245
*`enableMBM` (boolean, OPTIONAL) whether to enable memory bandwidth monitoring
246
246
*`additionalGids` (array of uint32s, OPTIONAL) A list of additional group IDs to add with the container process. These values are added to the `user.additionalGids` field in the OCI runtime specification. Values of 0 are ignored. Added in v0.7.0.
247
247
248
+
## Hooks
249
+
250
+
Hooks allow CDI spec vendors to inject specific logic into various points of the
251
+
container lifecycle. These are typically mapped to [OCI runtime hooks](https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-hooks) and
252
+
are typically used when behaviour depends on the container contents in some way.
253
+
254
+
The following named hooks are defined by the CDI specification:
255
+
*`update-ldcache`
256
+
*`create-symlinks`
257
+
258
+
Note that although their intent is defined as part of the CDI specification, their
259
+
implementation and distribution is left to vendors. Note that these hooks are both
260
+
`createContainer` hooks, meaning that in the context of OCI-compliant runtimes,
261
+
the hook path is resolved in the runtime namespace, while it is executed in the
262
+
container namespace.
263
+
264
+
### update-ldcache
265
+
266
+
The `update-ldcache` hook is a `createContainer` hook that is used to ensure that
267
+
the ldcache in a container is updated to include any injected libraries.
0 commit comments