Stage 10: Data Plane Monitoring
Stage 10 deploys the shared monitoring stack for data plane services. It supports two deployment modes: shared (for FREE/PROFESSIONAL tier tenants) and per-tenant (for ENTERPRISE tier tenants).
Source file: scripts/stages/10-data-plane-monitoring.sh
Components Deployed
| Component | Chart | Purpose |
|---|---|---|
| Prometheus | kube-prometheus-stack | Metrics collection for data plane services |
| Grafana | Bundled with kube-prometheus-stack | Data plane dashboards |
| OpenTelemetry Collector | opentelemetry-collector | Trace and metric ingestion |
Deployment Modes
| Mode | Namespace | Configuration |
|---|---|---|
| Shared | matih-monitoring-data-plane | Single stack for all tenants |
| Per-tenant | matih-monitoring-{tenant} | Dedicated stack per ENTERPRISE tenant |
The mode is controlled by the MONITORING_MODE environment variable (default: shared).
Helm Repositories
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-chartsChart Location
infrastructure/helm/matih-monitoring-data-plane/Libraries Used
| Library | Purpose |
|---|---|
core/logging.sh | Unified logging |
core/config.sh | Configuration access |
k8s/namespace.sh | Namespace creation |
k8s/health.sh | Pod health checks |
helm/repo.sh | Repository management |
helm/deploy.sh | Deployment functions |
k8s/dev-secrets.sh | Dev secrets for Grafana credentials |
Dependencies
- Requires:
05b-data-plane-infrastructure,06-ingress-controller - Required by:
16-data-plane-services(monitoring must be ready before services)
Dependency Verification
kubectl get pods -n matih-monitoring-data-plane -l app=prometheus
kubectl get pods -n matih-monitoring-data-plane -l app.kubernetes.io/name=grafana