Skip to content

fix: enable controller metrics endpoint in Helm chart#195

Merged
Defilan merged 1 commit intomainfrom
fix/controller-metrics-endpoint
Mar 1, 2026
Merged

fix: enable controller metrics endpoint in Helm chart#195
Defilan merged 1 commit intomainfrom
fix/controller-metrics-endpoint

Conversation

@Defilan
Copy link
Member

@Defilan Defilan commented Mar 1, 2026

Summary

  • The controller-manager deployment was missing --metrics-bind-address, causing controller-runtime to default to "0" (disabled). The metrics Service existed but had no backend.
  • Adds --metrics-bind-address and --metrics-secure flags from Helm values, defines named container ports, fixes Service targetPort, and adds optional NodePort support for external scraping.
  • Defaults metrics.secure: true (HTTPS with authn/authz) — users must explicitly opt into insecure mode.

Fixes #194

Test plan

  • Deploy with default values (metrics.secure: true, service.type: ClusterIP) — verify curl -k https://<controller-pod>:8443/metrics returns metrics
  • Deploy with metrics.secure=false — verify curl http://<controller-pod>:8443/metrics returns metrics
  • Deploy with metrics.service.type=NodePort, metrics.service.nodePort=30443 — verify NodePort is accessible
  • Deploy with metrics.enabled=false — verify no metrics args or ports in pod spec
  • Verify existing Prometheus ServiceMonitor still works with ClusterIP default

The controller-manager deployment was missing the --metrics-bind-address
flag, causing controller-runtime to default to "0" (disabled). This meant
the metrics Service had no backend and Prometheus scraping got connection
refused.

Changes:
- Pass --metrics-bind-address and --metrics-secure from Helm values
- Add named container ports (health, metrics) to deployment spec
- Fix metrics Service targetPort to reference named port
- Add optional nodePort field for external scraping
- Default metrics.secure to true (HTTPS with authn/authz)

Fixes #194

Signed-off-by: Christopher Maher <chris@defilan.com>
@Defilan Defilan force-pushed the fix/controller-metrics-endpoint branch from e5bf5a6 to 4796e64 Compare March 1, 2026 20:13
@Defilan Defilan merged commit 70940af into main Mar 1, 2026
15 checks passed
@Defilan Defilan deleted the fix/controller-metrics-endpoint branch March 1, 2026 22:12
This was referenced Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controller metrics endpoint disabled by default in Helm chart

1 participant