Skip to content

Commit

Permalink
chart: add pdb parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Gérondal <thibault@initia.cloud>
  • Loading branch information
Tycale committed May 21, 2024
1 parent c1e1933 commit 03fd586
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/k8s-pause/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ keywords:
name: k8s-pause
sources:
- https://github.com/DoodleScheduling/k8s-pause
version: 0.2.7
version: 0.2.8
22 changes: 22 additions & 0 deletions chart/k8s-pause/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "k8s-pause.fullname" . }}-pdb
labels:
app.kubernetes.io/name: {{ include "k8s-pause.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ include "k8s-pause.chart" . }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "k8s-pause.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
6 changes: 6 additions & 0 deletions chart/k8s-pause/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ envFromSecret: ""
## key: password
extraEnvSecrets: {}

# Ability to set a PodDisruptionBudget
pdb:
enabled: false
minAvailable: 1
maxUnavailable: ""

securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down

0 comments on commit 03fd586

Please sign in to comment.