-
Notifications
You must be signed in to change notification settings - Fork 204
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
Support kubernetes_role argument for prometheus.operator.servicemonitors #2008
Conversation
Zheng Yong seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
4acf86c
to
56ca5a8
Compare
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.
Thanks! I believe that your GitHub user is different to the one used to create Git commits and because of that the CLA signing is not passing. Could you try making sure you use the email associated with your GitHub account? This can be done without exposing your actual email address.
@@ -24,6 +24,8 @@ type Arguments struct { | |||
// Namespaces to search for monitor resources. Empty implies All namespaces | |||
Namespaces []string `alloy:"namespaces,attr,optional"` | |||
|
|||
KubernetesRole string `alloy:"kubernetes_role,attr,optional"` |
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.
We will need to document this in user-facing docs:
- https://github.com/grafana/alloy/blob/main/docs/sources/reference/components/prometheus/prometheus.operator.podmonitors.md
- https://github.com/grafana/alloy/blob/main/docs/sources/reference/components/prometheus/prometheus.operator.servicemonitors.md
- https://github.com/grafana/alloy/blob/main/docs/sources/reference/components/prometheus/prometheus.operator.probes.md
Thanks for the review @thampiotr ! Just realized my previous changelog and docs were not updated. Updated those. I'll change the other monitors that use this argument. One question: Since my previous commit email cannot be changed, should I close this and open up a new PR instead? |
Actually one more question. I noticed for probes and podmonitors it seems more proper to have the role fixed to ingress and pod respectively. I'll leave the decision to you on whether I should enable the role override for |
@thampiotr I created a new one #2023 seems the CLA is passing there. |
Let's leave them as they are and only change servicemonitors for now. |
Cool, let's move conversation there. |
PR Description
This PR adds support for endpointslice role in
prometheus.operator.servicemonitors
. Before this PR, the role defaults to endpoints. So there was no way to have servicemonitor to scrape an endpointslice in alloy.Example config in alloy after this PR.
Which issue(s) this PR fixes
Fixes #1714
Notes to the Reviewer
PR Checklist