Add VictoriaMetrics observability stack + sync catalog for monitoring test
- VM stack 10 charts: victoria-metrics-cluster/auth, victoria-logs-cluster, victoria-metrics-agent/alert, opentelemetry-collector, kube-state-metrics, prometheus-node-exporter, alertmanager, perses (JWT/OIDC, Infisical-ready) - ArgoCD ApplicationSet (syncWave) + per-chart dip-values overlays - doc/victoria-metrics-architecture.md, define-chart-resources updates - includes pending working-tree changes (mlflow, kubeflow, apisix, CLAUDE.md) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# =============================================================================
|
||||
# vmauth — PaaSup 커스텀 오버라이드 (Keycloak JWT/OIDC 멀티테넌시)
|
||||
# 차트: victoria-metrics/victoria-metrics-auth
|
||||
# 포트: 8427 / 역할: vmselect·vlselect 앞단 인증·라우팅 프록시
|
||||
#
|
||||
# 인증 모델: 전면 JWT/OIDC (vmauth v1.138.0+, Enterprise 아님)
|
||||
# - 클라이언트는 Keycloak이 발급한 액세스 토큰(JWT)을 Bearer로 제시
|
||||
# - vmauth가 jwt.oidc.issuer Discovery로 공개키를 자동 fetch/rotate → 서명 검증
|
||||
# - 토큰의 vm_access 클레임(metrics_account_id 등)으로 테넌트를 동적 라우팅
|
||||
# - 테넌트 추가 = Keycloak 그룹/attribute 추가만 → vmauth 재배포 불필요
|
||||
#
|
||||
# Keycloak 측 준비: vm_access 클레임을 주입하는 Protocol Mapper 필요
|
||||
# {"vm_access": {"metrics_account_id": <N>, "logs_account_id": <N>}}
|
||||
# 자세한 절차는 CUSTOM-README.md 참조.
|
||||
# =============================================================================
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
|
||||
config:
|
||||
users:
|
||||
# ── 권장: Keycloak JWT 검증 + vm_access 동적 라우팅 ──────────────────────
|
||||
# 모든 사용자/팀이 단일 항목을 공유한다. 테넌트 구분은 토큰의 vm_access 클레임이 담당.
|
||||
- jwt:
|
||||
oidc:
|
||||
# 배포 환경에 항상 존재하는 paasup realm 사용 (realm 신규 생성 금지)
|
||||
issuer: "https://keycloak.example.org/realms/paasup"
|
||||
url_map:
|
||||
# 메트릭(PromQL): vm_access.metrics_account_id → URL 경로 /select/{accountID}/ (경로 기반 격리)
|
||||
- src_paths: ["/api/v1/.*"]
|
||||
url_prefix: "http://vmcluster-victoria-metrics-cluster-vmselect.monitoring.svc.cluster.local:8481/select/{{.MetricsAccountID}}/prometheus"
|
||||
# 로그(LogsQL): vlselect + AccountID 헤더 (VictoriaLogs는 헤더 기반 테넌트 격리)
|
||||
- src_paths: ["/select/logsql/.*"]
|
||||
url_prefix: "http://vlogs-victoria-logs-cluster-vlselect.monitoring.svc.cluster.local:9471"
|
||||
headers:
|
||||
- "AccountID: {{.LogsAccountID}}"
|
||||
- "ProjectID: 0"
|
||||
|
||||
# ── 대안(주석): 정적 basic-auth ──────────────────────────────────────────
|
||||
# 토큰을 사용할 수 없는 CI/레거시 클라이언트에 한해 추가한다. 평문 금지 → %{ENV_VAR} 치환 사용.
|
||||
# - username: ci-bot
|
||||
# password: "%{CI_BOT_PASSWORD}"
|
||||
# url_map:
|
||||
# - src_paths: ["/api/v1/.*"]
|
||||
# url_prefix: "http://vmcluster-victoria-metrics-cluster-vmselect.monitoring.svc.cluster.local:8481/select/9000/prometheus"
|
||||
|
||||
# 인증 없는 내부 서비스(vmalert 등) — accountID 0으로 폴백
|
||||
unauthorized_user:
|
||||
url_prefix: "http://vmcluster-victoria-metrics-cluster-vmselect.monitoring.svc.cluster.local:8481/select/0/prometheus"
|
||||
Reference in New Issue
Block a user