{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: {{ include "OpenMetadata.fullname" . }}-poddisruptionbudget
  labels:
    {{- include "OpenMetadata.labels" . | indent 4 }}
spec:
  {{- with .Values.podDisruptionBudget.config }}
  {{- if .minAvailable }}
  minAvailable: {{ .minAvailable }}
  {{- end }}
  {{- if .maxUnavailable }}
  maxUnavailable: {{ .maxUnavailable }}
  {{- end }}
  {{- end }}
  selector:
    matchLabels:
      {{- include "OpenMetadata.selectorLabels" . | nindent 6 }}
{{- end }}