mirror of
https://github.com/immich-app/yucca-o11y.git
synced 2026-09-30 13:23:23 +08:00
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://k8s-schemas.home-operations.com/postgresql.cnpg.io/cluster_v1.json
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: grafana-postgres
|
|
labels:
|
|
app.kubernetes.io/name: grafana-postgres
|
|
spec:
|
|
# renovate: datasource=docker depName=ghcr.io/cloudnative-pg/postgresql
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:18.4@sha256:8ff3abd13383e619797f974b4fcdda6de0c2cfdad90eb47e1cd95d41fe26bf80
|
|
instances: 3
|
|
primaryUpdateStrategy: unsupervised
|
|
primaryUpdateMethod: switchover
|
|
|
|
storage:
|
|
size: 20Gi
|
|
storageClass: openebs-system-disk
|
|
|
|
# One instance per worker (3 workers, 3 instances).
|
|
affinity:
|
|
enablePodAntiAffinity: true
|
|
topologyKey: kubernetes.io/hostname
|
|
podAntiAffinityType: required
|
|
|
|
enableSuperuserAccess: true
|
|
superuserSecret:
|
|
name: grafana-postgres-superuser-password
|
|
|
|
# Create the grafana database + owner role from the grafana-postgres-password secret.
|
|
bootstrap:
|
|
initdb:
|
|
database: grafana
|
|
owner: grafana
|
|
secret:
|
|
name: grafana-postgres-password
|
|
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "200"
|
|
shared_buffers: 256MB
|
|
# Synchronous commit to one standby for durability, but degrade to async if no
|
|
# standby is available (preferred, not required) so writes don't freeze during
|
|
# node churn. failoverQuorum blocks promoting a standby missing synced data.
|
|
synchronous:
|
|
method: any
|
|
number: 1
|
|
dataDurability: preferred
|
|
failoverQuorum: true
|
|
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|
|
limits:
|
|
memory: 1Gi
|
|
|
|
# PodMonitor is converted to a VMPodScrape by the VM operator and scraped.
|
|
monitoring:
|
|
enablePodMonitor: true
|