commit 5f4a12a769cb791d0b440d1f5dd3154203392c7f
parent 569a859b57e2b1540c76e7dbf649116b36fe7c32
Author: Andreas Gruhler <agruhl@gmx.ch>
Date: Sat, 25 Oct 2025 21:10:09 +0200
feat(rocketduck): rename and fix small diff to nfs
Diffstat:
4 files changed, 98 insertions(+), 101 deletions(-)
diff --git a/hcl/infra/nfs/plugin-nfs-controller.nomad b/hcl/infra/nfs/plugin-nfs-controller.nomad
@@ -1,52 +0,0 @@
-# https://gitlab.com/rocketduck/csi-plugin-nfs/-/blob/main/nomad/controller.nomad
-
-variable "affinity_node" {
- type = string
- default = "na"
- description = "Prefer to schedule controller on this node. If no nodes match, placement is still successful."
-}
-
-job "plugin-nfs-controller" {
- datacenters = ["dc1"]
-
- affinity {
- attribute = "${node.unique.name}"
- value = var.affinity_node
- }
-
- priority = 100
-
- group "controller" {
- task "plugin" {
- driver = "podman"
-
- config {
- image = "registry.gitlab.com/rocketduck/csi-plugin-nfs:1.1.0"
- force_pull = true
-
- args = [
- "--type=controller",
- "--nodeid=${attr.unique.hostname}",
- "--nfs-server=turris.lan:/srv/nfs",
- "--mount-options=defaults",
- ]
-
- # required so the mount works even after stopping the container
- network_mode = "host"
- #privileged = true
- }
-
- csi_plugin {
- id = "nfs"
- type = "controller"
- mount_dir = "/csi"
- }
-
- resources {
- memory = 256
- memory_max = 512
- cpu = 500
- }
- }
- }
-}
diff --git a/hcl/infra/nfs/plugin-nfs-nodes.nomad b/hcl/infra/nfs/plugin-nfs-nodes.nomad
@@ -1,49 +0,0 @@
-# https://gitlab.com/rocketduck/csi-plugin-nfs/-/blob/main/nomad/node.nomad
-
-job "plugin-nfs-nodes" {
- datacenters = ["dc1"]
-
- # you can run node plugins as service jobs as well, but this ensures
- # that all nodes in the DC have a copy.
- type = "system"
-
- priority = 100
-
- group "nodes" {
- task "plugin" {
- driver = "podman"
-
- config {
- image = "registry.gitlab.com/rocketduck/csi-plugin-nfs:1.1.0"
- force_pull = true
-
- args = [
- "--type=node",
- "--nodeid=${attr.unique.hostname}",
- "--nfs-server=turris.lan:/srv/nfs",
- "--mount-options=defaults",
- ]
-
- # required so the mount works even after stopping the container
- network_mode = "host"
-
- # node plugins must run as privileged jobs because they
- # mount disks to the host
- privileged = true
- }
-
- csi_plugin {
- id = "nfs"
- type = "node"
- mount_dir = "/csi"
- }
-
- resources {
- memory = 256
- memory_max = 512
- cpu = 500
- }
- }
- }
-}
-
diff --git a/hcl/infra/nfs/plugin-rocketduck-controller.nomad b/hcl/infra/nfs/plugin-rocketduck-controller.nomad
@@ -0,0 +1,52 @@
+# https://gitlab.com/rocketduck/csi-plugin-nfs/-/blob/main/nomad/controller.nomad
+
+variable "affinity_node" {
+ type = string
+ default = "na"
+ description = "Prefer to schedule controller on this node. If no nodes match, placement is still successful."
+}
+
+job "plugin-rocketduck-controller" {
+ datacenters = ["dc1"]
+
+ affinity {
+ attribute = "${node.unique.name}"
+ value = var.affinity_node
+ }
+
+ priority = 100
+
+ group "controller" {
+ task "plugin" {
+ driver = "podman"
+
+ config {
+ image = "registry.gitlab.com/rocketduck/csi-plugin-nfs:1.1.0"
+ force_pull = true
+
+ args = [
+ "--type=controller",
+ "--node-id=${attr.unique.hostname}",
+ "--nfs-server=turris.lan:/",
+ "--mount-options=nolock,nfsvers=4,defaults",
+ ]
+
+ # required so the mount works even after stopping the container
+ network_mode = "host"
+ privileged = true
+ }
+
+ csi_plugin {
+ id = "rocketduck"
+ type = "controller"
+ mount_dir = "/csi"
+ }
+
+ resources {
+ memory = 256
+ memory_max = 512
+ cpu = 500
+ }
+ }
+ }
+}
diff --git a/hcl/infra/nfs/plugin-rocketduck-nodes.nomad b/hcl/infra/nfs/plugin-rocketduck-nodes.nomad
@@ -0,0 +1,46 @@
+# https://gitlab.com/rocketduck/csi-plugin-nfs/-/blob/main/nomad/node.nomad
+
+job "plugin-rocketduck-nodes" {
+ datacenters = ["dc1"]
+
+ # you can run node plugins as service jobs as well, but this ensures
+ # that all nodes in the DC have a copy.
+ type = "system"
+
+ priority = 100
+
+ group "nodes" {
+ task "plugin" {
+ driver = "podman"
+
+ config {
+ image = "registry.gitlab.com/rocketduck/csi-plugin-nfs:1.1.0"
+ force_pull = true
+
+ args = [
+ "--type=node",
+ "--node-id=${attr.unique.hostname}",
+ "--nfs-server=turris.lan:/",
+ "--mount-options=nolock,nfsvers=4,defaults",
+ ]
+
+ # required so the mount works even after stopping the container
+ network_mode = "host"
+ privileged = true
+ }
+
+ csi_plugin {
+ id = "rocketduck"
+ type = "node"
+ mount_dir = "/csi"
+ }
+
+ resources {
+ memory = 256
+ memory_max = 512
+ cpu = 500
+ }
+ }
+ }
+}
+