2026-03-17 21:34:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
resource "kubernetes_persistent_volume_claim" "prometheus_server_pvc" {
|
|
|
|
|
metadata {
|
2026-04-02 22:13:04 +03:00
|
|
|
name = "prometheus-data-proxmox"
|
2026-03-17 21:34:11 +00:00
|
|
|
namespace = kubernetes_namespace.monitoring.metadata[0].name
|
2026-04-03 23:30:00 +03:00
|
|
|
annotations = {
|
|
|
|
|
"resize.topolvm.io/threshold" = "90%"
|
|
|
|
|
"resize.topolvm.io/increase" = "10%"
|
|
|
|
|
"resize.topolvm.io/storage_limit" = "500Gi"
|
|
|
|
|
}
|
2026-03-17 21:34:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
spec {
|
|
|
|
|
access_modes = ["ReadWriteOnce"]
|
2026-04-02 22:13:04 +03:00
|
|
|
storage_class_name = "proxmox-lvm"
|
2026-03-17 21:34:11 +00:00
|
|
|
resources {
|
|
|
|
|
requests = {
|
|
|
|
|
storage = "200Gi"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
truenas deprecation: migrate all non-immich storage to proxmox NFS
- Migrate 7 backup CronJobs to Proxmox host NFS (192.168.1.127)
(etcd, mysql, postgresql, nextcloud, redis, vaultwarden, plotting-book)
- Migrate headscale backup, ebook2audiobook, osm_routing to Proxmox NFS
- Migrate servarr (lidarr, readarr, soulseek) NFS refs to Proxmox
- Remove 79 orphaned TrueNAS NFS module declarations from 49 stacks
- Delete stacks/platform/modules/ (27 dead module copies, 65MB)
- Update nfs-truenas StorageClass to point to Proxmox (192.168.1.127)
- Remove iscsi DNS record from config.tfvars
- Fix woodpecker persistence config and alertmanager PV
Only Immich (8 PVCs, ~1.4TB) remains on TrueNAS.
2026-04-12 14:35:39 +01:00
|
|
|
module "nfs_prometheus_backup_host" {
|
2026-03-22 02:56:04 +02:00
|
|
|
source = "../../../../modules/kubernetes/nfs_volume"
|
truenas deprecation: migrate all non-immich storage to proxmox NFS
- Migrate 7 backup CronJobs to Proxmox host NFS (192.168.1.127)
(etcd, mysql, postgresql, nextcloud, redis, vaultwarden, plotting-book)
- Migrate headscale backup, ebook2audiobook, osm_routing to Proxmox NFS
- Migrate servarr (lidarr, readarr, soulseek) NFS refs to Proxmox
- Remove 79 orphaned TrueNAS NFS module declarations from 49 stacks
- Delete stacks/platform/modules/ (27 dead module copies, 65MB)
- Update nfs-truenas StorageClass to point to Proxmox (192.168.1.127)
- Remove iscsi DNS record from config.tfvars
- Fix woodpecker persistence config and alertmanager PV
Only Immich (8 PVCs, ~1.4TB) remains on TrueNAS.
2026-04-12 14:35:39 +01:00
|
|
|
name = "monitoring-prometheus-backup-host"
|
2026-03-22 02:56:04 +02:00
|
|
|
namespace = kubernetes_namespace.monitoring.metadata[0].name
|
truenas deprecation: migrate all non-immich storage to proxmox NFS
- Migrate 7 backup CronJobs to Proxmox host NFS (192.168.1.127)
(etcd, mysql, postgresql, nextcloud, redis, vaultwarden, plotting-book)
- Migrate headscale backup, ebook2audiobook, osm_routing to Proxmox NFS
- Migrate servarr (lidarr, readarr, soulseek) NFS refs to Proxmox
- Remove 79 orphaned TrueNAS NFS module declarations from 49 stacks
- Delete stacks/platform/modules/ (27 dead module copies, 65MB)
- Update nfs-truenas StorageClass to point to Proxmox (192.168.1.127)
- Remove iscsi DNS record from config.tfvars
- Fix woodpecker persistence config and alertmanager PV
Only Immich (8 PVCs, ~1.4TB) remains on TrueNAS.
2026-04-12 14:35:39 +01:00
|
|
|
nfs_server = "192.168.1.127"
|
|
|
|
|
nfs_path = "/srv/nfs/prometheus-backup"
|
2026-03-22 02:56:04 +02:00
|
|
|
}
|
|
|
|
|
|
2026-03-17 21:34:11 +00:00
|
|
|
resource "helm_release" "prometheus" {
|
|
|
|
|
namespace = kubernetes_namespace.monitoring.metadata[0].name
|
|
|
|
|
create_namespace = true
|
|
|
|
|
name = "prometheus"
|
|
|
|
|
|
|
|
|
|
repository = "https://prometheus-community.github.io/helm-charts"
|
|
|
|
|
chart = "prometheus"
|
|
|
|
|
# version = "15.0.2"
|
|
|
|
|
version = "25.8.2"
|
|
|
|
|
|
2026-04-14 18:05:33 +00:00
|
|
|
timeout = 900 # 15 min — Recreate strategy + iSCSI reattach is slow
|
|
|
|
|
force_update = true # Required for StatefulSet volumeClaimTemplate changes (immutable field)
|
2026-03-23 02:24:39 +02:00
|
|
|
|
2026-03-17 21:34:11 +00:00
|
|
|
values = [templatefile("${path.module}/prometheus_chart_values.tpl", { alertmanager_mail_pass = var.alertmanager_account_password, alertmanager_slack_api_url = var.alertmanager_slack_api_url, tuya_api_key = var.tiny_tuya_service_secret, haos_api_token = var.haos_api_token })]
|
|
|
|
|
}
|