Skip to content

Commit

Permalink
[alertmanager] Add support for minReadySeconds (#4216)
Browse files Browse the repository at this point in the history
* [alertmanager] Add support for minReadySeconds

Signed-off-by: Doris Zhou <[email protected]>

* Update charts/alertmanager/templates/statefulset.yaml

Co-authored-by: André Bauer <[email protected]>
Signed-off-by: Doris Zhou <[email protected]>

* Update charts/alertmanager/values.yaml

Co-authored-by: André Bauer <[email protected]>
Signed-off-by: Doris Zhou <[email protected]>

---------

Signed-off-by: Doris Zhou <[email protected]>
Signed-off-by: Doris Zhou <[email protected]>
Co-authored-by: André Bauer <[email protected]>
  • Loading branch information
doris-zhou and monotek authored Feb 2, 2024
1 parent b8f7082 commit ba9682d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/alertmanager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/a
sources:
- https://github.com/prometheus/alertmanager
type: application
version: 1.7.0
version: 1.8.0
appVersion: v0.26.0
kubeVersion: ">=1.19.0-0"
keywords:
Expand Down
1 change: 1 addition & 0 deletions charts/alertmanager/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
namespace: {{ include "alertmanager.namespace" . }}
spec:
replicas: {{ .Values.replicaCount }}
minReadySeconds: {{ .Values.minReadySeconds }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
Expand Down
7 changes: 7 additions & 0 deletions charts/alertmanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ topologySpreadConstraints: []
statefulSet:
annotations: {}

## Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to
## be considered available. Defaults to 0 (pod will be considered available as soon as it is ready).
## This is an alpha field from kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds
## feature gate.
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#minimum-ready-seconds
minReadySeconds: 0

podAnnotations: {}
podLabels: {}

Expand Down

1 comment on commit ba9682d

@studentsignum
Copy link

@studentsignum studentsignum commented on ba9682d Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to overcome this problem.

i get my current_values by

❯ helm show values prometheus-community/prometheus -n prometheus

after edit some configuration i can't upgrade my helm because of my kubernetes version still at 1.21. it mention in this page that we just only need kubernetes version 1.19

❯ helm upgrade prometheus prometheus-community/prometheus -n prometheus -f current_values.yaml
Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(StatefulSet.spec): unknown field "minReadySeconds" in io.k8s.api.apps.v1.StatefulSetSpec

❯ kubectl version --short
Client Version: v1.21.1
Server Version: v1.21.14-eks-5e0fdde

thank you!

Please sign in to comment.