Skip to content

Commit

Permalink
[charts/redis-ha] Add disableAPICheck to skip api checks for servicem…
Browse files Browse the repository at this point in the history
…onitor (#278)

* Update redis-ha-servicemonitor.yaml

* Update redis-haproxy-servicemonitor.yaml

* Update values.yaml

* Update redis-haproxy-servicemonitor.yaml

* Update README.md

* Update README.md

* Update README.md

* Update Chart.yaml

bump version

* Bringing up to date.

Signed-off-by: Aaron Layfield <[email protected]>

* Missed docs on value.

Signed-off-by: Aaron Layfield <[email protected]>

---------

Signed-off-by: Aaron Layfield <[email protected]>
Co-authored-by: Aaron Layfield <[email protected]>
  • Loading branch information
psychomantys and DandyDeveloper authored Nov 6, 2024
1 parent 5600960 commit ef60e7b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/redis-ha/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/redis-ha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `""` |
Expand Down Expand Up @@ -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 | `""` |
Expand Down
2 changes: 1 addition & 1 deletion charts/redis-ha/templates/redis-ha-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
4 changes: 4 additions & 0 deletions charts/redis-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ef60e7b

Please sign in to comment.