f1-stream: migrate PVC from proxmox-lvm to NFS
Wave 1 LUN-cap relief. The PVC stores 5 small JSON state files (health_state, schedule, scraped_links, sessions, streams) and a lost+found — total 30KB, no DB, regenerable from upstream APIs. Standard scale-to-0 → rsync → swap pattern (deployment was at replicas=1). Pod came back up on k8s-node4 (now Ready again). Net: -1 SCSI LUN on k8s-node1 (was the previous host).
This commit is contained in:
parent
aded77d5ab
commit
7ad0e578ae
1 changed files with 9 additions and 28 deletions
|
|
@ -78,33 +78,14 @@ resource "kubernetes_manifest" "chrome_service_client_secret" {
|
|||
depends_on = [kubernetes_namespace.f1-stream]
|
||||
}
|
||||
|
||||
resource "kubernetes_persistent_volume_claim" "data_proxmox" {
|
||||
wait_until_bound = false
|
||||
metadata {
|
||||
name = "f1-stream-data-proxmox"
|
||||
namespace = kubernetes_namespace.f1-stream.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 = "f1-stream-data-host"
|
||||
namespace = kubernetes_namespace.f1-stream.metadata[0].name
|
||||
nfs_server = var.nfs_server
|
||||
nfs_path = "/srv/nfs/f1-stream"
|
||||
storage = "1Gi"
|
||||
access_modes = ["ReadWriteOnce"]
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "f1-stream" {
|
||||
|
|
@ -196,7 +177,7 @@ resource "kubernetes_deployment" "f1-stream" {
|
|||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue