2022-07-30 23:27:40 +02:00
|
|
|
variable "region" {
|
2022-06-01 08:41:51 +02:00
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
2022-07-30 23:27:40 +02:00
|
|
|
variable "datacenters" {
|
|
|
|
type = list(string)
|
2022-06-01 08:41:51 +02:00
|
|
|
}
|
|
|
|
|
2022-10-27 11:38:38 +02:00
|
|
|
job "democratic-csi-nfs-controller" {
|
2022-07-30 23:27:40 +02:00
|
|
|
datacenters = var.datacenters
|
|
|
|
region = var.region
|
2021-05-02 15:59:38 +02:00
|
|
|
|
|
|
|
group "controller" {
|
|
|
|
task "plugin" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
2022-10-27 11:38:38 +02:00
|
|
|
image = "docker.io/democraticcsi/democratic-csi:latest"
|
2021-05-02 15:59:38 +02:00
|
|
|
|
2022-10-27 11:38:38 +02:00
|
|
|
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
|
2021-05-02 15:59:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
csi_plugin {
|
2022-10-27 11:38:38 +02:00
|
|
|
# must match --csi-name arg
|
|
|
|
id = "org.democratic-csi.nfs"
|
|
|
|
type = "controller"
|
|
|
|
mount_dir = "/csi"
|
2021-05-02 15:59:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2022-10-27 11:38:38 +02:00
|
|
|
cpu = 500
|
|
|
|
memory = 256
|
2021-05-02 15:59:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|