From ac37f5b2920a4fe54508f63612f3a8b47baca097 Mon Sep 17 00:00:00 2001 From: r0bj Date: Sun, 19 Jan 2025 11:27:53 -0800 Subject: [PATCH] make livenessProbe and readinessProbe optional Signed-off-by: r0bj --- charts/kube-state-metrics/Chart.yaml | 2 +- charts/kube-state-metrics/templates/deployment.yaml | 4 ++++ charts/kube-state-metrics/values.yaml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/kube-state-metrics/Chart.yaml b/charts/kube-state-metrics/Chart.yaml index bc94bd519956..fe5d7cfef1ad 100644 --- a/charts/kube-state-metrics/Chart.yaml +++ b/charts/kube-state-metrics/Chart.yaml @@ -7,7 +7,7 @@ keywords: - prometheus - kubernetes type: application -version: 5.28.0 +version: 5.29.0 appVersion: 2.14.0 home: https://github.com/kubernetes/kube-state-metrics/ sources: diff --git a/charts/kube-state-metrics/templates/deployment.yaml b/charts/kube-state-metrics/templates/deployment.yaml index bc93d42b714e..bb1af115cf03 100644 --- a/charts/kube-state-metrics/templates/deployment.yaml +++ b/charts/kube-state-metrics/templates/deployment.yaml @@ -178,6 +178,7 @@ spec: successThreshold: {{ .Values.startupProbe.successThreshold }} timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} {{- end }} + {{- if .Values.livenessProbe.enabled }} livenessProbe: failureThreshold: {{ .Values.livenessProbe.failureThreshold }} httpGet: @@ -196,6 +197,8 @@ spec: periodSeconds: {{ .Values.livenessProbe.periodSeconds }} successThreshold: {{ .Values.livenessProbe.successThreshold }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} readinessProbe: failureThreshold: {{ .Values.readinessProbe.failureThreshold }} httpGet: @@ -214,6 +217,7 @@ spec: periodSeconds: {{ .Values.readinessProbe.periodSeconds }} successThreshold: {{ .Values.readinessProbe.successThreshold }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} {{- if .Values.containerSecurityContext }} diff --git a/charts/kube-state-metrics/values.yaml b/charts/kube-state-metrics/values.yaml index 948eb587269a..d447d0e5b763 100644 --- a/charts/kube-state-metrics/values.yaml +++ b/charts/kube-state-metrics/values.yaml @@ -527,6 +527,7 @@ startupProbe: ## Liveness probe ## livenessProbe: + enabled: true failureThreshold: 3 httpGet: httpHeaders: [] @@ -539,6 +540,7 @@ livenessProbe: ## Readiness probe ## readinessProbe: + enabled: true failureThreshold: 3 httpGet: httpHeaders: []