From 57abef25284945d89eacb1a354f470a431588698 Mon Sep 17 00:00:00 2001 From: Marco van Zijl Date: Fri, 9 May 2025 20:30:26 +0200 Subject: [PATCH] Add cloudnativepg application and priority class configuration --- applications/templates/cloudnativepg.yaml | 66 +++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 applications/templates/cloudnativepg.yaml diff --git a/applications/templates/cloudnativepg.yaml b/applications/templates/cloudnativepg.yaml new file mode 100644 index 0000000..8b75b6c --- /dev/null +++ b/applications/templates/cloudnativepg.yaml @@ -0,0 +1,66 @@ +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 + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: cnpg-system + server: {{ .Values.spec.destination.server }} + project: default + syncPolicy: + automated: + prune: false + selfHeal: true + source: + path: cnpg + 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 +spec: + instances: 2 + 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" + storage: + size: 50Gi + storageClass: local-path