# kube-prometheus-stack (kps) Helm values — DB cluster (knoe-dev-cnpg-0). # # This file scopes a SECOND kube-prometheus-stack install — companion to # `monitoring/kps-values-gke.yaml` (the app-cluster install on knoe-dev-0). # # Why two stacks: Kubernetes service discovery is cluster-local. The app- # cluster Prometheus can't see CNPG pods (they live on knoe-dev-cnpg-0), so # every cnpg-grafana dashboard rendered "No data". This stack runs Prometheus # locally on the DB cluster, auto-discovers CNPG's PodMonitor, and is queried # directly by the app-cluster Grafana via an internal-LB datasource. # # Topology: # knoe-dev-cnpg-0 -[this stack]-> Prometheus + node-exporter + ksm # | # v # ILB (prometheus-cnpg-ilb @ 10.180.x.x:9090) # ^ # | (datasource: cnpg-prometheus) # knoe-dev-0 --------------- Grafana (single canonical Grafana) # # Apply: # helm --kube-context=$DB_CLUSTER_KUBECONTEXT upgrade --install kps \ # prometheus-community/kube-prometheus-stack --version 84.3.0 \ # --namespace monitoring --create-namespace \ # -f monitoring/kps-cnpg-values.yaml --wait --timeout 5m # # Storage: every PVC pinned to `standard-hdd` (pd-standard). The cluster also # has `standard-rwo` (pd-balanced, partial-SSD) and `premium-rwo` (pd-ssd) — # both would consume the SSD_TOTAL_GB regional quota that's shared with CNPG. # Honor the standing rule: monitoring is HDD-only. --- # One Grafana stays canonical on the app cluster (svc.knoe.dev/grafana). # This stack is a metrics-only sidecar. grafana: enabled: false # Alerting routes through the app-cluster Alertmanager (follow-up: federation). # For now, no AM here, no rules either (avoid scrape-rule noise into a void). alertmanager: enabled: false defaultRules: create: false # DB-cluster object metrics (pods/PVCs/Jobs etc.) for kube-state dashboards. kube-state-metrics: enabled: true # Per-DB-node host metrics (CPU/mem/disk/network). prometheus-node-exporter: enabled: true prometheus: prometheusSpec: # Short retention — this Prometheus is mostly a query-target. App-cluster # Grafana queries it on demand; we don't archive long-form. retention: 7d # CRITICAL: select ALL PodMonitors / ServiceMonitors / PrometheusRules, # not just helm-release-labelled ones. The CNPG operator-emitted # PodMonitor at knoe-db-0/knoe-db doesn't carry our `release=kps` label, # but we want to scrape it. Selector with empty `{}` matches everything. podMonitorSelectorNilUsesHelmValues: false serviceMonitorSelectorNilUsesHelmValues: false ruleSelectorNilUsesHelmValues: false podMonitorSelector: {} serviceMonitorSelector: {} # Tight resource shape — small cluster, low metric cardinality (3 PG # pods + ~50 metrics each + 15s scrape ≈ 30k samples/day ≈ 250 MB/day). resources: requests: cpu: 100m memory: 512Mi limits: cpu: 500m memory: 1Gi storageSpec: volumeClaimTemplate: spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi storageClassName: standard-hdd # explicit HDD (do not let default fall through) prometheusOperator: resources: requests: cpu: 50m memory: 128Mi limits: cpu: 200m memory: 256Mi