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 6b112cc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
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 6b112cc

Please sign in to comment.