-
Notifications
You must be signed in to change notification settings - Fork 554
[Feature]: Add serviceMonitor for kuberay-operator (#3207) #3208
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
Conversation
feat: Add kuberay-operator serviceMonitor helm template(#0) See merge request cloudml-aie/kuberay!3
cc @win5923 Thank you for give some suggestions. This is my first pr on kuberay repo |
Hi @dushulin, Thanks for the PR. |
endpoints: | ||
- path: /metrics | ||
targetPort: http |
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.
Could you add an interval
field under the endpoints section? This helps control how frequently Prometheus scrapes the metrics.
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.
Also add honorLabels
, it preserves the metric’s labels when they collide with the target’s labels
# For kuberay-operator metric export by prometheus operator | ||
serviceMonitor: | ||
# If enabled, serviceMonitor will be created, expose /metrics http endpoint to prometheus | ||
enabled: false |
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.
Also here
Hi @kevin85421, this PR add serviceMonitor for KubeRay Operator in helm chart, PTAL |
metadata: | ||
name: {{ include "kuberay-operator.fullname" . }} |
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.
I think we also need to provide metadata.labels.release
to the name of label selected by Prometheus. Otherwise this config won't work. Right? By default is release: prometheus
.
We can provide a flag let user to set it.
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.
You can refer to ArgoCD's implementation.
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.
@win5923 Thanks, I will refer to ArgoCD's implementation, and I will test this in my local env. I provide too few parameters for users to set.
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.
Yeah I also tested this. I have to add the release label so that the serviceMonitor would be selected by prometheus.
cc @troychiu @owenowenisme can you also review this PR? Thanks! |
@@ -161,6 +161,12 @@ env: | |||
# - name: DELETE_RAYJOB_CR_AFTER_JOB_FINISHES | |||
# value: "false" | |||
|
|||
# For kuberay-operator metric export by prometheus operator | |||
serviceMonitor: | |||
# If enabled, serviceMonitor will be created, expose /metrics http endpoint to prometheus |
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.
IIUC, a serviceMonitor is telling prom where to scrape metrics. This comment seems not like how it works. Do you mind double-checking it? Thank you!
@@ -161,6 +161,12 @@ env: | |||
# - name: DELETE_RAYJOB_CR_AFTER_JOB_FINISHES | |||
# value: "false" | |||
|
|||
# For kuberay-operator metric export by prometheus operator |
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.
Same here
Hi @dushulin. Do you mind taking a look at the comments as well as the lint error? Thank you! |
@kevin85421 @troychiu sorry, please open a new one, because I haven't complete manul test yet, maybe block release. |
Sounds good. Let me create one shortly. |
Closed in favor of #3717 |
Add serviceMonitor for kuberay-operator