apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: name: pg namespace: forgejo spec: instances: 1 imageName: ghcr.io/cloudnative-pg/postgresql:16 storage: size: 10Gi storageClass: local-path affinity: nodeSelector: kubernetes.io/hostname: siriussec bootstrap: initdb: database: forgejo owner: forgejo secret: name: forgejo-pg-app resources: requests: cpu: 100m memory: 256Mi limits: memory: 1Gi # Metrics on :9187 (CNPG's instance manager), scraped by the PodMonitor in # podmonitor.yaml. `enablePodMonitor` stays false: the operator-generated # PodMonitor cannot carry the `release: kube-prometheus-stack` label that this # Prometheus needs, and upstream deprecated the flag in CNPG 1.27. # # `customQueriesConfigMap` points at the operator's own default query set plus # pg-actions-queries.yaml — the Forgejo Actions queue/outcome metrics that only # this database can answer. monitoring: enablePodMonitor: false disableDefaultQueries: false customQueriesConfigMap: - name: cnpg-default-monitoring key: queries - name: forgejo-actions-queries key: queries