Files
NomadBackup/nomad_backup/jfs-node.hcl
2026-02-04 02:02:47 +00:00

65 lines
1.4 KiB
HCL

job "jfs-node" {
datacenters = ["dc1"]
type = "system"
group "nodes" {
network {
port "metrics" {
static = 9567
to = 8080
}
}
# Add this inside your "juicefs-plugin" task in jfs-node.nomad
service {
name = "juicefs-metrics"
port = "metrics" # References the static port 9567 defined in your network block
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}", # Better than hardcoded "test"
"--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"
AWS_REGION = "garage"
# 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"
}
}
}
}