- Phase 1: longhorn, longhorn-kafka StorageClasses (cluster-wide defaults) - Phase 2 pilot: grafana, loki, portainer, forgejo PVCs - All imports protected by lifecycle.prevent_destroy - Removes Helm annotations (meta.helm.sh/*) to prevent dual-ownership conflicts - Remote state backend (MinIO S3) syncs automatically on plan/apply - Import-only approach: zero data loss, existing volumes untouched - See terraform/LONGHORN_PVC_IMPORT.md for execution record Co-Authored-By: Claude Haiku 4.5 <[email protected]>
26 lines
640 B
Terraform
26 lines
640 B
Terraform
# Forgejo (server) — Git repository and CI/CD configuration persistent storage
|
|
# Imported from live cluster state (import-only, no delete)
|
|
# Live name: gitea-shared-storage (Gitea is old name, Forgejo is new)
|
|
|
|
resource "kubernetes_persistent_volume_claim" "forgejo_shared_storage" {
|
|
metadata {
|
|
name = "gitea-shared-storage"
|
|
namespace = "cicd"
|
|
}
|
|
spec {
|
|
access_modes = ["ReadWriteOnce"]
|
|
storage_class_name = "longhorn"
|
|
resources {
|
|
requests = {
|
|
storage = "20Gi"
|
|
}
|
|
}
|
|
volume_name = "pvc-889e20b9-2203-46e6-8c08-d015cd15193d"
|
|
}
|
|
|
|
|
|
lifecycle {
|
|
prevent_destroy = true
|
|
}
|
|
}
|