{{- if .Values.podDisruptionBudget.enabled }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: {{ include "aptly.fullname" . }} labels: {{- include "aptly.labels" . | nindent 4 }} spec: # With replicas fixed at 1 (see templates/statefulset.yaml), a # minAvailable:1 budget would block every voluntary node drain forever — # maxUnavailable is the only sane knob here. maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} selector: matchLabels: {{- include "aptly.selectorLabels" . | nindent 6 }} {{- end }}