nomad

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

plugin-nfs-controller.nomad (923B)


      1 variable "affinity_node" {
      2   type        = string
      3   default     = "na"
      4   description = "Prefer to schedule controller on this node. If no nodes match, placement is still successful."
      5 }
      6 
      7 job "plugin-nfs-controller" {
      8   datacenters = ["dc1"]
      9 
     10   affinity {
     11     attribute = "${node.unique.name}"
     12     value     = var.affinity_node
     13   }
     14 
     15   priority = 100
     16 
     17   group "controller" {
     18     task "plugin" {
     19       driver = "podman"
     20 
     21       config {
     22         image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest"
     23         force_pull = true
     24 
     25         args = [
     26           "--v=5",
     27           "--nodeid=${attr.unique.hostname}",
     28           "--endpoint=unix:///csi/csi.sock",
     29           "--drivername=nfs.csi.k8s.io"
     30         ]
     31       }
     32 
     33       csi_plugin {
     34         id        = "nfs"
     35         type      = "controller"
     36         mount_dir = "/csi"
     37       }
     38 
     39       resources {
     40         memory = 256
     41         memory_max = 512
     42         cpu    = 500
     43       }
     44     }
     45   }
     46 }