mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
We can reduce the amount of volume specification configuration many users will need by setting a default capability on a dynamic host volume if none is set. The default capability will allow using the volume in read/write mode on its node, with no further restrictions except those that might be set in the jobspec.
30 lines
856 B
HCL
30 lines
856 B
HCL
id = "disk_prod_db1"
|
|
namespace = "default"
|
|
name = "database"
|
|
type = "host"
|
|
plugin_id = "plugin_id"
|
|
|
|
# Optional: for 'nomad volume create', specify a maximum and minimum capacity.
|
|
# Registering an existing volume will record but ignore these fields.
|
|
capacity_min = "10GiB"
|
|
capacity_max = "20G"
|
|
|
|
# Optional: for 'nomad volume create', specify one or more capabilities to
|
|
# validate. Registering an existing volume will record but ignore these fields.
|
|
# If omitted, the single-node-writer + file-system capability will be used as a
|
|
# default.
|
|
capability {
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
capability {
|
|
access_mode = "single-node-reader"
|
|
attachment_mode = "block-device"
|
|
}
|
|
|
|
# Optional: provide a map of keys to string values expected by the plugin.
|
|
parameters {
|
|
skuname = "Premium_LRS"
|
|
}
|