Compare commits

..

1 Commits

Author SHA1 Message Date
949cc2199b 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.
2023-03-03 10:41:56 +01:00
7 changed files with 24 additions and 8 deletions

View File

@ -4,3 +4,6 @@ updates:
directory: "/"
schedule:
interval: weekly
pull-request-branch-name:
separator: "-"
open-pull-requests-limit: 3

View File

@ -4,8 +4,6 @@ Notable changes between versions.
## Latest
## v1.26.2
* Kubernetes [v1.26.2](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.26.md#v1262)
* Update Cilium from v1.12.5 to [v1.12.6](https://github.com/cilium/cilium/releases/tag/v1.12.6)
* Update flannel from v0.20.2 to [v0.21.2](https://github.com/flannel-io/flannel/releases/tag/v0.21.2)
@ -14,10 +12,6 @@ Notable changes between versions.
* Add a `worker` module to allow customizing individual worker nodes ([#1295](https://github.com/poseidon/typhoon/pull/1295))
### Known Issues
* Fedora CoreOS [issue](https://github.com/coreos/fedora-coreos-tracker/issues/1423) fix is progressing through channels
## v1.26.1
* Kubernetes [v1.26.1](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.26.md#v1261)

View File

@ -73,6 +73,20 @@ variable "worker_node_taints" {
default = {}
}
variable "worker_bind_devices" {
type = list(object({
source = string
target = string
}))
description = <<EOD
List of devices to bind on kubelet container for direct storage usage
[
{ source = "/dev/sdb", target = "/dev/sdb" },
{ source = "/dev/sdc", target = "/dev/sdc" }
]
EOD
}
# configuration
variable "k8s_domain_name" {

View File

@ -77,6 +77,9 @@ systemd:
--register-with-taints=${taint} \
%{~ endfor ~}
--node-labels=node.kubernetes.io/node
%{~ for device in compact(split(",", node_devices)) ~}
--device=${device.source}:${device.target}
%{~ endfor ~}
ExecStart=docker logs -f kubelet
ExecStop=docker stop kubelet
ExecStopPost=docker rm kubelet

View File

@ -81,6 +81,7 @@ data "ct_config" "worker" {
cluster_domain_suffix = var.cluster_domain_suffix
node_labels = join(",", var.node_labels)
node_taints = join(",", var.node_taints)
node_devices = var.node_devices
})
strict = true
snippets = var.snippets

View File

@ -22,6 +22,7 @@ module "workers" {
node_labels = lookup(var.worker_node_labels, var.workers[count.index].name, [])
node_taints = lookup(var.worker_node_taints, var.workers[count.index].name, [])
snippets = lookup(var.snippets, var.workers[count.index].name, [])
node_devices = lookup(var.worker_bind_devices, var.workers[count.index].name, [])
# optional
download_protocol = var.download_protocol

View File

@ -1,4 +1,4 @@
mkdocs==1.4.2
mkdocs-material==9.1.1
mkdocs-material==9.0.15
pygments==2.14.0
pymdown-extensions==9.10
pymdown-extensions==9.9.2