From ad1d2ddc0be45ae31853a80a30b7959dd9078f94 Mon Sep 17 00:00:00 2001 From: Karen Almog Date: Wed, 20 Sep 2023 16:45:23 +0200 Subject: [PATCH] add endpointAdditionalProperties for redis-ha and haproxy serviceMonitor Signed-off-by: Karen Almog --- charts/redis-ha/Chart.yaml | 2 +- charts/redis-ha/README.md | 2 ++ charts/redis-ha/templates/redis-ha-servicemonitor.yaml | 3 +++ .../redis-ha/templates/redis-haproxy-servicemonitor.yaml | 3 +++ charts/redis-ha/values.yaml | 9 ++++++--- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index a04c9aa2..365094bd 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.23.0 +version: 4.24.0 appVersion: 7.0.9 description: This Helm chart provides a highly available Redis implementation with a master/slave configuration and uses Sentinel sidecars for failover management icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png diff --git a/charts/redis-ha/README.md b/charts/redis-ha/README.md index 4d263525..68e8b422 100644 --- a/charts/redis-ha/README.md +++ b/charts/redis-ha/README.md @@ -158,6 +158,7 @@ The following table lists the configurable parameters of the Redis chart and the | `exporter.serviceMonitor.telemetryPath` | Path to redis-exporter telemetry-path | `/metrics` | | `exporter.serviceMonitor.labels` | Labels for the servicemonitor passed to Prometheus Operator | `{}` | | `exporter.serviceMonitor.timeout` | How long until a scrape request times out. If not set, the Prometheus default scape timeout is used | `nil` | +| `exporter.serviceMonitor.endpointAdditionalProperties` | Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. | `{}` | | `haproxy.enabled` | Enabled HAProxy LoadBalancing/Proxy | `false` | | `haproxy.replicas` | Number of HAProxy instances | `3` | | `haproxy.servicePort` | Modify HAProxy service port | `6379` | @@ -195,6 +196,7 @@ The following table lists the configurable parameters of the Redis chart and the | `haproxy.metrics.serviceMonitor.telemetryPath` | Path to HAProxy metrics telemetry-path | `/metrics` | | `haproxy.metrics.serviceMonitor.labels` | Labels for the HAProxy metrics servicemonitor passed to Prometheus Operator | `{}` | | `haproxy.metrics.serviceMonitor.timeout` | How long until a scrape request times out. If not set, the Prometheus default scape timeout is used | `nil` | +| `haproxy.metrics.serviceMonitor.endpointAdditionalProperties` | Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. | `{}` | | `haproxy.init.resources` | Extra init resources | `{}` | | `haproxy.timeout.connect` | haproxy.cfg `timeout connect` setting | `4s` | | `haproxy.timeout.server` | haproxy.cfg `timeout server` setting | `30s` | diff --git a/charts/redis-ha/templates/redis-ha-servicemonitor.yaml b/charts/redis-ha/templates/redis-ha-servicemonitor.yaml index 4cf96f40..08542297 100644 --- a/charts/redis-ha/templates/redis-ha-servicemonitor.yaml +++ b/charts/redis-ha/templates/redis-ha-servicemonitor.yaml @@ -23,6 +23,9 @@ spec: {{- end }} {{- if .Values.exporter.serviceMonitor.timeout }} scrapeTimeout: {{ .Values.exporter.serviceMonitor.timeout }} +{{- end }} +{{- with .Values.exporter.serviceMonitor.endpointAdditionalProperties }} +{{- toYaml . | nindent 4 }} {{- end }} jobLabel: {{ template "redis-ha.fullname" . }} namespaceSelector: diff --git a/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml b/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml index 056ce4b3..52a84b95 100644 --- a/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml +++ b/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml @@ -23,6 +23,9 @@ spec: {{- end }} {{- if .Values.haproxy.metrics.serviceMonitor.timeout }} scrapeTimeout: {{ .Values.haproxy.metrics.serviceMonitor.timeout }} +{{- end }} +{{- with .Values.haproxy.metrics.serviceMonitor.endpointAdditionalProperties }} +{{- toYaml . | nindent 4 }} {{- end }} jobLabel: {{ template "redis-ha.fullname" . }}-haproxy namespaceSelector: diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 0f14820f..d7a00cee 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -105,7 +105,6 @@ haproxy: # maxUnavailable: 1 # minAvailable: 1 - ## Enable sticky sessions to Redis nodes via HAProxy ## Very useful for long-living connections as in case of Sentry for example stickyBalancing: false @@ -145,9 +144,11 @@ haproxy: # Set path to redis-exporter telemtery-path # telemetryPath: /metrics # Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator - # labels: {} + labels: {} # Set timeout for scrape # timeout: 10s + # Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. + endpointAdditionalProperties: {} init: resources: {} timeout: @@ -527,9 +528,11 @@ exporter: # Set path to redis-exporter telemtery-path # telemetryPath: /metrics # Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator - # labels: {} + labels: {} # Set timeout for scrape # timeout: 10s + # Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. + endpointAdditionalProperties: {} # prometheus exporter SCANS redis db which can take some time # allow different probe settings to not let container crashloop