From bd3999d61c9ce83fcbfece5ef5d80ae5466c7af8 Mon Sep 17 00:00:00 2001 From: Jan Kantert Date: Fri, 26 Apr 2024 15:33:43 +0200 Subject: [PATCH] add pod disruption budgets to chart --- charts/wave/templates/poddisruptionbudget.yaml | 12 ++++++++++++ charts/wave/values.yaml | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 charts/wave/templates/poddisruptionbudget.yaml diff --git a/charts/wave/templates/poddisruptionbudget.yaml b/charts/wave/templates/poddisruptionbudget.yaml new file mode 100644 index 00000000..204bcc10 --- /dev/null +++ b/charts/wave/templates/poddisruptionbudget.yaml @@ -0,0 +1,12 @@ +{{- if .Values.pdb.enabled }} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ include "wave-fullname" . }} + namespace: {{ .Release.Namespace }} +spec: + selector: + matchLabels: + {{ include "wave.selectorLabels" . | nindent 6}} + maxUnavailable: 1 +{{- end }} \ No newline at end of file diff --git a/charts/wave/values.yaml b/charts/wave/values.yaml index 9fcf2047..add081da 100644 --- a/charts/wave/values.yaml +++ b/charts/wave/values.yaml @@ -20,6 +20,10 @@ nodeSelector: {} # Replicas > 1 will enable leader election replicas: 1 +# Add PodDisruptionBudget which should be enabled for replicas > 1 +pdb: + enabled: false + # Additional volumes to use in the pod. extraVolumes: [] # - name: tmp