Skip to content

Commit 08e2bba

Browse files
PDB fix with HPA enabled (#341)
* PDB fix with HPA enabled Fixes #309 * Update Chart.yaml * Fixed the type mismatch with a cast
1 parent a87b5f5 commit 08e2bba

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 8.1.0
2+
version: 8.1.1
33
apiVersion: v2
44
appVersion: 7.12.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -31,8 +31,8 @@ maintainers:
3131
kubeVersion: ">=1.16.0-0"
3232
annotations:
3333
artifacthub.io/changes: |
34-
- kind: changed
35-
description: Updated OAuth2-Proxy image to v7.12.0
34+
- kind: fixed
35+
description: Fixed the Pod Disruption Budget when Horizontal Pod Autoscaling is enabled
3636
links:
3737
- name: Github PR
38-
url: https://github.com/oauth2-proxy/manifests/pull/340
38+
url: https://github.com/oauth2-proxy/manifests/pull/341

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 | int }}
2+
{{- if .Values.autoscaling.enabled }}
3+
{{- $replicaCount = .Values.autoscaling.minReplicas | default 1 | int }}
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)