aula-15: implementação completa APM (Tempo + OTel + demo app)
Componentes: - tempo-values.yaml: Grafana Tempo monolithic, 256Mi, 10Gi PVC - otel-collector-values.yaml: recebe OTLP, exporta traces→Tempo, gera span metrics (RED)→Victoria Metrics via spanmetrics connector - demo-app/: Node.js com rotas /fast (1 query), /slow (N+1, 51 queries), /fixed (JOIN), auto-instrumentado com OpenTelemetry - alerts/latency-alerts.yaml: VMRule com Doherty threshold (p95>400ms) - setup.sh: instala Tempo, OTel Collector, configura Grafana datasource, deploy demo app via ConfigMap (sem Docker build necessário) - cleanup.sh: remove apenas recursos da aula-15, preserva aula-12 Zero hardcoded hostnames. Tudo via .env e placeholders.
This commit is contained in:
24
aula-15/demo-app/k8s/ingress.yaml
Normal file
24
aula-15/demo-app/k8s/ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: demo-app
|
||||
namespace: demo
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: CLUSTER_ISSUER_PLACEHOLDER
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- DEMO_HOST_PLACEHOLDER
|
||||
secretName: demo-app-tls
|
||||
rules:
|
||||
- host: DEMO_HOST_PLACEHOLDER
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: demo-app
|
||||
port:
|
||||
number: 3000
|
||||
Reference in New Issue
Block a user