apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: {{ template "cp-zookeeper.fullname" . }}-pdb
  labels:
    app: {{ template "cp-zookeeper.name" . }}
    chart: {{ template "cp-zookeeper.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  selector:
    matchLabels:
      app: {{ template "cp-zookeeper.name" . }}
      release: {{ .Release.Name }}
  {{- if .Values.minAvailable }}
  minAvailable: {{ .Values.minAvailable }}
  {{- else }}
  maxUnavailable: 1
  {{- end }}
