plugin-rocketduck-nodes.nomad (1011B)
1 # https://gitlab.com/rocketduck/csi-plugin-nfs/-/blob/main/nomad/node.nomad 2 3 job "plugin-rocketduck-nodes" { 4 datacenters = ["dc1"] 5 6 # you can run node plugins as service jobs as well, but this ensures 7 # that all nodes in the DC have a copy. 8 type = "system" 9 10 priority = 100 11 12 group "nodes" { 13 task "plugin" { 14 driver = "podman" 15 16 config { 17 image = "registry.gitlab.com/rocketduck/csi-plugin-nfs:1.1.0" 18 force_pull = true 19 20 args = [ 21 "--type=node", 22 "--node-id=${attr.unique.hostname}", 23 "--nfs-server=turris.lan:/", 24 "--mount-options=nolock,nfsvers=4,defaults", 25 ] 26 27 # required so the mount works even after stopping the container 28 network_mode = "host" 29 privileged = true 30 } 31 32 csi_plugin { 33 id = "rocketduck" 34 type = "node" 35 mount_dir = "/csi" 36 } 37 38 resources { 39 memory = 256 40 memory_max = 512 41 cpu = 500 42 } 43 } 44 } 45 } 46