{{- if .Values.podDisruptionBudget.enabled }} apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "k8s-prometheus-adapter.fullname" . }} labels: app: {{ template "k8s-prometheus-adapter.name" . }} chart: {{ template "k8s-prometheus-adapter.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: {{- if .Values.podDisruptionBudget.minAvailable }} minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} {{- end }} {{- if .Values.podDisruptionBudget.maxUnavailable }} maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} {{- end }} selector: matchLabels: app: {{ template "k8s-prometheus-adapter.name" . }} release: {{ .Release.Name }} {{- end }}