Skip to content

Commit fca2fe1

Browse files
PDB fix with HPA enabled
Fixes #309
1 parent a87b5f5 commit fca2fe1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

helm/oauth2-proxy/templates/poddisruptionbudget.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
{{- if and .Values.podDisruptionBudget.enabled (gt (.Values.replicaCount | int) 1) }}
1+
{{- $replicaCount := .Values.replicaCount | default 1 }}
2+
{{- if .Values.autoscaling.enabled }}
3+
{{- $replicaCount = .Values.autoscaling.minReplicas | default 1 }}
4+
{{- end }}
5+
{{- if and .Values.podDisruptionBudget.enabled (gt $replicaCount 1) }}
26
apiVersion: {{ include "capabilities.podDisruptionBudget.apiVersion" . }}
37
kind: PodDisruptionBudget
48
metadata:

0 commit comments

Comments
 (0)