update
diff --git a/charts/cert-manager/templates/poddisruptionbudget.yaml b/charts/cert-manager/templates/poddisruptionbudget.yaml
index dab75ce..107dd72 100644
--- a/charts/cert-manager/templates/poddisruptionbudget.yaml
+++ b/charts/cert-manager/templates/poddisruptionbudget.yaml
@@ -17,10 +17,16 @@
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: "controller"
- {{- with .Values.podDisruptionBudget.minAvailable }}
- minAvailable: {{ . }}
+ {{- if not (or (hasKey .Values.podDisruptionBudget "minAvailable") (hasKey .Values.podDisruptionBudget "maxUnavailable")) }}
+ minAvailable: 1 # Default value because minAvailable and maxUnavailable are not set
{{- end }}
- {{- with .Values.podDisruptionBudget.maxUnavailable }}
- maxUnavailable: {{ . }}
+ {{- if hasKey .Values.podDisruptionBudget "minAvailable" }}
+ minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
+ {{- end }}
+ {{- if hasKey .Values.podDisruptionBudget "maxUnavailable" }}
+ maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
+ {{- end }}
+ {{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
+ unhealthyPodEvictionPolicy: {{ . }}
{{- end }}
{{- end }}