blob: 107dd726cf0a677bb64a75f027e0adcca9c79efd [file] [log] [blame]
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +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
gio33d62932026-07-23 16:39:35 +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 Lekveishvili0048a782023-06-20 18:32:21 +040022 {{- end }}
gio33d62932026-07-23 16:39:35 +040023 {{- if hasKey .Values.podDisruptionBudget "minAvailable" }}
24 minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
25 {{- end }}
26 {{- if hasKey .Values.podDisruptionBudget "maxUnavailable" }}
27 maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +040028 {{- end }}
gio15aa6632026-07-23 17:14:23 +040029 {{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
30 unhealthyPodEvictionPolicy: {{ . }}
31 {{- end }}
Giorgi Lekveishvili0048a782023-06-20 18:32:21 +040032{{- end }}