apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  labels:
    app: '{{ template "workload-identity-webhook.name" . }}'
    azure-workload-identity.io/system: "true"
    chart: '{{ template "workload-identity-webhook.name" . }}'
    release: '{{ .Release.Name }}'
  name: azure-wi-webhook-controller-manager
  namespace: '{{ .Release.Namespace }}'
spec:
  {{- if .Values.podDisruptionBudget.maxUnavailable }}
  maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
  {{- end }}
  {{- if .Values.podDisruptionBudget.minAvailable }}
  minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
  {{- end }}
  selector:
    matchLabels:
      app: '{{ template "workload-identity-webhook.name" . }}'
      azure-workload-identity.io/system: "true"
      chart: '{{ template "workload-identity-webhook.name" . }}'
      release: '{{ .Release.Name }}'
