Add Ansible storage role for NVMe setup and Longhorn dual-disk config

Automates LV expansion, NVMe mount, and Longhorn node disk tagging
(hdd/nvme) via Ansible instead of Kustomize-managed manifests.
This commit is contained in:
Julia McGhee
2026-03-21 13:19:04 +00:00
parent 3b8fd4afd2
commit c6ce40a557
5 changed files with 99 additions and 1 deletions

View File

@@ -4,4 +4,3 @@ resources:
- application.yaml
- namespace.yaml
- servicemonitor.yaml
- node-disks.yaml

View File

@@ -0,0 +1,26 @@
# Patches the Longhorn Node to configure two disks with tags:
# - default-disk (HDD at /var/lib/longhorn/) tagged "hdd"
# - nvme-disk (NVMe at /mnt/nvme-storage/longhorn/) tagged "nvme"
#
# Apply after Longhorn is running and the NVMe is mounted:
# kubectl apply -f node-disks.yaml
apiVersion: longhorn.io/v1beta2
kind: Node
metadata:
name: catherby
namespace: longhorn-system
spec:
allowScheduling: true
disks:
hdd:
allowScheduling: true
path: /var/lib/longhorn/
storageReserved: 32212254720 # 30Gi reserved for system
tags:
- hdd
nvme:
allowScheduling: true
path: /mnt/nvme-storage/longhorn/
storageReserved: 10737418240 # 10Gi reserved
tags:
- nvme