From a13865213f0c11d8840d51e8d49a8cd148310e00 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Thu, 15 Jun 2023 23:05:57 +0200 Subject: [PATCH] Add terranix config for nfs-csi container Signed-off-by: Magic_RB --- terranix/containers/nfs-csi/controller.hcl | 47 +++++++++++++++++ terranix/containers/nfs-csi/default.nix | 26 ++++++++++ terranix/containers/nfs-csi/node.hcl | 59 ++++++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 terranix/containers/nfs-csi/controller.hcl create mode 100644 terranix/containers/nfs-csi/default.nix create mode 100644 terranix/containers/nfs-csi/node.hcl diff --git a/terranix/containers/nfs-csi/controller.hcl b/terranix/containers/nfs-csi/controller.hcl new file mode 100644 index 0000000..74355a8 --- /dev/null +++ b/terranix/containers/nfs-csi/controller.hcl @@ -0,0 +1,47 @@ +variable "datacenters" { + type = list(string) +} + +job "democratic-csi-nfs-controller" { + datacenters = var.datacenters + + group "controller" { + task "plugin" { + driver = "docker" + + config { + image = "docker.io/democraticcsi/democratic-csi:latest" + + 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 = <