From 949cc2199b677d649c48f49cf972dc61e61d21c3 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Fri, 3 Mar 2023 10:41:56 +0100 Subject: [PATCH] Add support for devince binding In some cases we need to use block devices directly (Physical volume storage). This new variable allows the user to mount devices with the --device option for flatcar baremetal. How to use : add a list of objects like this to the cluster definition : worker_bind_devices = [ { source = "/dev/sdb" target = "/dev/sdb" }, { source = "/dev/sdc" target = "/dev/sdd" }, { source = "/dev/sdd" target = "/dev/sdd" } ] This will bind the source device on the target directory in evry node. --- bare-metal/flatcar-linux/kubernetes/variables.tf | 14 ++++++++++++++ .../kubernetes/worker/butane/worker.yaml | 3 +++ .../flatcar-linux/kubernetes/worker/matchbox.tf | 1 + bare-metal/flatcar-linux/kubernetes/workers.tf | 1 + 4 files changed, 19 insertions(+) diff --git a/bare-metal/flatcar-linux/kubernetes/variables.tf b/bare-metal/flatcar-linux/kubernetes/variables.tf index 6623c038..f13ada35 100644 --- a/bare-metal/flatcar-linux/kubernetes/variables.tf +++ b/bare-metal/flatcar-linux/kubernetes/variables.tf @@ -73,6 +73,20 @@ variable "worker_node_taints" { default = {} } +variable "worker_bind_devices" { + type = list(object({ + source = string + target = string + })) + description = <