# CNPG Postgres for Gotify. Lightweight — 2 instances, 2Gi storage. # CNPG generates secret `gotify-db-app` + service `gotify-db-rw` in ns notifications. apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: name: gotify-db namespace: notifications annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true spec: # 2, not 3. The file's own header always said 2, and the third instance never # existed as a running pod: its volume only ever held a replica that could not # start, because talos-cp-2 disk2 has no free space. A third replica on a disk # that cannot host it is not redundancy, it is a permanent degraded volume. instances: 2 imageName: ghcr.io/cloudnative-pg/postgresql:16.2 bootstrap: initdb: database: gotify owner: app encoding: UTF8 localeCollate: C localeCType: C enableSuperuserAccess: false resources: requests: { memory: "256Mi", cpu: "100m" } limits: { memory: "512Mi", cpu: "500m" } storage: size: 2Gi storageClass: longhorn-cnpg monitoring: enablePodMonitor: true affinity: podAntiAffinityType: preferred topologyKey: kubernetes.io/hostname tolerations: - key: node-role.kubernetes.io/control-plane operator: Exists effect: NoSchedule