csi_plugin Stanza
Placement | job -> group -> task -> volume |
The "csi_plugin" stanza allows the task to specify it provides a Container Storage Interface plugin to the cluster. Nomad will automatically register the plugin so that it can be used by other jobs to claim volumes.
csi_plugin
Parameters
id
(string: <required>)
- This is the ID for the plugin. Some plugins will require both controller and node plugin types (see below); you need to use the same ID for both so that Nomad knows they belong to the same plugin.type
(string: <required>)
- One ofnode
,controller
, ormonolith
. Each plugin supports one or more types. Each Nomad client node where you want to mount a volume will need anode
plugin instance. Some plugins will also require one or morecontroller
plugin instances to communicate with the storage provider's APIs. Some plugins can serve as bothcontroller
andnode
at the same time, and these are calledmonolith
plugins. Refer to your CSI plugin's documentation.mount_dir
(string: <required>)
- The directory path inside the container where the plugin will expect a Unix domain socket for bidirectional communication with Nomad.
Note: Plugins running as node
or monolith
require root
privileges (or CAP_SYS_ADMIN
on Linux) to mount volumes on the
host. With the Docker task driver, you can use the privileged = true
configuration, but no other default task drivers currently have this
option.
Note: During node drains, jobs that claim volumes must be moved before
the node
or monolith
plugin for those volumes. You should run node
or
monolith
plugins as system
jobs and use the -ignore-system
flag on nomad node drain
to ensure that the plugins are running while the
node is being drained.
Note: Only one plugin instance of a given plugin ID and type (controller or node) should be deployed on any given client node. Use a constraint as shown below.
csi_plugin
Examples