-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[bitnami/redis] Add Redis Sentinel Exporter #4916
[bitnami/redis] Add Redis Sentinel Exporter #4916
Conversation
Add support to get Prometheus metrics via the Redis Sentinel Exporter. For that the sentinel configuration contains a new section metrics, which adds an additional sidecar with the Redis Sentinel Exporter, when enabled.
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 so much for your PR! Please check my comments
Great! Thanks so much |
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files |
Hi @ricoberger , The @juan131 would you mind re-reviewing it? |
Awesome thank you very much 🙂🎉 |
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.
Some minor suggestions
@juan131 thank you, I applied your suggestions. Edit: Regarding my comment with the port name for the Sentinel Exporter: I would come up with an adjustment in a following PR, because I think this should also be changed for the Redis Exporter, if this is ok. |
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.
Thank you very much for the PR!
app: {{ template "redis.name" . }} | ||
chart: {{ template "redis.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
{{- range $key, $value := .Values.sentinel.metrics.serviceMonitor.selector }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} |
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.
These are the old labels, please use the common.labels function
app: {{ template "redis.name" . }} | ||
chart: {{ template "redis.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
app.kubernetes.io/component: "sentinel-metrics" | ||
{{- if .Values.sentinel.metrics.service.labels -}} | ||
{{- toYaml .Values.sentinel.metrics.service.labels | nindent 4 }} | ||
{{- end -}} |
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
app: {{ template "redis.name" . }} | ||
release: {{ .Release.Name }} |
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.
After changing the labels you will need to change the selector as well
@miguelaeh before I add your suggestions, I just want to make sure that this is really the way to go, because this would increase the inconsistent in this chart even more. |
Hi @miguelaeh , In this case I agree with @ricoberger. Please notice that all the changes you suggested are imported from the metrics (redis-exporter) configuration: charts/bitnami/redis/templates/metrics-prometheus.yaml Lines 12 to 18 in e105226
charts/bitnami/redis/templates/redis-node-statefulset.yaml Lines 353 to 359 in e105226
charts/bitnami/redis/templates/metrics-svc.yaml Lines 1 to 34 in e105226
|
We could adapt those things in this PR, but I'd incline for being consistent at the moment with the content of the chart and then make a second PR to standardize the Redis chart with a major release. |
when it is expected to be merged ? |
Hi guys, sorry I didn't notice about we were still using the old labels on this chart. I thought we updated them in the last major change. Forget about those labels comments |
@miguelaeh thanks for your review. I applied your suggestions, hopefully I didn't forgot sth. |
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.
Hi @ricoberger,
I added just some minor comments again, after that it look good to me
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.
LGTM!
This reverts commit b27be24.
Description of the change
Add support to get Prometheus metrics via the Redis Sentinel Exporter. For that the sentinel configuration contains a new section metrics, which adds an additional sidecar with the Redis Sentinel Exporter, when enabled.
Benefits
This allows a user to monitor Redis Sentinel within the Helm chart.
Applicable issues
Additional information
Currently this uses the following image from Docker Hub: https://hub.docker.com/r/leominov/redis_sentinel_exporter. The corresponding GitHub repository can be found here: https://github.com/leominov/redis_sentinel_exporter.
As mentioned by @marcosbc in #4909 let me know when the Bitnami image is ready, so that I can adjust the values file.
Checklist
Chart.yaml
according to semver.[bitnami/chart]
)values-production.yaml
apart fromvalues.yaml
, ensure that you implement the changes in both files