diff --git a/manifests/postgres/postgres-superuser-credentials.yaml b/manifests/postgres/postgres-superuser-credentials.yaml new file mode 100644 index 0000000..f49b704 --- /dev/null +++ b/manifests/postgres/postgres-superuser-credentials.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Secret +metadata: + name: postgres-superuser-credentials + namespace: postgres + annotations: + argocd.argoproj.io/sync-wave: "1" +type: kubernetes.io/basic-auth +stringData: + username: postgres + password: postgres diff --git a/manifests/postgres/postgres.yaml b/manifests/postgres/postgres.yaml new file mode 100644 index 0000000..4110bee --- /dev/null +++ b/manifests/postgres/postgres.yaml @@ -0,0 +1,41 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: postgres + namespace: postgres + annotations: + argocd.argoproj.io/sync-wave: "10" +spec: + imageName: ghcr.io/cloudnative-pg/postgresql:16.2 + instances: 1 + primaryUpdateStrategy: unsupervised + primaryUpdateMethod: switchover + superuserSecret: + name: postgres-superuser-credentials + storage: + storageClass: hcloud-volumes + size: 10Gi + resources: + limits: + cpu: "1" + memory: 2Gi + requests: + cpu: "1" + memory: 2Gi + # bootstrap: + # initdb: + # database: dataproxy + # owner: dataproxy + # secret: + # name: app-user-credentials + ## Postgres configuration ## + # Enable 'postgres' superuser + enableSuperuserAccess: true + # Postgres instance parameters + postgresql: + parameters: + max_connections: "500" + # max_slot_wal_keep_size: "10GB" + # wal_keep_size: "5GB" + # monitoring: + # enablePodMonitor: true