veda/applications/templates/cloudnativepg.yaml

81 lines
1.7 KiB
YAML

apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: homelab-critical
value: 500000000
globalDefault: false
description: "Priority class for critical Homelab pods"
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cloudnativepg
namespace: argocd
spec:
destination:
namespace: cnpg-system
server: {{ .Values.spec.destination.server }}
project: default
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
source:
chart: cloudnative-pg
repoURL: https://cloudnative-pg.github.io/charts
targetRevision: 0.23.2
helm:
valuesObject:
monitoring:
podMonitorEnabled: true
grafanaDashboard:
create: true
priorityClassName: homelab-critical
resources:
requests:
cpu: 50m
memory: 100Mi
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: pg-cluster
namespace: cnpg-system
spec:
instances: 2
priorityClassName: homelab-critical
resources:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 1Gi
cpu: '1'
postgresql:
parameters:
max_connections: "200"
shared_buffers: "64MB"
effective_cache_size: "96MB"
maintenance_work_mem: "8MB"
wal_buffers: "2MB"
random_page_cost: "1.1"
effective_io_concurrency: "300"
work_mem: "1MB"
monitoring:
enablePodMonitor: true
storage:
size: 50Gi
storageClass: local-path
---
apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata:
name: postgres-backup-claim
namespace: ceph
spec:
generateBucketName: postgres-backup
storageClassName: rgw-bulk
additionalConfig:
maxSize: "400G"