add postgres

This commit is contained in:
2024-08-22 19:11:17 +05:00
parent 324ddccee3
commit 2731af1bfe
5 changed files with 47 additions and 26 deletions

34
postgres/cluster.yaml Normal file
View File

@@ -0,0 +1,34 @@
---
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
name: postgres-password
namespace: postgres-system
spec:
itemPath: "vaults/Lab/items/Postgres"
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgres-cluster
namespace: postgres-system
spec:
instances: 3
minSyncReplicas: 1
maxSyncReplicas: 2
primaryUpdateStrategy: unsupervised
postgresql:
pg_hba:
- host all all all md5
enableSuperuserAccess: false
bootstrap:
initdb:
database: postgres
secret:
name: postgres-password
storage:
size: 1Gi