From 33ada11ec575685654a6def4710f8243894fe535 Mon Sep 17 00:00:00 2001 From: Bruce Becker Date: Fri, 27 Oct 2023 17:09:37 +0200 Subject: [PATCH] feat(csi): add a csi hostpath controller (#72) feat(csi): add a csi hostpath controller feat(csi): add volume definition for hostpath plugin Signed-off-by: Bruce Becker --------- Signed-off-by: Bruce Becker --- csi-hostpath-volume.nomad | 18 ++++++++++++++++++ csi-volume-hostpath.hcl | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 csi-hostpath-volume.nomad create mode 100644 csi-volume-hostpath.hcl diff --git a/csi-hostpath-volume.nomad b/csi-hostpath-volume.nomad new file mode 100644 index 0000000..4d1eebe --- /dev/null +++ b/csi-hostpath-volume.nomad @@ -0,0 +1,18 @@ +id = "consul-data" +namespace = "default" +name = "consul-data" +type = "csi" +plugin_id = "csi-hostpath" +external_id = "consul-data" +capacity_max = "1G" +capacity_min = "100M" + +capability { + access_mode = "single-node-writer" + attachment_mode = "file-system" +} + +mount_options { + fs_type = "ext4" + mount_flags = ["noatime"] +} diff --git a/csi-volume-hostpath.hcl b/csi-volume-hostpath.hcl new file mode 100644 index 0000000..27e06ce --- /dev/null +++ b/csi-volume-hostpath.hcl @@ -0,0 +1,25 @@ +id = "grafana" +name = "grafana" +type = "csi" +plugin_id = "csi-hostpath" + +capacity_min = "1MB" +capacity_max = "1GB" + +capability { + access_mode = "single-node-reader-only" + attachment_mode = "file-system" +} +capability { + access_mode = "multi-node-reader-only" + attachment_mode = "file-system" +} + +capability { + access_mode = "single-node-writer" + attachment_mode = "file-system" +} + +mount_options { + mount_flags = ["rw"] +}