Files
mtusi2026lab7/infra/otel/gateway.cfg
T

44 lines
1.5 KiB
INI

# HAProxy 3.2 loopback mTLS sidecar for otel-collector (lab7).
# Owns Docker DNS alias `otel-collector` on app_data and obs_net; forwards only
# to closed loopback ports (127.0.0.1:14318/18888/13134) inside shared netns.
# Reloads CRL and CN/SAN allowlists live on SIGUSR2 without image rebuild.
global
maxconn 4096
log stdout format raw local0
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
tune.ssl.cachesize 0
defaults
mode http
timeout connect 2s
timeout client 30s
timeout server 30s
frontend otlp_in
bind *:4318 ssl crt /run/certs/server.pem ca-file /run/certs/ca.crt crl-file /run/certs/ca.crl verify required
acl ok_cn ssl_c_s_dn(cn) -m str -f /run/certs/allowed-otlp-cn.lst
acl ok_san ssl_c_san -m str -f /run/certs/allowed-otlp-san.lst
http-request deny deny_status 403 unless ok_cn ok_san
default_backend otlp_local
backend otlp_local
server otel_otlp 127.0.0.1:14318
frontend prom_metrics
bind *:8888 ssl crt /run/certs/server.pem ca-file /run/certs/ca.crt crl-file /run/certs/ca.crl verify required
acl is_prom_cn ssl_c_s_dn(cn) -m str prometheus
acl is_prom_san ssl_c_san -m str DNS:prometheus
http-request deny deny_status 403 unless is_prom_cn is_prom_san
default_backend prom_local
backend prom_local
server otel_metrics 127.0.0.1:18888
frontend otel_health
bind *:13133 ssl crt /run/certs/server.pem
default_backend health_local
backend health_local
server otel_health 127.0.0.1:13134