Skip to content

Commit

Permalink
[prometheus] allow more flexible poddisruptionbudget config (#3772)
Browse files Browse the repository at this point in the history
* fix(prometheus): allow more flexible poddisruptionbudget config

Signed-off-by: Starlight Romero <[email protected]>

* chore(prometheus): bump helm chart version

Signed-off-by: Starlight Romero <[email protected]>

* Update charts/prometheus/values.yaml

Co-authored-by: zeritti <[email protected]>
Signed-off-by: Starlight Romero <[email protected]>

* Update charts/prometheus/templates/pdb.yaml

Co-authored-by: zeritti <[email protected]>
Signed-off-by: Starlight Romero <[email protected]>

* Update charts/prometheus/templates/pdb.yaml

Co-authored-by: zeritti <[email protected]>
Signed-off-by: Starlight Romero <[email protected]>

---------

Signed-off-by: Starlight Romero <[email protected]>
Signed-off-by: Starlight Romero <[email protected]>
Co-authored-by: zeritti <[email protected]>
  • Loading branch information
starlightromero and zeritti authored Sep 11, 2023
1 parent 33bf16a commit 1139547
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus
appVersion: v2.46.0
version: 24.3.0
version: 24.3.1
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
3 changes: 2 additions & 1 deletion charts/prometheus/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.server.podDisruptionBudget.enabled }}
{{- $pdbSpec := omit .Values.server.podDisruptionBudget "enabled" }}
apiVersion: {{ template "prometheus.podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand All @@ -7,8 +8,8 @@ metadata:
labels:
{{- include "prometheus.server.labels" . | nindent 4 }}
spec:
maxUnavailable: {{ .Values.server.podDisruptionBudget.maxUnavailable }}
selector:
matchLabels:
{{- include "prometheus.server.matchLabels" . | nindent 6 }}
{{- toYaml $pdbSpec | nindent 2 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ server:
podDisruptionBudget:
enabled: false
maxUnavailable: 1
# minAvailable: 1
## unhealthyPodEvictionPolicy is available since 1.27.0 (beta)
## https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy
# unhealthyPodEvictionPolicy: IfHealthyBudget

## Use an alternate scheduler, e.g. "stork".
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
Expand Down

0 comments on commit 1139547

Please sign in to comment.