From 766e15b326d71e6eeadea954043ccf3b244f6e3e Mon Sep 17 00:00:00 2001 From: main Date: Thu, 27 Oct 2022 11:38:38 +0200 Subject: [PATCH] Switch to democratic CSI driver Signed-off-by: main --- nomad/modules/nfs/controller.hcl | 36 +++++++++++------ nomad/modules/nfs/node.hcl | 48 ++++++++++++++++------- nomad/regions/do-1/ingress.tf | 4 +- nomad/regions/homelab-1/home-assistant.tf | 18 ++++++--- nomad/regions/homelab-1/jellyfin.tf | 18 ++++++--- nomad/regions/homelab-1/syncthing.tf | 18 ++++++--- 6 files changed, 98 insertions(+), 44 deletions(-) diff --git a/nomad/modules/nfs/controller.hcl b/nomad/modules/nfs/controller.hcl index 87b5bb4..a19d36e 100644 --- a/nomad/modules/nfs/controller.hcl +++ b/nomad/modules/nfs/controller.hcl @@ -6,7 +6,7 @@ variable "datacenters" { type = list(string) } -job "nfs-controller" { +job "democratic-csi-nfs-controller" { datacenters = var.datacenters region = var.region @@ -15,23 +15,37 @@ job "nfs-controller" { driver = "docker" config { - image = "mcr.microsoft.com/k8s/csi/nfs-csi:latest" + image = "docker.io/democraticcsi/democratic-csi:latest" - args = [ - "--endpoint=unix://csi/csi.sock", - "-v=5", - ] + args = [ + "--csi-version=1.5.0", + # must match the csi_plugin.id attribute below + "--csi-name=org.democratic-csi.nfs", + "--driver-config-file=${NOMAD_TASK_DIR}/driver-config-file.yaml", + "--log-level=info", + "--csi-mode=controller", + "--server-socket=/csi/csi.sock", + ] + } + + template { + destination = "${NOMAD_TASK_DIR}/driver-config-file.yaml" + + data = <