{{- if .Values.podDisruptionBudget.create }} {{ $component := "controller"}} --- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: {{ include "kubernetes-ingress-controller.fullname" . }}-controller-pdb namespace: {{ .Release.Namespace | quote }} labels: {{- include "kubernetes-ingress-controller.labels" . | nindent 4 }} app.kubernetes.io/component: {{ $component }} spec: {{- if .Values.podDisruptionBudget.minAvailable }} minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} {{- end }} {{- if .Values.podDisruptionBudget.maxUnavailable }} maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} {{- end }} selector: matchLabels: {{- include "kubernetes-ingress-controller.selectorLabels" . | nindent 6 }} {{- if .Values.podLabels }} {{- toYaml .Values.podLabels | nindent 6 }} {{- end }} app.kubernetes.io/component: {{ $component }} {{- end }}