Files
NomadBackup/nomad_backup/jfs-node.hcl
2026-02-08 02:08:34 +00:00

63 lines
1.3 KiB
HCL

job "jfs-node" {
datacenters = ["dc1"]
type = "system"
group "nodes" {
network {
port "metrics" {
static = 9567
to = 8080
}
}
service {
name = "juicefs-metrics"
port = "metrics"
tags = ["prometheus"]
check {
type = "http"
path = "/metrics"
interval = "10s"
timeout = "2s"
}
}
task "juicefs-plugin" {
driver = "docker"
config {
image = "juicedata/juicefs-csi-driver:v0.31.1"
memory_hard_limit = 2048
ports = ["metrics"]
args = [
"--endpoint=unix://csi/csi.sock",
"--logtostderr",
"--v=5",
"--nodeid=${node.unique.name}",
"--by-process=true",
]
privileged = true
}
csi_plugin {
id = "juicefs0"
type = "node"
mount_dir = "/csi"
health_timeout = "3m"
}
resources {
cpu = 100
memory = 100
}
env {
POD_NAME = "csi-node"
POD_NAMESPACE = "default"
# Aggregates metrics from children onto the 8080 port
JFS_METRICS = "0.0.0.0:8080"
# Ensures mounts run as background processes managed by the driver
JFS_MOUNT_MODE = "process"
}
}
}
}