-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/metrics #42
Fix/metrics #42
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mneverov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@aojea ptal |
we found that opening multiple ports for expose different endpoints ends causing problems, specially in host network pods, what do you think if we add a new flag This way we just maintain one server and use one port, using the url to discriminate |
Good idea, wanted to combine those two initially, but then checked controller-runtime and it has 3 webservers: webhook, probe, and metrics. |
@@ -166,3 +166,11 @@ func runControllers(ctx context.Context, kubeClient kubernetes.Interface, cfg *r | |||
|
|||
nodeIpamController.Run(ctx) | |||
} | |||
|
|||
func bindingAddress(cfg config) string { | |||
if cfg.HealthProbeAddr != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default HealthProbeAddr
is empty now. Add this check for existing clusters.
The default addr value :8081
from HealthProbeAddr
is now specified for WebserverBindAddr
…be-address env. variable.
/lgtm Thanks |
Requested metrics had existed, but were not exposed.
This patch:
IPAM_METRICS_ADDR
env. var)k8s.io/component-base/metrics/legacyregistry
withprometheus/client_golang
init
func instead of using sync.OnceFixes #40