{{- if .Values.server.pdb.create }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: {{ include "scdf.fullname" . }}-server
  labels: {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: server
spec:
  {{- if .Values.server.pdb.minAvailable }}
  minAvailable: {{ .Values.server.pdb.minAvailable }}
  {{- end }}
  {{- if .Values.server.pdb.maxUnavailable }}
  maxUnavailable: {{ .Values.server.pdb.maxUnavailable }}
  {{- end }}
  selector:
    matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
      app.kubernetes.io/component: server
{{- end }}
