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]
|
||||
}
|
||||
|
||||
resource "kubernetes_persistent_volume_claim" "data_proxmox" {
|
||||
wait_until_bound = false
|
||||
metadata {
|
||||
name = "insta2spotify-data-proxmox"
|
||||
namespace = kubernetes_namespace.insta2spotify.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]
|
||||
}
|
||||
# Data on NFS. Migrated off proxmox-lvm 2026-06-05 (Phase 1, LUN relief) —
|
||||
# insta2spotify is config-only, no embedded DB. See
|
||||
# docs/plans/2026-06-05-block-storage-harden-nfs-design.md
|
||||
module "nfs_insta2spotify" {
|
||||
source = "../../modules/kubernetes/nfs_volume"
|
||||
name = "insta2spotify-data-nfs"
|
||||
namespace = kubernetes_namespace.insta2spotify.metadata[0].name
|
||||
nfs_server = var.nfs_server
|
||||
nfs_path = "/srv/nfs/insta2spotify"
|
||||
storage = "5Gi"
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "insta2spotify" {
|
||||
|
|
@ -203,7 +186,7 @@ resource "kubernetes_deployment" "insta2spotify" {
|
|||
volume {
|
||||
name = "data"
|
||||
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