Skip to content

Commit

Permalink
fix(): Add optional exporter checks
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Doyle <[email protected]>
  • Loading branch information
sonrai-doyle committed Mar 9, 2023
1 parent bb6cb8f commit ba79365
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
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.23.0
version: 4.23.1
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
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 @@ -158,6 +158,8 @@ 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.livenessProbe.enabled` | Enable the liveness probe on the exporter container| `true` |
| `exporter.readinessProbe.enabled` | Enable the readiness probe on the exporter container| `true` |
| `haproxy.enabled` | Enabled HAProxy LoadBalancing/Proxy | `false` |
| `haproxy.replicas` | Number of HAProxy instances | `3` |
| `haproxy.servicePort` | Modify HAProxy service port | `6379` |
Expand Down
4 changes: 4 additions & 0 deletions charts/redis-ha/templates/redis-ha-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,20 +486,24 @@ spec:
- name: REDIS_EXPORTER_TLS_CA_CERT_FILE
value: /tls-certs/{{ .Values.tls.caCertFile }}
{{- end }}
{{- if .Values.exporter.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.exporter.scrapePath }}
port: {{ .Values.exporter.port }}
initialDelaySeconds: {{ .Values.exporter.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.exporter.livenessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.exporter.livenessProbe.periodSeconds }}
{{- end }}
{{- if .Values.exporter.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.exporter.scrapePath }}
port: {{ .Values.exporter.port }}
initialDelaySeconds: {{ .Values.exporter.readinessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.exporter.readinessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.exporter.readinessProbe.periodSeconds }}
{{- end }}
resources:
{{ toYaml .Values.exporter.resources | indent 10 }}
ports:
Expand Down
2 changes: 2 additions & 0 deletions charts/redis-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,13 @@ exporter:
# prometheus exporter SCANS redis db which can take some time
# allow different probe settings to not let container crashloop
livenessProbe:
enabled: true
initialDelaySeconds: 15
timeoutSeconds: 3
periodSeconds: 15

readinessProbe:
enabled: true
initialDelaySeconds: 15
timeoutSeconds: 3
periodSeconds: 15
Expand Down

0 comments on commit ba79365

Please sign in to comment.