cert-manager: 1.19.6 -> 1.20.3
Change-Id: Iabb070751250884fca8064f8b27d0a86a63959af
diff --git a/charts/cert-manager-1.19.6/templates/webhook-poddisruptionbudget.yaml b/charts/cert-manager-1.19.6/templates/webhook-poddisruptionbudget.yaml
new file mode 100644
index 0000000..ab2a481
--- /dev/null
+++ b/charts/cert-manager-1.19.6/templates/webhook-poddisruptionbudget.yaml
@@ -0,0 +1,29 @@
+{{- if .Values.webhook.podDisruptionBudget.enabled }}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+ name: {{ include "webhook.fullname" . }}
+ namespace: {{ include "cert-manager.namespace" . }}
+ labels:
+ app: {{ include "webhook.name" . }}
+ app.kubernetes.io/name: {{ include "webhook.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ app.kubernetes.io/component: "webhook"
+ {{- include "labels" . | nindent 4 }}
+spec:
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: {{ include "webhook.name" . }}
+ app.kubernetes.io/instance: {{ .Release.Name }}
+ app.kubernetes.io/component: "webhook"
+
+ {{- if not (or (hasKey .Values.webhook.podDisruptionBudget "minAvailable") (hasKey .Values.webhook.podDisruptionBudget "maxUnavailable")) }}
+ minAvailable: 1 # Default value because minAvailable and maxUnavailable are not set
+ {{- end }}
+ {{- if hasKey .Values.webhook.podDisruptionBudget "minAvailable" }}
+ minAvailable: {{ .Values.webhook.podDisruptionBudget.minAvailable }}
+ {{- end }}
+ {{- if hasKey .Values.webhook.podDisruptionBudget "maxUnavailable" }}
+ maxUnavailable: {{ .Values.webhook.podDisruptionBudget.maxUnavailable }}
+ {{- end }}
+{{- end }}