From 4130b78323d3b7f2710cd904c12b7c7f31febc5f Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Sat, 25 Jan 2025 15:14:44 -0500 Subject: [PATCH] more openebs conf --- flake.nix | 1 + hosts/k3s.nix | 5 +++++ k8s/config/openebs.yaml | 22 ++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/flake.nix b/flake.nix index d95044d..911cfbd 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ { networking.hostName = "lin-va-llama1"; disko.devices.disk.main.device = "/dev/sda"; + k8s.diskPoolID = "/dev/disk/by-id/unknown"; } ]; }; diff --git a/hosts/k3s.nix b/hosts/k3s.nix index 21c66ab..8e00a5e 100644 --- a/hosts/k3s.nix +++ b/hosts/k3s.nix @@ -1,6 +1,11 @@ { config, pkgs, ... }: { + imports = [ + ../k8s + ]; + k8s.manifestsDir = "/var/lib/rancher/k3s/server/manifests"; + # Enable Flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/k8s/config/openebs.yaml b/k8s/config/openebs.yaml index 2db8407..10e9913 100644 --- a/k8s/config/openebs.yaml +++ b/k8s/config/openebs.yaml @@ -37,3 +37,25 @@ metadata: spec: node: @nodeName@ disks: ["aio://@diskPoolID@"] +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: cstor-r1 +allowVolumeExpansion: true +parameters: + protocol: nvmf + repl: "1" +provisioner: io.openebs.csi-mayastor +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: mayastor-r1 + annotations: + storageclass.kubernetes.io/is-default-class: "true" +allowVolumeExpansion: true +parameters: + protocol: nvmf + repl: "1" +provisioner: io.openebs.csi-mayastor