storage: migrate insta2spotify off proxmox-lvm to NFS (LUN relief, Phase 1)
Config-only PVC (no embedded DB), preflighted. Frees one proxmox-csi slot. NB: pod reschedule re-pulled the 3.26GB backend image (~6min stall) — large-image services incur a pull-delay blip when migration moves them to a fresh node. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
355ca3ee91
commit
1b9d4f1233
1 changed files with 11 additions and 28 deletions
|
|
@ -46,33 +46,16 @@ resource "kubernetes_manifest" "external_secret" {
|
||||||
depends_on = [kubernetes_namespace.insta2spotify]
|
depends_on = [kubernetes_namespace.insta2spotify]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "kubernetes_persistent_volume_claim" "data_proxmox" {
|
# Data on NFS. Migrated off proxmox-lvm 2026-06-05 (Phase 1, LUN relief) —
|
||||||
wait_until_bound = false
|
# insta2spotify is config-only, no embedded DB. See
|
||||||
metadata {
|
# docs/plans/2026-06-05-block-storage-harden-nfs-design.md
|
||||||
name = "insta2spotify-data-proxmox"
|
module "nfs_insta2spotify" {
|
||||||
namespace = kubernetes_namespace.insta2spotify.metadata[0].name
|
source = "../../modules/kubernetes/nfs_volume"
|
||||||
annotations = {
|
name = "insta2spotify-data-nfs"
|
||||||
"resize.topolvm.io/threshold" = "10%"
|
namespace = kubernetes_namespace.insta2spotify.metadata[0].name
|
||||||
"resize.topolvm.io/increase" = "100%"
|
nfs_server = var.nfs_server
|
||||||
"resize.topolvm.io/storage_limit" = "5Gi"
|
nfs_path = "/srv/nfs/insta2spotify"
|
||||||
}
|
storage = "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]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "kubernetes_deployment" "insta2spotify" {
|
resource "kubernetes_deployment" "insta2spotify" {
|
||||||
|
|
@ -203,7 +186,7 @@ resource "kubernetes_deployment" "insta2spotify" {
|
||||||
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_insta2spotify.claim_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue