Skip to content

Commit 9e3eed9

Browse files
committed
feat(oauth2-proxy): Support spec.unhealthyPodEvictionPolicy field for HPA
* By using .spec.unhealthyPodEvictionPolicy, you can also define the criteria when unhealthy pods should be considered for eviction. * Reference: https://kubernetes.io/docs/tasks/run-application/configure-pdb/\#unhealthy-pod-eviction-policy Signed-off-by: younsl <[email protected]>
1 parent 2b95e8c commit 9e3eed9

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

helm/oauth2-proxy/templates/poddisruptionbudget.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@ spec:
1717
{{- with .Values.podDisruptionBudget.minAvailable }}
1818
minAvailable: {{ . }}
1919
{{- end }}
20+
{{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
21+
unhealthyPodEvictionPolicy: {{ . }}
22+
{{- end }}
2023
{{- end }}

helm/oauth2-proxy/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ podDisruptionBudget:
311311
enabled: true
312312
maxUnavailable: null
313313
minAvailable: 1
314+
# Policy for when unhealthy pods should be considered for eviction.
315+
# Valid values are "IfHealthyBudget" and "AlwaysAllow".
316+
# Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy
317+
unhealthyPodEvictionPolicy: ""
314318

315319
## Horizontal Pod Autoscaling
316320
## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

0 commit comments

Comments
 (0)