feat(storage): migrate 12 SQLite NFS PVCs to proxmox-lvm (Wave 1)

Add proxmox-lvm PVCs with pvc-autoresizer annotations for all
SQLite-backed services. Deployments updated to use new block storage
PVCs. Old NFS modules retained for 1-week rollback.

Services: ntfy, freshrss, insta2spotify, actualbudget (x3),
wealthfolio, navidrome (DB only), audiobookshelf config,
headscale, forgejo, uptime-kuma.

Also: set Recreate strategy on ntfy, forgejo, insta2spotify,
wealthfolio (required for RWO volumes).
This commit is contained in:
Viktor Barzin 2026-04-04 16:26:59 +03:00
parent 792da5c066
commit ee39dd2fc9
10 changed files with 263 additions and 14 deletions

View file

@ -44,6 +44,28 @@ module "nfs_data" {
nfs_path = "/mnt/main/headscale"
}
resource "kubernetes_persistent_volume_claim" "data_proxmox" {
wait_until_bound = false
metadata {
name = "headscale-data-proxmox"
namespace = kubernetes_namespace.headscale.metadata[0].name
annotations = {
"resize.topolvm.io/threshold" = "80%"
"resize.topolvm.io/increase" = "100%"
"resize.topolvm.io/storage_limit" = "5Gi"
}
}
spec {
access_modes = ["ReadWriteOnce"]
storage_class_name = "proxmox-lvm"
resources {
requests = {
storage = "1Gi"
}
}
}
}
resource "kubernetes_deployment" "headscale" {
metadata {
name = "headscale"
@ -164,7 +186,7 @@ resource "kubernetes_deployment" "headscale" {
volume {
name = "nfs-config"
persistent_volume_claim {
claim_name = module.nfs_data.claim_name
claim_name = kubernetes_persistent_volume_claim.data_proxmox.metadata[0].name
}
}
# container {
@ -414,7 +436,7 @@ resource "kubernetes_cron_job_v1" "headscale_backup" {
volume {
name = "nfs-data"
persistent_volume_claim {
claim_name = module.nfs_data.claim_name
claim_name = kubernetes_persistent_volume_claim.data_proxmox.metadata[0].name
}
}
restart_policy = "OnFailure"