apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: {{ template "zookeeper.fullname" . }}
  labels:
    app: {{ template "zookeeper.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  selector:
    matchLabels:
      app: {{ template "zookeeper.name" . }}
      release: {{ .Release.Name }}
  minAvailable: {{ (div .Values.replicaCount 2) | add1 }} # Limits how many Zokeeper pods must be available due to voluntary disruptions.
