{{- if .Values.mongos.pdb.enabled -}}
kind: PodDisruptionBudget
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
metadata:
  name: {{ include "common.names.fullname" . }}-mongos
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: mongos
spec:
  selector:
    matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
      app.kubernetes.io/component: mongos
  {{- if .Values.mongos.pdb.minAvailable }}
  minAvailable: {{ .Values.mongos.pdb.minAvailable | int }}
  {{- end }}
  {{- if .Values.mongos.pdb.maxUnavailable }}
  maxUnavailable: {{ .Values.mongos.pdb.maxUnavailable | int }}
  {{- end }}
{{- end -}}
