48 lines
1.1 KiB
Smarty
48 lines
1.1 KiB
Smarty
job "democratic-csi-controller" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "iscsi" {
|
|
|
|
task "iscsi-controller" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "[[ .democratic_csi_freenas_api.image ]]"
|
|
args = [
|
|
"--csi-version=1.5.0",
|
|
"--csi-name=org.democratic-csi.iscsi",
|
|
"--driver-config-file=${NOMAD_SECRETS_DIR}/config.yml",
|
|
"--log-level=info",
|
|
"--csi-mode=controller",
|
|
"--server-socket=/csi/csi.sock"
|
|
]
|
|
|
|
network_mode = "host"
|
|
privileged = true
|
|
userns_mode = "host"
|
|
}
|
|
|
|
template {
|
|
data =<<-EOF
|
|
[[ fileContents "files/iscsi/controller.yml.tpl" ]]
|
|
EOF
|
|
destination = "${NOMAD_SECRETS_DIR}/config.yml"
|
|
}
|
|
|
|
csi_plugin {
|
|
# must match --csi-name arg
|
|
id = "org.democratic-csi.iscsi"
|
|
type = "controller"
|
|
mount_dir = "/csi"
|
|
}
|
|
|
|
resources {
|
|
cpu = [[ .democratic_csi_freenas_api.resources.cpu ]]
|
|
memory = [[ .democratic_csi_freenas_api.resources.memory ]]
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|