c090015686
Coroot gives eBPF-based service maps, tracing and RCA for the cluster; the community edition has no OIDC, so it sits behind oauth2-proxy. - add coroot-operator chart 0.10.8 in coroot-system (platform) - add a Coroot CR: 2 replicas on CNPG, ClickHouse 2 + keeper 3, metrics via vmcluster/main, pinned images - agents send keyless; Coroot binds an empty key to its single default project - front coroot.unkin.net with oauth2-proxy (Authentik, akP-coroot-admin); Coroot grants Admin to anonymous - restrict Coroot ingress to oauth2-proxy and the agents; PDBs, anti-affinity, DNS, wildcard cert, schema Requires IUCLabs/terraform-artifactapi#7 and IUCLabs/terraform-authentik#7. Reviewed-on: #605 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
83 lines
2.0 KiB
YAML
83 lines
2.0 KiB
YAML
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: postgres
|
|
namespace: coroot
|
|
spec:
|
|
affinity:
|
|
podAntiAffinityType: preferred
|
|
backup:
|
|
retentionPolicy: 30d
|
|
barmanObjectStore:
|
|
destinationPath: s3://cnpg-coroot
|
|
endpointURL: https://s3.ceph.unkin.net
|
|
# radosgw serves a Vault-PKI cert.
|
|
endpointCA:
|
|
name: vault-ca-cert
|
|
key: ca.crt
|
|
# Keys minted by the ObjectStoreUser in cnpg_backup.yaml; never hardcoded.
|
|
s3Credentials:
|
|
accessKeyId:
|
|
name: cnpg-coroot-backup-s3
|
|
key: AWS_ACCESS_KEY_ID
|
|
secretAccessKey:
|
|
name: cnpg-coroot-backup-s3
|
|
key: AWS_SECRET_ACCESS_KEY
|
|
# Path prefix within the bucket; keep stable across restores (see docs).
|
|
serverName: coroot
|
|
data:
|
|
compression: bzip2
|
|
jobs: 2
|
|
wal:
|
|
compression: zstd
|
|
maxParallel: 2
|
|
bootstrap:
|
|
initdb:
|
|
database: coroot
|
|
encoding: UTF8
|
|
localeCType: C
|
|
localeCollate: C
|
|
# CNPG mints the owner credentials in the postgres-app Secret.
|
|
owner: coroot
|
|
enablePDB: true
|
|
enableSuperuserAccess: false
|
|
failoverDelay: 0
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:18.1-system-trixie
|
|
instances: 2
|
|
logLevel: info
|
|
monitoring:
|
|
customQueriesConfigMap:
|
|
- key: queries
|
|
name: cnpg-default-monitoring
|
|
disableDefaultQueries: false
|
|
enablePodMonitor: false
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "200"
|
|
shared_buffers: 128MB
|
|
primaryUpdateMethod: restart
|
|
primaryUpdateStrategy: unsupervised
|
|
replicationSlots:
|
|
highAvailability:
|
|
enabled: true
|
|
slotPrefix: _cnpg_
|
|
synchronizeReplicas:
|
|
enabled: true
|
|
updateInterval: 30
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 256Mi
|
|
smartShutdownTimeout: 180
|
|
startDelay: 3600
|
|
stopDelay: 1800
|
|
storage:
|
|
resizeInUseVolumes: true
|
|
size: 10Gi
|
|
storageClass: cephrbd-fast-delete
|
|
switchoverDelay: 3600
|