mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-12 18:01:59 +01:00
48 lines
1,013 B
HCL
48 lines
1,013 B
HCL
|
variable "datacenters" {
|
||
|
type = list(string)
|
||
|
}
|
||
|
|
||
|
job "democratic-csi-nfs-controller" {
|
||
|
datacenters = var.datacenters
|
||
|
|
||
|
group "controller" {
|
||
|
task "plugin" {
|
||
|
driver = "docker"
|
||
|
|
||
|
config {
|
||
|
image = "docker.io/democraticcsi/democratic-csi:latest"
|
||
|
|
||
|
args = [
|
||
|
"--csi-version=1.5.0",
|
||
|
# must match the csi_plugin.id attribute below
|
||
|
"--csi-name=org.democratic-csi.nfs",
|
||
|
"--driver-config-file=${NOMAD_TASK_DIR}/driver-config-file.yaml",
|
||
|
"--log-level=info",
|
||
|
"--csi-mode=controller",
|
||
|
"--server-socket=/csi/csi.sock",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
template {
|
||
|
destination = "${NOMAD_TASK_DIR}/driver-config-file.yaml"
|
||
|
|
||
|
data = <<EOH
|
||
|
driver: node-manual
|
||
|
EOH
|
||
|
}
|
||
|
|
||
|
csi_plugin {
|
||
|
# must match --csi-name arg
|
||
|
id = "org.democratic-csi.nfs"
|
||
|
type = "controller"
|
||
|
mount_dir = "/csi"
|
||
|
}
|
||
|
|
||
|
resources {
|
||
|
cpu = 500
|
||
|
memory = 256
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|