Repository navigation
Conversation
|
|
GitHubxsy
force-pushed
the
feat/prometheus-bind-address
branch
from
December 3, 2026 06:27
ef1f7c9 to
6f26470
Compare
Signed-off-by: xsy <xieshiyi1@huawei.com>
GitHubxsy
force-pushed
the
feat/prometheus-bind-address
branch
from
December 3, 2026 06:29
6f26470 to
d269304
Compare
This branch has not been deployed
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.
What this PR does / why we need it
Gatekeeper's Prometheus exporter listens on all local interfaces. Operators can change its port, but cannot restrict the listener to loopback when a collector runs alongside Gatekeeper in the same Pod.
Add
--prometheus-bind-addressand expose it to both the audit and controller-manager Deployments through the Helm valueprometheusBindAddress. For example, setting the value to127.0.0.1restricts scraping to IPv4 loopback. The default remains an empty host so existing Pod IP and Service scrapes continue to work. Each Deployment keeps its own metrics port.Special notes for your reviewer
The exporter uses
net.JoinHostPortso an IPv6 address such as::1works with the existing--prometheus-portflag. The controller-runtime metrics listener is independent of this exporter.Testing
/metricson both loopback families.make native-testrun failed with linker processes killed and envtest API server startup timeouts. Localmake lintcould not run because Docker was unavailable.