From fe1d3ca12a36c3f641eb2d7c1b15a6e4a0670c39 Mon Sep 17 00:00:00 2001 From: Lumpiasty Date: Sat, 21 Feb 2026 13:05:34 +0100 Subject: [PATCH] migrate gitea to lvmhdd backed postgres --- apps/gitea/postgres-cluster.yaml | 28 ++++++++++++++++++++++++++++ apps/gitea/release.yaml | 4 ++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/apps/gitea/postgres-cluster.yaml b/apps/gitea/postgres-cluster.yaml index 20ebc84..d7eb997 100644 --- a/apps/gitea/postgres-cluster.yaml +++ b/apps/gitea/postgres-cluster.yaml @@ -14,3 +14,31 @@ spec: backup: volumeSnapshot: className: csi-mayastor-snapshotclass +--- +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: gitea-postgresql-cluster-lvmhdd + namespace: gitea +spec: + instances: 1 + + imageName: ghcr.io/cloudnative-pg/postgresql:17.4 + + storage: + pvcTemplate: + storageClassName: hdd-lvmpv + resources: + requests: + storage: 20Gi + volumeName: gitea-postgresql-cluster-lvmhdd-1 + + # Just to avoid bootstrapping the instance agian + # I migrated data manually using pv_migrate because this feature is broken + # when source and target volumes are in different storage classes + # CNPG just sets dataSource to the PVC and expects the underlying storage + # to handle the migration, but it doesn't work here + bootstrap: + recovery: + backup: + name: backup-migration diff --git a/apps/gitea/release.yaml b/apps/gitea/release.yaml index 31a4c33..a812bdd 100644 --- a/apps/gitea/release.yaml +++ b/apps/gitea/release.yaml @@ -59,12 +59,12 @@ spec: - name: GITEA__DATABASE__PASSWD valueFrom: secretKeyRef: - name: gitea-postgresql-cluster-app + name: gitea-postgresql-cluster-lvmhdd-app key: password config: database: DB_TYPE: postgres - HOST: gitea-postgresql-cluster-rw:5432 + HOST: gitea-postgresql-cluster-lvmhdd-rw:5432 NAME: app USER: app indexer: