blob: 107dd726cf0a677bb64a75f027e0adcca9c79efd [file] [log] [blame]
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04001{{- if .Values.podDisruptionBudget.enabled }}
2apiVersion: policy/v1
3kind: PodDisruptionBudget
4metadata:
5 name: {{ include "cert-manager.fullname" . }}
6 namespace: {{ include "cert-manager.namespace" . }}
7 labels:
8 app: {{ include "cert-manager.name" . }}
9 app.kubernetes.io/name: {{ include "cert-manager.name" . }}
10 app.kubernetes.io/instance: {{ .Release.Name }}
11 app.kubernetes.io/component: "controller"
12 {{- include "labels" . | nindent 4 }}
13spec:
14 selector:
15 matchLabels:
16 app.kubernetes.io/name: {{ include "cert-manager.name" . }}
17 app.kubernetes.io/instance: {{ .Release.Name }}
18 app.kubernetes.io/component: "controller"
19
Giorgi Lekveishviliea328da2026-07-29 12:15:15 +040020 {{- if not (or (hasKey .Values.podDisruptionBudget "minAvailable") (hasKey .Values.podDisruptionBudget "maxUnavailable")) }}
21 minAvailable: 1 # Default value because minAvailable and maxUnavailable are not set
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040022 {{- end }}
Giorgi Lekveishviliea328da2026-07-29 12:15:15 +040023 {{- if hasKey .Values.podDisruptionBudget "minAvailable" }}
24 minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
25 {{- end }}
26 {{- if hasKey .Values.podDisruptionBudget "maxUnavailable" }}
27 maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
28 {{- end }}
29 {{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
30 unhealthyPodEvictionPolicy: {{ . }}
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +040031 {{- end }}
32{{- end }}