---
{{- if .Values.maxUnavailable }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: "{{ template "elasticsearch.uname" . }}-pdb"
  namespace: {{ .Release.Namespace  }}
spec:
  maxUnavailable: {{ .Values.maxUnavailable }}
  selector:
    matchLabels:
      app: "{{ template "elasticsearch.uname" . }}"
{{- end }}
