[bitnami/redis] - add missing fields in service/pod monitor (#22809)

* [bitnami/redis] - add support for additional-endpoints in service/pod monitor

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* [bitnami/redis] - bump redis chart version

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - remove unnecessary selector from pod-monitor.yaml

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - update comment in values.yaml

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - Added metricRelabelings to distinguish between Sentinel and Redis container metrics

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - Added metricRelabelings to distinguish between Sentinel and Redis container metrics

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - bump version

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - revert test values

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - fix serviceMonitor port value

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - fix port comment in service/pod Monitor section

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* [bitnami/redis] - fix port comment in service/pod Monitor section

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: ShlomiTubul <shlomi.tubul@placer.ai>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: shlomi tubul <33376277+shlomitubul@users.noreply.github.com>
Signed-off-by: David Gomez <dgomezleon@vmware.com>
Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
Signed-off-by: Andrés Bono <andresbono@vmware.com>
Co-authored-by: ShlomiTubul <shlomi.tubul@placer.ai>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: David Gomez <dgomezleon@vmware.com>
Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
Co-authored-by: Andrés Bono <andresbono@vmware.com>
This commit is contained in:
shlomi tubul
2024-02-13 18:34:53 +02:00
committed by GitHub
parent 262b6ee64c
commit 4d174a3c20
5 changed files with 53 additions and 15 deletions

View File

@@ -34,4 +34,4 @@ maintainers:
name: redis
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis
version: 18.12.1
version: 18.13.0

View File

@@ -553,6 +553,7 @@ The command removes all the Kubernetes components associated with the chart and
| `metrics.service.loadBalancerSourceRanges` | Redis&reg; exporter service Load Balancer sources | `[]` |
| `metrics.service.annotations` | Additional custom annotations for Redis&reg; exporter service | `{}` |
| `metrics.service.clusterIP` | Redis&reg; exporter service Cluster IP | `""` |
| `metrics.serviceMonitor.port` | the service port to scrape metrics from | `http-metrics` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.namespace` | The namespace in which the ServiceMonitor will be created | `""` |
| `metrics.serviceMonitor.interval` | The interval at which metrics should be scraped | `30s` |
@@ -565,6 +566,7 @@ The command removes all the Kubernetes components associated with the chart and
| `metrics.serviceMonitor.sampleLimit` | Limit of how many samples should be scraped from every Pod | `false` |
| `metrics.serviceMonitor.targetLimit` | Limit of how many targets should be scraped | `false` |
| `metrics.serviceMonitor.additionalEndpoints` | Additional endpoints to scrape (e.g sentinel) | `[]` |
| `metrics.podMonitor.port` | the pod port to scrape metrics from | `metrics` |
| `metrics.podMonitor.enabled` | Create PodMonitor resource(s) for scraping metrics using PrometheusOperator | `false` |
| `metrics.podMonitor.namespace` | The namespace in which the PodMonitor will be created | `""` |
| `metrics.podMonitor.interval` | The interval at which metrics should be scraped | `30s` |

View File

@@ -18,7 +18,7 @@ metadata:
{{- end }}
spec:
podMetricsEndpoints:
- port: metrics
- port: {{ .Values.metrics.podMonitor.port }}
{{- if .Values.metrics.podMonitor.interval }}
interval: {{ .Values.metrics.podMonitor.interval }}
{{- end }}
@@ -42,6 +42,18 @@ spec:
{{- if .path }}
path: {{ .path }}
{{- end }}
{{- if .honorLabels }}
honorLabels: {{ .honorLabels }}
{{- end }}
{{- if .relabellings }}
relabelings: {{- toYaml .relabellings | nindent 6 }}
{{- end }}
{{- if .metricRelabelings }}
metricRelabelings: {{- toYaml .metricRelabelings | nindent 6 }}
{{- end }}
{{- if .scrapeTimeout }}
scrapeTimeout: {{ .scrapeTimeout }}
{{- end }}
{{- if .params }}
params:
{{- range $key, $value := .params }}

View File

@@ -18,7 +18,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: http-metrics
- port: {{ .Values.metrics.serviceMonitor.port }}
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
@@ -39,6 +39,18 @@ spec:
{{- if .interval }}
interval: {{ .interval }}
{{- end }}
{{- if .scrapeTimeout }}
scrapeTimeout: {{ .scrapeTimeout }}
{{- end }}
{{- if .honorLabels }}
honorLabels: {{ .honorLabels }}
{{- end }}
{{- if .relabellings }}
relabelings: {{- toYaml .relabellings | nindent 6 }}
{{- end }}
{{- if .metricRelabelings }}
metricRelabelings: {{- toYaml .metricRelabelings | nindent 6 }}
{{- end }}
{{- if .path }}
path: {{ .path }}
{{- end }}

View File

@@ -1763,6 +1763,9 @@ metrics:
## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
##
serviceMonitor:
## @param metrics.serviceMonitor.port the service port to scrape metrics from
##
port: http-metrics
## @param metrics.serviceMonitor.enabled Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator
##
enabled: false
@@ -1799,18 +1802,24 @@ metrics:
## @param metrics.serviceMonitor.additionalEndpoints Additional endpoints to scrape (e.g sentinel)
##
additionalEndpoints: []
# uncomment in order to scrape sentinel metrics
# - port: http-metrics
# interval: 30s
# path: /scrape
# uncomment in order to scrape sentinel metrics, also to in order distinguish between Sentinel and Redis container metrics
# add metricRelabelings with label like app=redis to main redis pod-monitor port
# - interval: "30s"
# path: "/scrape"
# port: "metrics"
# params:
# target:
# - localhost:26379
# target: ["localhost:26379"]
# metricRelabelings:
# - targetLabel: "app"
# replacement: "sentinel"
## Prometheus Pod Monitor
## ref: https://github.com/coreos/prometheus-operator
## https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#podmonitor
##
podMonitor:
## @param metrics.podMonitor.port the pod port to scrape metrics from
##
port: metrics
## @param metrics.podMonitor.enabled Create PodMonitor resource(s) for scraping metrics using PrometheusOperator
##
enabled: false
@@ -1829,6 +1838,8 @@ metrics:
## @param metrics.podMonitor.metricRelabelings Metrics RelabelConfigs to apply to samples before ingestion.
##
metricRelabelings: []
# - targetLabel: "app"
# replacement: "redis"
## @param metrics.podMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
##
honorLabels: false
@@ -1847,13 +1858,14 @@ metrics:
## @param metrics.podMonitor.additionalEndpoints Additional endpoints to scrape (e.g sentinel)
##
additionalEndpoints: []
# uncomment in order to scrape sentinel metrics
# - port: metrics
# interval: 30s
# path: /scrape
# - interval: "30s"
# path: "/scrape"
# port: "metrics"
# params:
# target:
# - localhost:26379
# target: ["localhost:26379"]
# metricRelabelings:
# - targetLabel: "app"
# replacement: "sentinel"
## Custom PrometheusRule to be defined
## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions