Skip to content

Commit

Permalink
[kube-state-metrics] add option to set updateStrategy to Recreate (pr…
Browse files Browse the repository at this point in the history
…ometheus-community#3766)

* [kube-state-metrics] add option to set updateStrategy to Recreate

Signed-off-by: Luvpreet Singh <[email protected]>
  • Loading branch information
luvpreetsingh authored and Matiasmct committed Mar 20, 2024
1 parent 436f8b5 commit d1e8a2d
Show file tree
Hide file tree
Showing 3 changed files with 8 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.12.1
version: 5.13.0
appVersion: 2.10.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 @@ -18,6 +18,10 @@ spec:
matchLabels:
{{- include "kube-state-metrics.selectorLabels" . | indent 6 }}
replicas: {{ .Values.replicas }}
{{- if not .Values.autosharding.enabled }}
strategy:
type: {{ .Values.updateStrategy | default "RollingUpdate" }}
{{- end }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if .Values.autosharding.enabled }}
serviceName: {{ template "kube-state-metrics.fullname" . }}
Expand Down
3 changes: 3 additions & 0 deletions charts/kube-state-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ autosharding:

replicas: 1

# Change the deployment strategy when autosharding is disabled
# updateStrategy: Recreate

# Number of old history to retain to allow rollback
# Default Kubernetes value is set to 10
revisionHistoryLimit: 10
Expand Down

0 comments on commit d1e8a2d

Please sign in to comment.