storage: migrate changedetection off proxmox-lvm to NFS (LUN-cap relief)
changedetection uses a file-based JSON datastore (url-watches.json + per-watch dirs + brotli snapshots) — no embedded DB, NFS-safe. Frees one proxmox-csi SCSI-LUN slot. Part of harden-proxmox-csi+NFS plan. - swap changedetection-data-proxmox -> nfs_volume module - data copied + verified (HTTP 200, 4 watches loaded); excluded 200MB test cruft - block PVC removed; block LV retained per SC policy (code-dfjn cleanup) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
52f5de905d
commit
060aefbd0b
1 changed files with 11 additions and 28 deletions
|
|
@ -63,33 +63,16 @@ module "tls_secret" {
|
||||||
tls_secret_name = var.tls_secret_name
|
tls_secret_name = var.tls_secret_name
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "kubernetes_persistent_volume_claim" "data_proxmox" {
|
# Datastore on NFS. Migrated off proxmox-lvm 2026-06-05 for LUN-cap relief —
|
||||||
wait_until_bound = false
|
# changedetection uses a file-based JSON datastore (no embedded DB), NFS-safe.
|
||||||
metadata {
|
# See docs/plans/2026-06-05-block-storage-harden-nfs-design.md
|
||||||
name = "changedetection-data-proxmox"
|
module "nfs_changedetection" {
|
||||||
namespace = kubernetes_namespace.changedetection.metadata[0].name
|
source = "../../modules/kubernetes/nfs_volume"
|
||||||
annotations = {
|
name = "changedetection-data-nfs"
|
||||||
"resize.topolvm.io/threshold" = "10%"
|
namespace = kubernetes_namespace.changedetection.metadata[0].name
|
||||||
"resize.topolvm.io/increase" = "100%"
|
nfs_server = var.nfs_server
|
||||||
"resize.topolvm.io/storage_limit" = "8Gi"
|
nfs_path = "/srv/nfs/changedetection"
|
||||||
}
|
storage = "8Gi"
|
||||||
}
|
|
||||||
spec {
|
|
||||||
access_modes = ["ReadWriteOnce"]
|
|
||||||
storage_class_name = "proxmox-lvm"
|
|
||||||
resources {
|
|
||||||
requests = {
|
|
||||||
storage = "4Gi"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "kubernetes_deployment" "changedetection" {
|
resource "kubernetes_deployment" "changedetection" {
|
||||||
|
|
@ -188,7 +171,7 @@ resource "kubernetes_deployment" "changedetection" {
|
||||||
volume {
|
volume {
|
||||||
name = "data"
|
name = "data"
|
||||||
persistent_volume_claim {
|
persistent_volume_claim {
|
||||||
claim_name = kubernetes_persistent_volume_claim.data_proxmox.metadata[0].name
|
claim_name = module.nfs_changedetection.claim_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue