{{- if .Values.k8s_sensor.podDisruptionBudget.enabled -}} {{- if (gt (int .Values.k8s_sensor.deployment.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: k8sensor spec: selector: matchLabels: {{- include "k8s-sensor.selectorLabels" . | nindent 6 }} minAvailable: {{ sub (int .Values.k8s_sensor.deployment.replicas) 1 }} {{- end -}} {{- end -}}