blob: 899d3cc5dfa691e2eed114604c18d46fbb077a02 [file] [log] [blame]
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04001{{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (and (not .Values.controller.autoscaling.enabled) (gt (.Values.controller.replicaCount | int) 1)) }}
2apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
3kind: PodDisruptionBudget
4metadata:
5 labels:
6 {{- include "ingress-nginx.labels" . | nindent 4 }}
7 app.kubernetes.io/component: controller
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +04008 {{- with .Values.controller.labels }}
9 {{- toYaml . | nindent 4 }}
10 {{- end }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040011 name: {{ include "ingress-nginx.controller.fullname" . }}
12 namespace: {{ .Release.Namespace }}
13spec:
14 selector:
15 matchLabels:
16 {{- include "ingress-nginx.selectorLabels" . | nindent 6 }}
17 app.kubernetes.io/component: controller
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +040018 {{- if .Values.controller.minAvailable }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040019 minAvailable: {{ .Values.controller.minAvailable }}
Giorgi Lekveishvilicccf72f2023-05-19 16:13:22 +040020 {{- else if .Values.controller.maxUnavailable }}
21 maxUnavailable: {{ .Values.controller.maxUnavailable }}
22 {{- end }}
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +040023{{- end }}