From 9fd55de2b5122912050e133ccf8044d7d16a015f Mon Sep 17 00:00:00 2001 From: Lumpiasty Date: Mon, 3 Feb 2025 02:15:41 +0100 Subject: [PATCH] Install openebs --- Makefile | 2 +- infra/openebs/Makefile | 4 ++++ infra/openebs/values.yml | 35 +++++++++++++++++++++++++++++++++++ talos/patches/openebs.patch | 27 +++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 infra/openebs/Makefile create mode 100644 infra/openebs/values.yml create mode 100644 talos/patches/openebs.patch diff --git a/Makefile b/Makefile index 478f08e..d7e63fd 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ install-router: gen-talos-config: mkdir -p talos/generated - talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --config-patch @talos/patches/zoma-dibaiyin.patch --output-types controlplane -o talos/generated/zoma-dibaiyin.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443 + talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --config-patch @talos/patches/openebs.patch --config-patch @talos/patches/zoma-dibaiyin.patch --output-types controlplane -o talos/generated/zoma-dibaiyin.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443 talosctl gen config --with-secrets secrets.yaml --config-patch @talos/patches/controlplane.patch --output-types worker -o talos/generated/worker.yaml homelab https://kube-api.homelab.lumpiasty.xyz:6443 talosctl gen config --with-secrets secrets.yaml --output-types talosconfig -o talos/generated/talosconfig homelab https://kube-api.homelab.lumpiasty.xyz:6443 talosctl config endpoint kube-api.homelab.lumpiasty.xyz diff --git a/infra/openebs/Makefile b/infra/openebs/Makefile new file mode 100644 index 0000000..244d921 --- /dev/null +++ b/infra/openebs/Makefile @@ -0,0 +1,4 @@ +install: + helm repo add openebs https://openebs.github.io/openebs + helm repo update openebs + helm upgrade -i -n openebs --create-namespace openebs openebs/openebs -f values.yml \ No newline at end of file diff --git a/infra/openebs/values.yml b/infra/openebs/values.yml new file mode 100644 index 0000000..4a85a4b --- /dev/null +++ b/infra/openebs/values.yml @@ -0,0 +1,35 @@ +zfs-localpv: + cidrs: + zfsLocalPv: + enabled: false + +lvm-localpv: + crds: + lmvLocalPv: + enabled: false + +mayastor: + csi: + node: + initContainers: + # We need to disable the init container that checks for the nvme_tcp module, since Talos has that module built-in. + # https://www.talos.dev/v1.9/kubernetes-guides/configuration/storage/#deploy-mayastor + enabled: false + etcd: + clusterDomain: homelab.lumpiasty.xyz + # Single node cluster for now + replicaCount: 1 + io_engine: + # Workaround for crashing io-engine + # https://github.com/openebs/mayastor/issues/1763#issuecomment-2481922234 + envcontext: "iova-mode=pa" + +engines: + local: + lvm: + enabled: false + zfs: + enabled: false + replicated: + mayastor: + enabled: true diff --git a/talos/patches/openebs.patch b/talos/patches/openebs.patch new file mode 100644 index 0000000..439e3d9 --- /dev/null +++ b/talos/patches/openebs.patch @@ -0,0 +1,27 @@ +# Mayastor requirements +# https://www.talos.dev/v1.9/kubernetes-guides/configuration/storage/#openebs-mayastor-replicated-storage +machine: + sysctls: + vm.nr_hugepages: "2048" + nodeLabels: + openebs.io/engine: "mayastor" + kubelet: + extraMounts: + - destination: /var/local + type: bind + source: /var/local + options: + - bind + - rshared + - rw + +cluster: + apiServer: + admissionControl: + - name: PodSecurity + configuration: + apiVersion: pod-security.admission.config.k8s.io/v1beta1 + kind: PodSecurityConfiguration + exemptions: + namespaces: + - openebs