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 <[email protected]>
  • Loading branch information
Tycale committed May 21, 2024
1 parent c1e1933 commit 4a8b674
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions chart/k8s-pause/templates/podDisruptionBudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- 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:
minAvailable: {{ .Values.pdb.minAvailable }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "k8s-pause.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
5 changes: 5 additions & 0 deletions chart/k8s-pause/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ envFromSecret: ""
## key: password
extraEnvSecrets: {}

# Ability to set a PodDisruptionBudget
# pdb:
# enabled: true
# minAvailable: 1

securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down

0 comments on commit 4a8b674

Please sign in to comment.