-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add servicemonitors #159
base: main
Are you sure you want to change the base?
Add servicemonitors #159
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read and understood the CLA and hereby agree to its terms by making this Pull Request Comment. |
recheck |
Please review @orishoshan and we can add on/improve with servicemonitor for credentials operator |
Hey @seeker815, having a look now :) |
app.kubernetes.io/version: {{ .Chart.Version }} | ||
spec: | ||
endpoints: | ||
- port: https |
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.
Does this work? I think the metrics are served on port 2112.
Can you create a helper template (https://github.com/otterize/helm-charts/blob/main/intents-operator/templates/_helpers.tpl) for the port, and then use the template in both places?
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.
It works, as we are referring to the same metrics port 2112. The service definition for intents-operator-controller-manager-metrics-service has it is labelled as https
, see service definition below
- name: https
port: 2112
protocol: TCP
targetPort: 2112
selector:
app: intents-operator
Maybe we could change the port name for service definition at some point for cleaner name. Do we need helper template or not needed after the above clarification @orishoshan
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.
@seeker815 Please fix the port name in the Service then :) The port in the Deployment is correctly labeled "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.
I will change that as well, thanks
app.kubernetes.io/version: {{ .Chart.Version }} | ||
spec: | ||
endpoints: | ||
- port: 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.
Same comment here re the metrics port
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.
This is also related to service port labelling which we are referring to in the service monitor, the otterize-network-mapper has
ports:
- name: http
port: 9090
protocol: TCP
targetPort: 9090
Please update the README.md for each component (the Markdown table documenting the Helm values), and also add a configuration in .Values.global.serviceMonitor that enables it for all components together. The behavior you should have: .Values.networkMapper.serviceMonitor and .Values.intentsOperator.serviceMonitor should be preferred if they are set. If not set, use the value from .Values.global.serviceMonitor. |
Description
Enable ServiceMonitors resources for intents operator and network mapper which Prometheus can use to scrape metrics endpoints.
Checklist