isponsorblocktv: migrate data PVC proxmox-lvm -> NFS (node6 LUN relief, code-dfjn)
Frees a per-node SCSI-LUN slot on node6 (21->20). Volume holds only config.json (no embedded DB) -> NFS-safe. config pre-seeded to /srv/nfs/isponsorblocktv before cutover. RWO-destroy deadlock during apply (TF deleting the in-use old PVC before rolling the deployment) was broken by patching the deployment claim to the NFS PVC; TF reconciled to the same value.
This commit is contained in:
parent
9858a1c44b
commit
e2d46ebd30
1 changed files with 12 additions and 29 deletions
|
|
@ -17,34 +17,17 @@ resource "kubernetes_namespace" "isponsorblocktv" {
|
||||||
# Before running, setup config using
|
# Before running, setup config using
|
||||||
# docker run --rm -it -v ./youtube:/app/data -e TERM=$TERM -e COLORTERM=$COLORTERM ghcr.io/dmunozv04/isponsorblocktv --setup
|
# docker run --rm -it -v ./youtube:/app/data -e TERM=$TERM -e COLORTERM=$COLORTERM ghcr.io/dmunozv04/isponsorblocktv --setup
|
||||||
|
|
||||||
resource "kubernetes_persistent_volume_claim" "data_proxmox" {
|
# Migrated proxmox-lvm -> NFS (2026-06-04) to free a per-node SCSI-LUN slot
|
||||||
wait_until_bound = false
|
# (node6 LUN-cap relief, beads code-dfjn). The volume holds only config.json
|
||||||
metadata {
|
# (no embedded DB), so NFS is safe. Data pre-seeded to /srv/nfs/isponsorblocktv.
|
||||||
name = "isponsorblocktv-data-proxmox"
|
module "nfs_data" {
|
||||||
|
source = "../../modules/kubernetes/nfs_volume"
|
||||||
|
name = "isponsorblocktv-data"
|
||||||
namespace = kubernetes_namespace.isponsorblocktv.metadata[0].name
|
namespace = kubernetes_namespace.isponsorblocktv.metadata[0].name
|
||||||
annotations = {
|
nfs_server = var.nfs_server
|
||||||
"resize.topolvm.io/threshold" = "10%"
|
nfs_path = "/srv/nfs/isponsorblocktv"
|
||||||
"resize.topolvm.io/increase" = "100%"
|
|
||||||
"resize.topolvm.io/storage_limit" = "5Gi"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spec {
|
|
||||||
access_modes = ["ReadWriteOnce"]
|
|
||||||
storage_class_name = "proxmox-lvm"
|
|
||||||
resources {
|
|
||||||
requests = {
|
|
||||||
storage = "1Gi"
|
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]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Mute and skip ads for vermont smart tv
|
# Mute and skip ads for vermont smart tv
|
||||||
resource "kubernetes_deployment" "isponsorblocktv-vermont" {
|
resource "kubernetes_deployment" "isponsorblocktv-vermont" {
|
||||||
|
|
@ -93,7 +76,7 @@ resource "kubernetes_deployment" "isponsorblocktv-vermont" {
|
||||||
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_data.claim_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue