From 33c151cce5698c8d3f654a0131c14678bedb5800 Mon Sep 17 00:00:00 2001 From: Shahab Dogar Date: Sun, 1 Sep 2024 15:29:07 +0500 Subject: [PATCH] fix: Postgres | add internal routes for gitea --- postgres/cluster.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/postgres/cluster.yaml b/postgres/cluster.yaml index 0d8598c..a6fb985 100644 --- a/postgres/cluster.yaml +++ b/postgres/cluster.yaml @@ -1,3 +1,4 @@ +--- apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: @@ -6,22 +7,26 @@ metadata: spec: instances: 3 minSyncReplicas: 1 - maxSyncReplicas: 2 + maxSyncReplicas: 1 primaryUpdateStrategy: unsupervised - + certificates: + serverAltDNSNames: + - postgres.home postgresql: pg_hba: - - host all all all md5 - + - hostssl all all all cert + - hostssl giteadb gitea 10.42.0.0/16 md5 enableSuperuserAccess: true superuserSecret: name: postgres-password - bootstrap: initdb: database: postgres secret: name: postgres-password - + postInitSQL: + - 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";' + - 'CREATE USER shahab SUPERUSER CREATEROLE;' + - 'CREATE DATABASE giteadb;' storage: size: 1Gi