{{- if .Values.podDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  labels:
    app.kubernetes.io/name: {{ template "neo4j.name" . }}
    helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
  name: {{ template "neo4j.fullname" . }}
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ template "neo4j.name" . }}
      app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
{{- end -}}
