Skip to content

Commit af068e7

Browse files
authored
[prometheus] pdb template values (#5001)
* 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]>
1 parent 8c9e2e7 commit af068e7

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

charts/prometheus/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: prometheus
33
appVersion: v2.55.1
4-
version: 25.30.1
4+
version: 25.30.2
55
kubeVersion: ">=1.19.0-0"
66
description: Prometheus is a monitoring system and time series database.
77
home: https://prometheus.io/

charts/prometheus/templates/pdb.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,16 @@ spec:
1111
selector:
1212
matchLabels:
1313
{{- include "prometheus.server.matchLabels" . | nindent 6 }}
14-
{{- toYaml $pdbSpec | nindent 2 }}
14+
{{- if not (or (hasKey $pdbSpec "minAvailable") (hasKey $pdbSpec "maxUnavailable")) }}
15+
maxUnavailable: 1
16+
{{- end }}
17+
{{- if hasKey $pdbSpec "minAvailable" }}
18+
minAvailable: {{ $pdbSpec.minAvailable }}
19+
{{- end }}
20+
{{- if hasKey $pdbSpec "maxUnavailable" }}
21+
maxUnavailable: {{ $pdbSpec.maxUnavailable }}
22+
{{- end }}
23+
{{- if hasKey $pdbSpec "unhealthyPodEvictionPolicy" }}
24+
unhealthyPodEvictionPolicy: {{ $pdbSpec.unhealthyPodEvictionPolicy }}
25+
{{- end }}
1526
{{- end }}

charts/prometheus/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ server:
453453
##
454454
podDisruptionBudget:
455455
enabled: false
456-
maxUnavailable: 1
456+
# maxUnavailable: 1
457457
# minAvailable: 1
458458
## unhealthyPodEvictionPolicy is available since 1.27.0 (beta)
459459
## https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy

0 commit comments

Comments
 (0)