# helm_charts_poddisruptionbudget-arbiter-rs.yaml
{{- if and .Values.replicaSet.enabled .Values.replicaSet.pdb.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  labels:
    app: {{ template "mongodb.name" . }}
    chart: {{ template "mongodb.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
  name: {{ template "mongodb.fullname" . }}-arbiter
spec:
  {{- if .Values.replicaSet.pdb.minAvailable }}
  {{- if .Values.replicaSet.pdb.minAvailable.arbiter }}
  minAvailable: {{ .Values.replicaSet.pdb.minAvailable.arbiter }}
  {{- end }}
  {{- end }}
  {{- if .Values.replicaSet.pdb.maxUnavailable }}
  {{- if .Values.replicaSet.pdb.maxUnavailable.arbiter }}
  maxUnavailable: {{ .Values.replicaSet.pdb.maxUnavailable.arbiter }}
  {{- end }}
  {{- end }}
  selector:
    matchLabels:
      app: {{ template "mongodb.name" . }}
      release: {{ .Release.Name }}
      component: arbiter
{{- end }}