Skip to content

feat(monitor): operator Prometheus metrics with mTLS#4558

Draft
rene-dekker wants to merge 1 commit intotigera:masterfrom
rene-dekker:EV-6493
Draft

feat(monitor): operator Prometheus metrics with mTLS#4558
rene-dekker wants to merge 1 commit intotigera:masterfrom
rene-dekker:EV-6493

Conversation

@rene-dekker
Copy link
Member

Summary

  • Add configurable Prometheus metrics endpoint to the operator via METRICS_HOST, METRICS_PORT, and METRICS_SCHEME env vars
  • mTLS support when METRICS_SCHEME=https: server cert from tigera-operator-tls, client auth trusts tigera-ca-private CA
  • Monitor controller creates Service, ServiceMonitor, and server TLS cert for automatic Prometheus discovery
  • Custom Prometheus collector exposes operator_installation_status and operator_tigera_status gauges

Test plan

  • make build passes
  • make ut UT_DIR=./pkg/controller/metrics — 10 tests pass
  • make ut UT_DIR=./pkg/render/monitor — 20 tests pass
  • make ut UT_DIR=./pkg/controller/monitor — 17 tests pass
  • Manual: deploy with METRICS_HOST/METRICS_PORT set, verify metrics scraped
  • Manual: deploy with METRICS_SCHEME=https, verify mTLS handshake with Prometheus

🤖 Generated with Claude Code

Add operator metrics endpoint with configurable mTLS via METRICS_SCHEME,
METRICS_HOST, and METRICS_PORT env vars. The monitor controller creates
a server cert, Service, and ServiceMonitor for Prometheus integration.
Client auth trusts the tigera-ca-private CA rather than individual leaf
certs. Includes a custom Prometheus collector for operator status gauges.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants