# helm_charts_agent-clusterchecks-pdb.yaml
{{- if .Values.clusterChecksRunner.createPodDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: {{ template "datadog.fullname" . }}-clusterchecks
  labels:
    helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
    app.kubernetes.io/name: "{{ template "datadog.fullname" . }}"
    app.kubernetes.io/instance: {{ .Release.Name | quote }}
    app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
    app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: {{ template "datadog.fullname" . }}-clusterchecks
{{- end -}}