fix: enable controller metrics endpoint in Helm chart#195
Merged
Conversation
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>
e5bf5a6 to
4796e64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--metrics-bind-address, causing controller-runtime to default to"0"(disabled). The metrics Service existed but had no backend.--metrics-bind-addressand--metrics-secureflags from Helm values, defines named container ports, fixes Service targetPort, and adds optional NodePort support for external scraping.metrics.secure: true(HTTPS with authn/authz) — users must explicitly opt into insecure mode.Fixes #194
Test plan
metrics.secure: true,service.type: ClusterIP) — verifycurl -k https://<controller-pod>:8443/metricsreturns metricsmetrics.secure=false— verifycurl http://<controller-pod>:8443/metricsreturns metricsmetrics.service.type=NodePort,metrics.service.nodePort=30443— verify NodePort is accessiblemetrics.enabled=false— verify no metrics args or ports in pod spec