nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

plugin-nfs-nodes.nomad (889B)


      1 job "plugin-nfs-nodes" {
      2   datacenters = ["dc1"]
      3 
      4   # you can run node plugins as service jobs as well, but this ensures
      5   # that all nodes in the DC have a copy.
      6   type = "system"
      7 
      8   priority = 100
      9 
     10   group "nodes" {
     11     task "plugin" {
     12       driver = "podman"
     13 
     14       config {
     15         image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest"
     16         force_pull = true
     17 
     18         args = [
     19           "--v=5",
     20           "--nodeid=${attr.unique.hostname}",
     21           "--endpoint=unix:///csi/csi.sock",
     22           "--drivername=nfs.csi.k8s.io"
     23         ]
     24 
     25         # node plugins must run as privileged jobs because they
     26         # mount disks to the host
     27         privileged = true
     28       }
     29 
     30       csi_plugin {
     31         id        = "nfs"
     32         type      = "node"
     33         mount_dir = "/csi"
     34       }
     35 
     36       resources {
     37         memory = 256
     38         memory_max = 512
     39         cpu    = 500
     40       }
     41     }
     42   }
     43 }
     44