Provision Ombi PostgreSQL with CloudNativePG

This commit is contained in:
feedc0de committed 2026-10-25 12:32:53 +01:00
1 parent 0e7b8cbb62
commit dad7b675c4
8 files changed
+81

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: ombi-cnpg
namespace: ombi
spec:
instances: 1
enableSuperuserAccess: true
imageName: ghcr.io/cloudnative-pg/postgresql:17.11-standard-trixie
bootstrap:
initdb:
database: ombi
owner: ombi
secret:
name: ombi-cnpg-bootstrap
storage:
size: 5Gi
storageClass: rook-ceph-block
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster.yaml
+15
View File
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: postgresql
namespace: ombi
spec:
ports:
- name: postgresql
port: 5432
protocol: TCP
targetPort: 5432
selector:
cnpg.io/cluster: ombi-cnpg
cnpg.io/instanceRole: primary
type: ClusterIP
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service.yaml
+15
View File
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: postgresql
namespace: ombi
spec:
ports:
- name: postgresql
port: 5432
protocol: TCP
targetPort: 5432
selector:
cnpg.io/cluster: ombi-cnpg
cnpg.io/instanceRole: primary
type: ClusterIP
+1
View File
@@ -77,6 +77,7 @@ resources:
- ombi-namespace.yaml
- ombi-postgresql-secret.yaml
- ombi-postgresql.yaml
- ombi-cnpg.yaml
- tautulli.yaml
- uptime-kuma.yaml
- grafana.yaml
+21
View File
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ombi-cnpg
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
project: ombi
source:
repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git
targetRevision: main
path: apps/ombi-postgresql/cluster
destination:
server: https://kubernetes.default.svc
namespace: ombi
syncPolicy:
automated:
enabled: true
prune: true
selfHeal: true
+3
View File
@@ -15,6 +15,9 @@ spec:
destinations:
- namespace: ombi
server: https://kubernetes.default.svc
clusterResourceWhitelist:
- group: postgresql.cnpg.io
kind: Cluster
namespaceResourceWhitelist:
- group: ""
kind: ConfigMap