From 9242c74e89b036da79beac168578f5776c611f90 Mon Sep 17 00:00:00 2001 From: Adam Doyle Date: Wed, 7 Sep 2022 11:12:33 -0300 Subject: [PATCH] fix(): Add optional exporter checks Signed-off-by: Adam Doyle --- charts/redis-ha/Chart.yaml | 2 +- .../redis-ha/templates/redis-ha-statefulset.yaml | 14 ++------------ charts/redis-ha/values.yaml | 10 ++++++++-- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/charts/redis-ha/Chart.yaml b/charts/redis-ha/Chart.yaml index a04c9aa..b48a3db 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.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 diff --git a/charts/redis-ha/templates/redis-ha-statefulset.yaml b/charts/redis-ha/templates/redis-ha-statefulset.yaml index 251beba..c17f1d2 100644 --- a/charts/redis-ha/templates/redis-ha-statefulset.yaml +++ b/charts/redis-ha/templates/redis-ha-statefulset.yaml @@ -487,19 +487,9 @@ spec: value: /tls-certs/{{ .Values.tls.caCertFile }} {{- end }} 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 }} +{{ toYaml .Values.exporter.livenessProbe | indent 10 }} 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 }} +{{ toYaml .Values.exporter.readinessProbe | indent 10 }} resources: {{ toYaml .Values.exporter.resources | indent 10 }} ports: diff --git a/charts/redis-ha/values.yaml b/charts/redis-ha/values.yaml index 0f14820..4ab5364 100644 --- a/charts/redis-ha/values.yaml +++ b/charts/redis-ha/values.yaml @@ -474,9 +474,9 @@ exporter: pullPolicy: IfNotPresent # prometheus port & scrape path - port: 9121 + port: &exporter_port 9121 portName: exporter-port - scrapePath: /metrics + scrapePath: &exporter_scrapePath /metrics # Address/Host for Redis instance. Default: localhost # Exists to circumvent issues with IPv6 dns resolution that occurs on certain environments @@ -534,11 +534,17 @@ exporter: # prometheus exporter SCANS redis db which can take some time # allow different probe settings to not let container crashloop livenessProbe: + httpGet: + path: *exporter_scrapePath + port: *exporter_port initialDelaySeconds: 15 timeoutSeconds: 3 periodSeconds: 15 readinessProbe: + httpGet: + path: *exporter_scrapePath + port: *exporter_port initialDelaySeconds: 15 timeoutSeconds: 3 periodSeconds: 15