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:
parent
60fcc0bd7f
commit
6183159974
37 changed files with 4207 additions and 212 deletions
5
apps/vwap-monitor/deploy/config.env
Normal file
5
apps/vwap-monitor/deploy/config.env
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# ─── Config ─────────────────────────────────────────────────────────────────
|
||||
# Edit these values. They will be injected into the deployment automatically.
|
||||
|
||||
SCAN_INTERVAL_SEC=120
|
||||
BREACH_THRESHOLD=2.0
|
||||
70
apps/vwap-monitor/deploy/deployment.yaml
Normal file
70
apps/vwap-monitor/deploy/deployment.yaml
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: vwap-monitor
|
||||
namespace: customer1
|
||||
labels:
|
||||
app: vwap-monitor
|
||||
component: scanner
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate # only one instance should run
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vwap-monitor
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vwap-monitor
|
||||
component: scanner
|
||||
annotations:
|
||||
# Restart if config changes
|
||||
checksum/config: "vwap-monitor-config"
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 30
|
||||
containers:
|
||||
- name: scanner
|
||||
image: us-central1-docker.pkg.dev/devops-lab-cluster/customer1/vwap-monitor:latest
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: vwap-monitor-config
|
||||
env:
|
||||
- name: TELEGRAM_BOT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vwap-monitor-secrets
|
||||
key: telegram-bot-token
|
||||
- name: TELEGRAM_CHAT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vwap-monitor-secrets
|
||||
key: telegram-chat-id
|
||||
startupProbe:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "python3 -c 'import scanner'"]
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "kill -0 1"]
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 60
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: vwap-monitor-config
|
||||
namespace: customer1
|
||||
data:
|
||||
SCAN_INTERVAL_SEC: "120"
|
||||
BREACH_THRESHOLD: "2.0"
|
||||
41
apps/vwap-monitor/deploy/kustomization.yaml
Normal file
41
apps/vwap-monitor/deploy/kustomization.yaml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# ─── Kustomization ──────────────────────────────────────────────────────────
|
||||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: customer1
|
||||
|
||||
resources:
|
||||
- secret.yaml
|
||||
- deployment.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: vwap-monitor-config
|
||||
envs:
|
||||
- config.env
|
||||
|
||||
patches:
|
||||
- patch: |-
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: vwap-monitor
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: scanner
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: vwap-monitor-config
|
||||
env:
|
||||
- name: TELEGRAM_BOT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vwap-monitor-secrets
|
||||
key: telegram-bot-token
|
||||
- name: TELEGRAM_CHAT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vwap-monitor-secrets
|
||||
key: telegram-chat-id
|
||||
15
apps/vwap-monitor/deploy/secret.yaml
Normal file
15
apps/vwap-monitor/deploy/secret.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# ─── Secret Template ────────────────────────────────────────────────────────
|
||||
# Replace the values below before applying.
|
||||
# Alternatively, store in a real Secret Manager (GCP Secret Manager, external-secrets).
|
||||
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: vwap-monitor-secrets
|
||||
namespace: customer1
|
||||
type: Opaque
|
||||
stringData:
|
||||
# Get from: https://t.me/botfather → /newbot → copy token
|
||||
telegram-bot-token: "YOUR_BOT_TOKEN_HERE"
|
||||
# Get from: @userinfobot or inspect network tab in Telegram Web
|
||||
telegram-chat-id: "YOUR_CHAT_ID_HERE"
|
||||
Loading…
Reference in a new issue