From 9209bb5474eb16957a5d609cc66b5ad5f848992c Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sun, 25 Oct 2026 11:50:19 +0100 Subject: [PATCH] Provision Ghostfolio PostgreSQL on CloudNativePG --- apps/ghostfolio-postgresql/cluster/cluster.yaml | 17 +++++++++++++++++ .../cluster/kustomization.yaml | 4 ++++ bootstrap/ghostfolio-postgresql.yaml | 3 +++ bootstrap/ghostfolio-project.yaml | 1 + 4 files changed, 25 insertions(+) create mode 100644 apps/ghostfolio-postgresql/cluster/cluster.yaml create mode 100644 apps/ghostfolio-postgresql/cluster/kustomization.yaml diff --git a/apps/ghostfolio-postgresql/cluster/cluster.yaml b/apps/ghostfolio-postgresql/cluster/cluster.yaml new file mode 100644 index 0000000..1ee821f --- /dev/null +++ b/apps/ghostfolio-postgresql/cluster/cluster.yaml @@ -0,0 +1,17 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: ghostfolio-postgresql + namespace: ghostfolio +spec: + instances: 1 + imageName: ghcr.io/cloudnative-pg/postgresql:17.11-standard-trixie + bootstrap: + initdb: + database: ghostfolio + owner: ghostfolio + secret: + name: ghostfolio-postgresql-bootstrap + storage: + size: 8Gi + storageClass: rook-ceph-block diff --git a/apps/ghostfolio-postgresql/cluster/kustomization.yaml b/apps/ghostfolio-postgresql/cluster/kustomization.yaml new file mode 100644 index 0000000..993fbde --- /dev/null +++ b/apps/ghostfolio-postgresql/cluster/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - cluster.yaml diff --git a/bootstrap/ghostfolio-postgresql.yaml b/bootstrap/ghostfolio-postgresql.yaml index e64daaf..1d71c57 100644 --- a/bootstrap/ghostfolio-postgresql.yaml +++ b/bootstrap/ghostfolio-postgresql.yaml @@ -17,6 +17,9 @@ spec: - repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git targetRevision: main ref: values + - repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git + targetRevision: main + path: apps/ghostfolio-postgresql/cluster destination: server: https://kubernetes.default.svc namespace: ghostfolio diff --git a/bootstrap/ghostfolio-project.yaml b/bootstrap/ghostfolio-project.yaml index c0dd309..303f743 100644 --- a/bootstrap/ghostfolio-project.yaml +++ b/bootstrap/ghostfolio-project.yaml @@ -24,6 +24,7 @@ spec: - {group: "", kind: Pod} - {group: apps, kind: Deployment} - {group: apps, kind: StatefulSet} + - {group: postgresql.cnpg.io, kind: Cluster} - {group: networking.k8s.io, kind: Ingress} - {group: networking.k8s.io, kind: NetworkPolicy} - {group: policy, kind: PodDisruptionBudget}