From a2b410f6c9751428aeaa31711e41ccf55e1da5b7 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Tue, 26 May 2026 02:36:20 +0000 Subject: [PATCH] resume: migrate PVC from proxmox-lvm to NFS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wave 1 LUN-cap relief. Reactive Resume stores user-uploaded PDFs + 3 .txt counters under uploads/ and statistics/ — no embedded DB, 112K of data. Service is at replicas=0 (browserless OOM scaledown, unrelated to this work) so the migration was no-downtime. Net: -1 SCSI LUN once resume is brought back up. --- stacks/resume/main.tf | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/stacks/resume/main.tf b/stacks/resume/main.tf index 6468c5f2..e059be33 100644 --- a/stacks/resume/main.tf +++ b/stacks/resume/main.tf @@ -170,33 +170,14 @@ resource "kubernetes_service" "printer" { } } -resource "kubernetes_persistent_volume_claim" "data_proxmox" { - wait_until_bound = false - metadata { - name = "resume-data-proxmox" - namespace = kubernetes_namespace.resume.metadata[0].name - annotations = { - "resize.topolvm.io/threshold" = "10%" - "resize.topolvm.io/increase" = "100%" - "resize.topolvm.io/storage_limit" = "5Gi" - } - } - spec { - access_modes = ["ReadWriteOnce"] - storage_class_name = "proxmox-lvm" - resources { - requests = { - storage = "1Gi" - } - } - } - lifecycle { - # The autoresizer expands requests.storage up to storage_limit and - # PVCs can't shrink. Without this, every TF apply tries to revert - # to the spec value, K8s rejects the shrink, and the PVC ends up - # in Terminating-but-in-use limbo. - ignore_changes = [spec[0].resources[0].requests] - } +module "nfs_data_host" { + source = "../../modules/kubernetes/nfs_volume" + name = "resume-data-host" + namespace = kubernetes_namespace.resume.metadata[0].name + nfs_server = var.nfs_server + nfs_path = "/srv/nfs/resume" + storage = "1Gi" + access_modes = ["ReadWriteOnce"] } # Reactive Resume app @@ -339,7 +320,7 @@ resource "kubernetes_deployment" "resume" { volume { name = "data" persistent_volume_claim { - claim_name = kubernetes_persistent_volume_claim.data_proxmox.metadata[0].name + claim_name = module.nfs_data_host.claim_name } } }