106 lines
2.4 KiB
HCL
106 lines
2.4 KiB
HCL
job "democratic-csi-local" {
|
|
datacenters = ["dc1"]
|
|
type = "system"
|
|
|
|
group "controller" {
|
|
count = 1
|
|
|
|
task "controller" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "democraticcsi/democratic-csi:latest"
|
|
|
|
args = [
|
|
"--csi-version=1.5.0",
|
|
"--csi-name=org.democratic-csi.local-hostpath",
|
|
"--driver-config-file=/config/driver-config-file.yaml",
|
|
"--log-level=info",
|
|
"--csi-mode=controller",
|
|
"--server-socket=/csi/csi.sock",
|
|
]
|
|
|
|
volumes = [
|
|
"local/config:/config:ro"
|
|
]
|
|
}
|
|
|
|
template {
|
|
data = <<-EOH
|
|
driver: local-hostpath
|
|
instance_id: {{ env "node.unique.id" }}
|
|
local-hostpath:
|
|
shareBasePath: "/tmp/democratic-csi-local-hostpath"
|
|
controllerBasePath: "/tmp/democratic-csi-local-hostpath"
|
|
dirPermissionsMode: "0755"
|
|
dirPermissionsUser: 0
|
|
dirPermissionsGroup: 0
|
|
EOH
|
|
destination = "local/config/driver-config-file.yaml"
|
|
}
|
|
|
|
csi_plugin {
|
|
id = "org.democratic-csi.local-hostpath"
|
|
type = "controller"
|
|
mount_dir = "/csi"
|
|
}
|
|
|
|
resources {
|
|
cpu = 256
|
|
memory = 128
|
|
}
|
|
}
|
|
}
|
|
|
|
group "nodes" {
|
|
task "node" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "democraticcsi/democratic-csi:latest"
|
|
|
|
args = [
|
|
"--csi-version=1.5.0",
|
|
"--csi-name=org.democratic-csi.local-hostpath",
|
|
"--driver-config-file=/config/driver-config-file.yaml",
|
|
"--log-level=info",
|
|
"--csi-mode=node",
|
|
"--server-socket=/csi/csi.sock",
|
|
]
|
|
|
|
privileged = true
|
|
|
|
volumes = [
|
|
"local/config:/config:ro",
|
|
"/tmp/democratic-csi-local-hostpath:/tmp/democratic-csi-local-hostpath:rshared"
|
|
]
|
|
}
|
|
|
|
template {
|
|
data = <<-EOH
|
|
driver: local-hostpath
|
|
instance_id: {{ env "node.unique.id" }}
|
|
local-hostpath:
|
|
shareBasePath: "/tmp/democratic-csi-local-hostpath"
|
|
controllerBasePath: "/tmp/democratic-csi-local-hostpath"
|
|
dirPermissionsMode: "0755"
|
|
dirPermissionsUser: 0
|
|
dirPermissionsGroup: 0
|
|
EOH
|
|
destination = "local/config/driver-config-file.yaml"
|
|
}
|
|
|
|
csi_plugin {
|
|
id = "org.democratic-csi.local-hostpath"
|
|
type = "node"
|
|
mount_dir = "/csi"
|
|
}
|
|
|
|
resources {
|
|
cpu = 256
|
|
memory = 128
|
|
}
|
|
}
|
|
}
|
|
}
|