-
Notifications
You must be signed in to change notification settings - Fork 49
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
Adding a service to expose Operator SDK metrics #22
Conversation
content looks good to me. The only question I have is whether we'd separate out the service into its own config file. The other config directories seem to have resources be mostly separate (for example: https://github.com/opendatahub-io/data-science-pipelines-operator/tree/main/config/rbac), and I'm not familiar enough with the conventions. Perhaps another reviewer can make a suggestion. |
Yes, that makes sense. Updated to have the service in a separate config file, and called it in the |
Can you confirm that the servicemonitor works? Confirm this by checking if the metrics show up in ocp monitoring stack. My guess is it won't work because it's missing the labels for the selector here: https://github.com/opendatahub-io/data-science-pipelines-operator/blob/main/config/prometheus/monitor.yaml The |
By "it", did you mean the service? The service has to have the same labels as the servicemonitor? |
it here refers to the servicemonitor, which will not work if it cannot select on the labels for the service |
@DharmitD you should also test by port-forwarding the service, not the pod |
I updated the service to add the same label as the service monitor. Tried port forwarding through the service: The port forward worked, further queried metrics using |
Added a ServiceMonitor config in #24 with labels matching to the above service config. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DharmitD, HumairAK 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 |
[pull] main from opendatahub-io:main
Description
Adding a service to expose Operator SDK metrics port
How Has This Been Tested?
On a test cluster:
oc port-forward svc/data-science-pipelines-operator 8080:8080 -n data-science-pipelines-operator
curl -v http://localhost:8080/metrics
Find a list of metrics returned by the curl command here.
Merge criteria: