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