Skip to content
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

Extend metrics #38

Merged
merged 8 commits into from
Sep 18, 2023
Merged

Extend metrics #38

merged 8 commits into from
Sep 18, 2023

Conversation

oribon
Copy link
Member

@oribon oribon commented Aug 29, 2023

Depends on #33
this aligns the ports to not clash with MetalLB and adds some metrics

@oribon oribon force-pushed the moremetrics branch 3 times, most recently from e000e5a to 93f5652 Compare August 29, 2023 09:41
@fedepaol
Copy link
Member

fedepaol commented Sep 8, 2023

just align the helm charts too
All the rest looks fine

Changing the metrics port so this pod does not clash
with MetalLB's HTTP port

Signed-off-by: Ori Braunshtein <[email protected]>
Similarly to MetalLB we add some metrics regarding k8s updates.
Also these register with the global controller-runtime metrics so we get
some for free.

Signed-off-by: Ori Braunshtein <[email protected]>
Add a metric for the amount of prefixes received on a BGP session.

Signed-off-by: Ori Braunshtein <[email protected]>
Signed-off-by: Ori Braunshtein <[email protected]>
@oribon
Copy link
Member Author

oribon commented Sep 12, 2023

just align the helm charts too All the rest looks fine

done

@@ -188,7 +188,7 @@ spec:
args:
- "--node-name=$(NODE_NAME)"
- "--namespace=$(NAMESPACE)"
- "--metrics-bind-address=127.0.0.1:{{ .Values.prometheus.metricsPort }}"
- "--metrics-bind-address=:{{ .Values.prometheus.metricsPort }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think binding to 127.0.0.1 is better than listening on any

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it here so it is aligned with the regular manifests and the code's default (when we generated the controller), do you think we should change it everywhere?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think this is better as the pod is hostnetworked adn we won't expose the port outside.

Since the pods are host-networked  we should restrict the HTTP metrics endpoints to lo,
allowing access from outside only to the HTTPs kube-rbac-proxy endpoints.

Signed-off-by: Ori Braunshtein <[email protected]>
Now that the HTTP metrics endpoints listen only on lo
we need to access them through the rbac-proxy endpoint when
coming from outside (from the prometheus pod).

Signed-off-by: Ori Braunshtein <[email protected]>
@fedepaol
Copy link
Member

LGTM

@fedepaol fedepaol added this pull request to the merge queue Sep 18, 2023
Merged via the queue into metallb:main with commit ee5a41f Sep 18, 2023
9 checks passed
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.

2 participants