Skip to content

Commit a62093c

Browse files
authored
chart: add pdb parameter (#53)
Signed-off-by: Thibault Gérondal <thibault@initia.cloud>
1 parent c1e1933 commit a62093c

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

chart/k8s-pause/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ keywords:
1414
name: k8s-pause
1515
sources:
1616
- https://github.com/DoodleScheduling/k8s-pause
17-
version: 0.2.7
17+
version: 0.2.8

chart/k8s-pause/templates/pdb.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{- if .Values.pdb.enabled }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ include "k8s-pause.fullname" . }}-pdb
6+
labels:
7+
app.kubernetes.io/name: {{ include "k8s-pause.name" . }}
8+
app.kubernetes.io/instance: {{ .Release.Name }}
9+
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
helm.sh/chart: {{ include "k8s-pause.chart" . }}
11+
spec:
12+
{{- if .Values.pdb.minAvailable }}
13+
minAvailable: {{ .Values.pdb.minAvailable }}
14+
{{- end }}
15+
{{- if .Values.pdb.maxUnavailable }}
16+
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
17+
{{- end }}
18+
selector:
19+
matchLabels:
20+
app.kubernetes.io/name: {{ include "k8s-pause.name" . }}
21+
app.kubernetes.io/instance: {{ .Release.Name }}
22+
{{- end }}

chart/k8s-pause/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ envFromSecret: ""
9191
## key: password
9292
extraEnvSecrets: {}
9393

94+
# Ability to set a PodDisruptionBudget
95+
pdb:
96+
enabled: false
97+
minAvailable: 1
98+
maxUnavailable: ""
99+
94100
securityContext:
95101
allowPrivilegeEscalation: false
96102
capabilities:

0 commit comments

Comments
 (0)