Skip to content

Add connection pooling guidance and kube-prometheus-stack monitoring for Kubernetes - #123

Merged
Busiii-adetiba merged 3 commits into
SynapsVault:mainfrom
agnesadah3-jpg:drips/68-69
Oct 20, 2026
Merged

Busiii-adetiba merged 3 commits into
SynapsVault:mainfrom
agnesadah3-jpg:drips/68-69

Conversation

@agnesadah3-jpg

Copy link
Copy Markdown
Contributor

Summary

Add connection pooling guidance and kube-prometheus-stack monitoring for Kubernetes

What was solved

#68 — Add PgBouncer / connection pooling guidance for the HPA-scaled backend

Add connection-pooling guidance for the HPA-scaled backend so up to 10 replicas don't exhaust Postgres/Supabase connection limits. Document using Supabase's pooler (port 6543) or deploying PgBouncer, and set a per-replica pool size in the k8s manifests and deployment docs.

Addressed:

  • Changed: docs/DEPLOY-KUBERNETES.md, k8s/backend-deployment.yaml, k8s/configmap.yaml, k8s/secrets.yaml
  • Document using Supabase's pooler (port 6543) or deploying PgBouncer in docs/DEPLOY-KUBERNETES.md
  • Set pool size per replica (e.g. via env/configmap in k8s/) so total connections stay within Postgres/Supabase limits
  • Scope limited to k8s/ manifests and docs/DEPLOY-KUBERNETES.md

#69 — Deploy the monitoring stack to Kubernetes

Add Kubernetes-native monitoring for the production cluster: introduce kube-prometheus-stack ServiceMonitors (or k8s service discovery) so Prometheus scrapes backend/frontend instead of static docker-compose targets, convert the existing alert rules into a PrometheusRule CRD, and document installation. Scope is limited to monitoring/ and k8s/ (plus the monitoring install doc).

Addressed:

  • Changed: k8s/monitoring-servicemonitors.yaml, k8s/prometheus-rule.yaml, k8s/kustomization.yaml, docs/MONITORING.md
  • Add ServiceMonitors (kube-prometheus-stack) or k8s service discovery so Prometheus discovers backend/frontend targets instead of static compose targets
  • Load existing alert rules from monitoring/alert-rules.yml as a PrometheusRule custom resource
  • Document installation of the monitoring stack on Kubernetes

Changes

  • docs/DEPLOY-KUBERNETES.md (modify)
  • k8s/backend-deployment.yaml (modify)
  • k8s/monitoring-servicemonitors.yaml (create)
  • docs/MONITORING.md (modify)
  • k8s/configmap.yaml (modify)
  • k8s/prometheus-rule.yaml (create)
  • k8s/secrets.yaml (modify)
  • k8s/kustomization.yaml (modify)

Approach

  1. Add PgBouncer / connection pooling guidance for the HPA-scaled backend #68 — Add PgBouncer / connection pooling guidance for the HPA-scaled backend (Changed: docs/DEPLOY-KUBERNETES.md, k8s/backend-deployment.yaml, k8s/configmap.yaml, k8s/secrets.yaml)
  2. Deploy the monitoring stack to Kubernetes #69 — Deploy the monitoring stack to Kubernetes (Changed: k8s/monitoring-servicemonitors.yaml, k8s/prometheus-rule.yaml, k8s/kustomization.yaml, docs/MONITORING.md)

Issues

Closes #68
Closes #69

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@agnesadah3-jpg Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Busiii-adetiba
Busiii-adetiba merged commit e586b39 into SynapsVault:main Oct 20, 2026
3 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy the monitoring stack to Kubernetes Add PgBouncer / connection pooling guidance for the HPA-scaled backend

2 participants