Skip to content

Commit

Permalink
make livenessProbe and readinessProbe optional
Browse files Browse the repository at this point in the history
Signed-off-by: r0bj <[email protected]>
  • Loading branch information
r0bj committed Jan 19, 2025
1 parent d38cc0f commit ac37f5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kube-state-metrics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions charts/kube-state-metrics/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ spec:
successThreshold: {{ .Values.startupProbe.successThreshold }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ startupProbe:
## Liveness probe
##
livenessProbe:
enabled: true
failureThreshold: 3
httpGet:
httpHeaders: []
Expand All @@ -539,6 +540,7 @@ livenessProbe:
## Readiness probe
##
readinessProbe:
enabled: true
failureThreshold: 3
httpGet:
httpHeaders: []
Expand Down

0 comments on commit ac37f5b

Please sign in to comment.