Skip to content

Commit

Permalink
[prometheus] pdb template values (#5001)
Browse files Browse the repository at this point in the history
* fix: bump chart v

Signed-off-by: mentlak <[email protected]>

* chore: resolve requested changes

Signed-off-by: mentlak <[email protected]>

* fix: uncomment default values

Signed-off-by: mentlak <[email protected]>

* fix: brackets

Signed-off-by: mentlak <[email protected]>

---------

Signed-off-by: mentlak <[email protected]>
  • Loading branch information
mentlak0 authored Nov 27, 2024
1 parent 8c9e2e7 commit af068e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 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.55.1
version: 25.30.1
version: 25.30.2
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
13 changes: 12 additions & 1 deletion charts/prometheus/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,16 @@ spec:
selector:
matchLabels:
{{- include "prometheus.server.matchLabels" . | nindent 6 }}
{{- toYaml $pdbSpec | nindent 2 }}
{{- if not (or (hasKey $pdbSpec "minAvailable") (hasKey $pdbSpec "maxUnavailable")) }}
maxUnavailable: 1
{{- end }}
{{- if hasKey $pdbSpec "minAvailable" }}
minAvailable: {{ $pdbSpec.minAvailable }}
{{- end }}
{{- if hasKey $pdbSpec "maxUnavailable" }}
maxUnavailable: {{ $pdbSpec.maxUnavailable }}
{{- end }}
{{- if hasKey $pdbSpec "unhealthyPodEvictionPolicy" }}
unhealthyPodEvictionPolicy: {{ $pdbSpec.unhealthyPodEvictionPolicy }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ server:
##
podDisruptionBudget:
enabled: false
maxUnavailable: 1
# 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
Expand Down

0 comments on commit af068e7

Please sign in to comment.