From aa3640d74ce2e3619476453381909fa3520eb87d Mon Sep 17 00:00:00 2001 From: Michael Fornaro <20387402+xUnholy@users.noreply.github.com> Date: Tue, 4 Apr 2023 19:18:50 +1000 Subject: [PATCH] docs: update storage.md Update storage.md to use `machine.nodeLabels`. Signed-off-by: Noel Georgi --- .../configuration/storage.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/website/content/v1.4/kubernetes-guides/configuration/storage.md b/website/content/v1.4/kubernetes-guides/configuration/storage.md index ac188854f..e79c083c3 100644 --- a/website/content/v1.4/kubernetes-guides/configuration/storage.md +++ b/website/content/v1.4/kubernetes-guides/configuration/storage.md @@ -5,7 +5,7 @@ aliases: - ../../guides/storage --- -In Kubernetes, using storage in the right way is well-facilitated by the API. +In Kubernetes, using storage in the right way is well-facilitated by the API. However, unless you are running in a major public cloud, that API may not be hooked up to anything. This frequently sends users down a rabbit hole of researching all the various options for storage backends for their platform, for Kubernetes, and for their workloads. There are a _lot_ of options out there, and it can be fairly bewildering. @@ -85,16 +85,29 @@ This can be done with `talosctl patch machineconfig` or via config patches durin Some examples are shown below: modify as needed. +First create a config patch file named `mayastor-patch.yaml` with the following contents: + +```yaml +- op: add + path: /machine/sysctls + value: + vm.nr_hugepages: "1024" +- op: add + path: /machine/nodeLabels + value: + openebs.io/engine: mayastor +``` + Using gen config ```bash -talosctl gen config my-cluster https://mycluster.local:6443 --config-patch '[{"op": "add", "path": "/machine/sysctls", "value": {"vm.nr_hugepages": "1024"}}, {"op": "add", "path": "/machine/kubelet/extraArgs", "value": {"node-labels": "openebs.io/engine=mayastor"}}]' +talosctl gen config my-cluster https://mycluster.local:6443 --config-patch @mayastor-patch.yaml ``` Patching an existing node ```bash -talosctl patch --mode=no-reboot machineconfig -n --patch '[{"op": "add", "path": "/machine/sysctls", "value": {"vm.nr_hugepages": "1024"}}, {"op": "add", "path": "/machine/kubelet/extraArgs", "value": {"node-labels": "openebs.io/engine=mayastor"}}]' +talosctl patch --mode=no-reboot machineconfig -n --patch @mayastor-patch.yaml ``` > Note: If you are adding/updating the `vm.nr_hugepages` on a node which already had the `openebs.io/engine=mayastor` label set, you'd need to restart kubelet so that it picks up the new value, by issuing the following command