diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index 6ee9c06..254e1b7 100644 --- a/charts/redis-ha/Chart.yaml +++ b/charts/redis-ha/Chart.yaml @@ -5,7 +5,7 @@ keywords: - redis - keyvalue - database -version: 4.29.0 +version: 4.29.1 appVersion: 7.2.4 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 3989a78..a7b5b62 100644 --- a/charts/redis-ha/README.md +++ b/charts/redis-ha/README.md @@ -255,6 +255,7 @@ The following table lists the configurable parameters of the Redis chart and the | `haproxy.metrics.port` | HAProxy prometheus metrics scraping port | int | `9101` | | `haproxy.metrics.portName` | HAProxy metrics scraping port name | string | `"http-exporter-port"` | | `haproxy.metrics.scrapePath` | HAProxy prometheus metrics scraping path | string | `"/metrics"` | +| `haproxy.metrics.serviceMonitor.disableAPICheck` | Disable API Check on ServiceMonitor | bool | `false` | | `haproxy.metrics.serviceMonitor.enabled` | When set true then use a ServiceMonitor to configure scraping | bool | `false` | | `haproxy.metrics.serviceMonitor.endpointAdditionalProperties` | Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. | object | `{}` | | `haproxy.metrics.serviceMonitor.interval` | Set how frequently Prometheus should scrape (default is 30s) | string | `""` | @@ -324,6 +325,7 @@ The following table lists the configurable parameters of the Redis chart and the | `exporter.resources` | cpu/memory resource limits/requests | object | `{}` | | `exporter.scrapePath` | Exporter scrape path | string | `"/metrics"` | | `exporter.script` | A custom custom Lua script that will be mounted to exporter for collection of custom metrics. Creates a ConfigMap and sets env var `REDIS_EXPORTER_SCRIPT`. | string | `""` | +| `exporter.serviceMonitor.disableAPICheck` | Disable API Check on ServiceMonitor | bool | `false` | | `exporter.serviceMonitor.enabled` | When set true then use a ServiceMonitor to configure scraping | bool | `false` | | `exporter.serviceMonitor.endpointAdditionalProperties` | Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. | object | `{}` | | `exporter.serviceMonitor.interval` | Set how frequently Prometheus should scrape (default is 30s) | string | `""` | diff --git a/charts/redis-ha/templates/redis-ha-servicemonitor.yaml b/charts/redis-ha/templates/redis-ha-servicemonitor.yaml index 0854229..6b374a8 100644 --- a/charts/redis-ha/templates/redis-ha-servicemonitor.yaml +++ b/charts/redis-ha/templates/redis-ha-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.exporter.serviceMonitor.enabled ) ( .Values.exporter.enabled ) }} +{{- if and ( or .Values.exporter.serviceMonitor.disableAPICheck ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ) ( .Values.exporter.serviceMonitor.enabled ) ( .Values.exporter.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml b/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml index 52a84b9..188eac0 100644 --- a/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml +++ b/charts/redis-ha/templates/redis-haproxy-servicemonitor.yaml @@ -1,4 +1,4 @@ -{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ( .Values.haproxy.metrics.serviceMonitor.enabled ) ( .Values.haproxy.metrics.enabled ) }} +{{- if and ( or .Values.haproxy.metrics.serviceMonitor.disableAPICheck ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) ) ( .Values.haproxy.metrics.serviceMonitor.enabled ) ( .Values.haproxy.metrics.enabled ) }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 6bb6608..2621632 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -210,6 +210,8 @@ haproxy: timeout: "" # -- Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. endpointAdditionalProperties: {} + # -- Disable API Check on ServiceMonitor + disableAPICheck: false init: # -- Extra init resources resources: {} @@ -762,6 +764,8 @@ exporter: timeout: "" # -- Set additional properties for the ServiceMonitor endpoints such as relabeling, scrapeTimeout, tlsConfig, and more. endpointAdditionalProperties: {} + # -- Disable API Check on ServiceMonitor + disableAPICheck: false # prometheus exporter SCANS redis db which can take some time # allow different probe settings to not let container crashloop