Explorar el Código

fix: pdb spec rendering issue (#4844)

Fixes: #4832

Signed-off-by: Linus Yong <linusyong@gmail.com>
Co-authored-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Linus Yong hace 1 año
padre
commit
a094481e5a

+ 2 - 3
deploy/charts/external-secrets/templates/cert-controller-poddisruptionbudget.yaml

@@ -7,11 +7,10 @@ metadata:
   labels:
     {{- include "external-secrets-cert-controller.labels" . | nindent 4 }}
 spec:
-  {{- if .Values.certController.podDisruptionBudget.minAvailable }}
-  minAvailable: {{ .Values.certController.podDisruptionBudget.minAvailable }}
-  {{- end }}
   {{- if .Values.certController.podDisruptionBudget.maxUnavailable }}
   maxUnavailable: {{ .Values.certController.podDisruptionBudget.maxUnavailable }}
+  {{- else if .Values.certController.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.certController.podDisruptionBudget.minAvailable }}
   {{- end }}
   selector:
     matchLabels:

+ 2 - 3
deploy/charts/external-secrets/templates/poddisruptionbudget.yaml

@@ -7,11 +7,10 @@ metadata:
   labels:
     {{- include "external-secrets.labels" . | nindent 4 }}
 spec:
-  {{- if .Values.podDisruptionBudget.minAvailable }}
-  minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
-  {{- end }}
   {{- if .Values.podDisruptionBudget.maxUnavailable }}
   maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
+  {{- else if .Values.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
   {{- end }}
   selector:
     matchLabels:

+ 2 - 3
deploy/charts/external-secrets/templates/webhook-poddisruptionbudget.yaml

@@ -8,11 +8,10 @@ metadata:
     {{- include "external-secrets-webhook.labels" . | nindent 4 }}
     external-secrets.io/component: webhook
 spec:
-  {{- if .Values.webhook.podDisruptionBudget.minAvailable }}
-  minAvailable: {{ .Values.webhook.podDisruptionBudget.minAvailable }}
-  {{- end }}
   {{- if .Values.webhook.podDisruptionBudget.maxUnavailable }}
   maxUnavailable: {{ .Values.webhook.podDisruptionBudget.maxUnavailable }}
+  {{- else if .Values.webhook.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.webhook.podDisruptionBudget.minAvailable }}
   {{- end }}
   selector:
     matchLabels: