feat: add Prometheus, Grafana, and Tailscale monitoring stack

- Install Prometheus + Grafana via kube-prometheus-stack (ClusterIP only, no public ingress)
- Deploy Tailscale Operator for secure VPN access to internal services
- Add CNPG/PostgreSQL monitoring dashboards
- Add vLLM inference monitoring dashboards (tokens, latency, GPU)
- Add Cilium networking dashboards (policy, traffic, drops)
- Update infra-controllers staging kustomization to include all controllers
- Add monitoring-configs Flux sync for dashboard deployment
- Update README with monitoring architecture and access instructions
- Remove broken stale monitoring files (Azure Key Vault refs, wrong domains)

Access: kubectl port-forward or Tailscale VPN (replace auth key before deploy)
This commit is contained in:
Hermes Agent 2026-04-26 02:31:53 +00:00
commit 6183159974
37 changed files with 4207 additions and 212 deletions

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- repository.yaml
- release.yaml

View file

@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
labels:
pod-security.kubernetes.io/enforce: restricted

View file

@ -0,0 +1,86 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: kube-prometheus-stack
namespace: monitoring
spec:
interval: 30m
chart:
spec:
chart: kube-prometheus-stack
version: "63.x"
sourceRef:
kind: HelmRepository
name: prometheus-community
namespace: monitoring
interval: 12h
targetNamespace: monitoring
install:
createNamespace: true
crds: Create
upgrade:
crds: CreateReplace
driftDetection:
mode: enabled
ignore:
- paths: ["/metadata/annotations/prometheus-operator-validated"]
target:
kind: PrometheusRule
values:
# Alertmanager disabled - using Grafana-native alerting
alertmanager:
enabled: false
# Prometheus configuration
prometheus:
prometheusSpec:
retention: 7d
# Monitor pods from all namespaces (needed for CNPG, vLLM, etc.)
podMonitorNamespaceSelector: {}
podMonitorSelectorNilUsesHelmValues: false
probeSelectorNilUsesHelmValues: false
ruleSelectorNilUsesHelmValues: false
serviceMonitorSelectorNilUsesHelmValues: false
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
# ServiceMonitor for Prometheus itself
serviceMonitor:
selfMonitor: true
# Grafana configuration - NO PUBLIC INGRESS, internal only
grafana:
# Admin credentials
adminUser: admin
# Password injected from monitoring-grafana-admin secret
adminPassword: "change-me-after-deploy"
# No ingress - accessed via Tailscale port-forward or kubectl port-forward
ingress:
enabled: false
# Service - internal only (ClusterIP)
service:
type: ClusterIP
port: 3000
# Sidecar to auto-load dashboards from ConfigMaps
sidecar:
dashboards:
enabled: true
label: grafana_dashboard
labelValue: "1"
searchNamespace: all
folderAnnotation: grafana_folder
provider:
allowUiUpdates: true
folders:
- folder: Kubernetes
orgId: 1
type: file
datasources:
enabled: true

View file

@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: prometheus-community
namespace: monitoring
spec:
interval: 1h
url: https://prometheus-community.github.io/helm-charts

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- repository.yaml
- release-operator.yaml

View file

@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: tailscale
labels:
pod-security.kubernetes.io/enforce: restricted

View file

@ -0,0 +1,40 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: tailscale-operator
namespace: tailscale
spec:
interval: 1h
chart:
spec:
chart: tailscale-operator
version: "1.86.x"
sourceRef:
kind: HelmRepository
name: tailscale
namespace: tailscale
interval: 12h
targetNamespace: tailscale
install:
createNamespace: true
crds: Create
upgrade:
crds: CreateReplace
values:
# Operator configuration
operator:
# Tag to use for pods created by the operator (e.g., tailnet)
tags: []
# Auth key from secret - PLACEHOLDER, replace with real key
# Create secret: kubectl create secret generic tailscale-operator-authkey \
# -n tailscale --from-literal=authkey=tskey-abc123... \
# --dry-run=client -o yaml | kubectl apply -f -
operatorSecretRef:
name: tailscale-operator-authkey
key: authkey
logFile: "/var/log/tailscale.log"
# Don't block pod startup if Tailscale auth fails
waitForLinkLocal: false
# Disable webhook (optional)
webhook:
enabled: false

View file

@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: tailscale
namespace: tailscale
spec:
interval: 1h
url: https://pkgs.tailscale.com/helmcharts

View file

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cnpg/
- keda/
- monitoring/
- tailscale/

View file

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base/monitoring/

View file

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base/tailscale/