Skip to content

Commit

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

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

Signed-off-by: Luvpreet Singh <[email protected]>
  • Loading branch information
luvpreetsingh authored Sep 7, 2023
1 parent 3352ef8 commit 706ee46
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 706ee46

Please sign in to comment.