Skip to content

Commit

Permalink
docs: CSI mount_options are available only for filesystem vols (#9043)
Browse files Browse the repository at this point in the history
The CSI specification allows only the `file-system` attachment mode to have
mount options. The `block-device` mode is left "intentionally empty, for now"
in the protocol. We should be validating against this problem, but our
documentation also had it backwards.

Also adds missing mount_options on group volume.
  • Loading branch information
tgross authored Oct 8, 2020
1 parent 99b9a8d commit 9d1efd5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
18 changes: 10 additions & 8 deletions website/pages/docs/commands/volume/register.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ context {
single-node modes. Consult the documentation of the storage provider
and CSI plugin.

- `attachment_mode` `(string: <required>)` - The storage API that will
be used by the volume. Most storage providers will support
`"file-system"`, to mount pre-formatted file system volumes. Some
storage providers will support `"block-device"`, which will require
the job be configured with appropriate mount options.

- `mount_options` <code>([mount_options][]:nil)</code> - Options for
mounting `block-device`volumes without a pre-formatted file system.
- `attachment_mode` `(string: <required>)` - The storage API that will be used
by the volume. Most storage providers will support `"file-system"`, to mount
volumes using the CSI filesystem API. Some storage providers will support
`"block-device"`, which will mount the volume with the CSI block device API
within the container.

- `mount_options` - Options for mounting `file-system` volumes that don't
already have a pre-formatted file system. Consult the documentation for your
storage provider and CSI plugin as to whether these options are required or
neccessary.

- `fs_type`: file system type (ex. `"ext4"`)
- `mount_flags`: the flags passed to `mount` (ex. `"ro,noatime"`)
Expand Down
13 changes: 13 additions & 0 deletions website/pages/docs/job-specification/volume.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,20 @@ the [volume_mount][volume_mount] stanza in the `task` configuration.
used for validating `host_volume` ACLs and for scheduling when a
matching `host_volume` requires `read_only` usage.

- `mount_options` - Options for mounting CSI volumes that have the
`file-system` [attachment mode]. These options override the `mount_options`
field from [volume registration]. Consult the documentation for your storage
provider and CSI plugin as to whether these options are required or
neccessary.

- `fs_type`: file system type (ex. `"ext4"`)
- `mount_flags`: the flags passed to `mount` (ex. `"ro,noatime"`)


[volume_mount]: /docs/job-specification/volume_mount 'Nomad volume_mount Job Specification'
[host_volume]: /docs/configuration/client#host_volume-stanza
[csi_volume]: /docs/commands/volume/register
[csi_plugin]: /docs/job-specification/csi_plugin
[csi_volume]: /docs/commands/volume/register
[attachment mode]: /docs/commands/volume/register#attachment_mode
[volume registration]: /docs/commands/volume/register#mount_options

0 comments on commit 9d1efd5

Please sign in to comment.