mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
csi: Add /dev mounts to CSI Plugins
CSI Plugins that manage devices need not just access to the CSI directory, but also to manage devices inside `/dev`. This commit introduces a `/dev:/dev` mount to the container so that they may do so.
This commit is contained in:
committed by
Tim Gross
parent
27e29a30bb
commit
08ad2b97e4
@@ -113,8 +113,15 @@ func (h *csiPluginSupervisorHook) Prestart(ctx context.Context,
|
||||
Readonly: false,
|
||||
PropagationMode: "bidirectional",
|
||||
}
|
||||
devMount := &drivers.MountConfig{
|
||||
TaskPath: "/dev",
|
||||
HostPath: "/dev",
|
||||
Readonly: false,
|
||||
}
|
||||
|
||||
mounts := ensureMountpointInserted(h.runner.hookResources.getMounts(), configMount)
|
||||
mounts = ensureMountpointInserted(mounts, devMount)
|
||||
|
||||
h.runner.hookResources.setMounts(mounts)
|
||||
|
||||
resp.Done = true
|
||||
|
||||
Reference in New Issue
Block a user