Stage 07: Control Plane Monitoring
Stage 07 deploys the monitoring stack for control plane services, including Prometheus, Grafana, OpenTelemetry Collector, and Fluent Bit for log aggregation.
Source file: scripts/stages/07-control-plane-monitoring.sh
Components Deployed
| Component | Chart | Namespace | Purpose |
|---|---|---|---|
| Prometheus | prometheus-community/kube-prometheus-stack | matih-monitoring-control-plane | Metrics collection and alerting |
| Grafana | Bundled with kube-prometheus-stack | matih-monitoring-control-plane | Dashboard visualization |
| OpenTelemetry Collector | open-telemetry/opentelemetry-collector | matih-monitoring-control-plane | Trace and metric ingestion |
| Fluent Bit | fluent/fluent-bit | matih-monitoring-control-plane | Log collection and forwarding |
Helm Repositories
The stage ensures the following Helm repositories are configured:
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-charts
helm repo add fluent https://fluent.github.io/helm-chartsLibraries Used
| Library | Purpose |
|---|---|
core/logging.sh | Unified logging |
core/config.sh | Configuration and Terraform output access |
k8s/namespace.sh | Namespace creation |
k8s/health.sh | Pod health checks |
helm/repo.sh | Helm repository management |
helm/deploy.sh | Helm deployment functions |
k8s/dev-secrets.sh | Dev environment secrets |
Chart Configuration
The monitoring chart is located at infrastructure/helm/matih-monitoring-control-plane/.
helm upgrade --install matih-monitoring-cp \
infrastructure/helm/matih-monitoring-control-plane \
--namespace matih-monitoring-control-plane \
--create-namespace \
--wait --timeout 10mDependencies
- Requires:
05a-control-plane-infrastructure,06-ingress-controller - Required by:
08-control-plane-services
Dependency Verification
kubectl get pods -n matih-monitoring-control-plane -l app=prometheus
kubectl get pods -n matih-monitoring-control-plane -l app.kubernetes.io/name=grafana