update
diff --git a/charts/cert-manager/templates/webhook-poddisruptionbudget.yaml b/charts/cert-manager/templates/webhook-poddisruptionbudget.yaml
index c8a357c..2789136 100644
--- a/charts/cert-manager/templates/webhook-poddisruptionbudget.yaml
+++ b/charts/cert-manager/templates/webhook-poddisruptionbudget.yaml
@@ -17,10 +17,16 @@
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "webhook"
- {{- with .Values.webhook.podDisruptionBudget.minAvailable }}
- minAvailable: {{ . }}
+ {{- 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 }}
- {{- with .Values.webhook.podDisruptionBudget.maxUnavailable }}
- maxUnavailable: {{ . }}
+ {{- if hasKey .Values.webhook.podDisruptionBudget "minAvailable" }}
+ minAvailable: {{ .Values.webhook.podDisruptionBudget.minAvailable }}
+ {{- end }}
+ {{- if hasKey .Values.webhook.podDisruptionBudget "maxUnavailable" }}
+ maxUnavailable: {{ .Values.webhook.podDisruptionBudget.maxUnavailable }}
+ {{- end }}
+ {{- with .Values.webhook.podDisruptionBudget.unhealthyPodEvictionPolicy }}
+ unhealthyPodEvictionPolicy: {{ . }}
{{- end }}
{{- end }}