Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions helm/oauth2-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 8.3.1
version: 8.3.2
apiVersion: v2
appVersion: 7.12.0
home: https://oauth2-proxy.github.io/oauth2-proxy/
Expand Down Expand Up @@ -32,7 +32,7 @@ kubeVersion: ">=1.16.0-0"
annotations:
artifacthub.io/changes: |
- kind: added
description: Bump Redis Chart Version
description: Adds backwards compatibility with Kubernetes 1.20 by selecting the HPA apiVersion of autoscaling/v2beta2
links:
- name: Github PR
url: https://github.com/oauth2-proxy/manifests/pull/361
url: https://github.com/oauth2-proxy/manifests/pull/364
11 changes: 11 additions & 0 deletions helm/oauth2-proxy/templates/_capabilities.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,14 @@ Return the appropriate apiVersion for ingress object.
{{- print "networking.k8s.io/v1" -}}
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for HorizontalPodAutoscaler object.
*/}}
{{- define "capabilities.horizontalPodAutoscaler.apiVersion" -}}
{{- if semverCompare "<1.23-0" ( .Values.kubeVersion | default .Capabilities.KubeVersion.Version ) -}}
{{- print "autoscaling/v2beta2" -}}
{{- else -}}
{{- print "autoscaling/v2" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion helm/oauth2-proxy/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
apiVersion: {{ include "capabilities.horizontalPodAutoscaler.apiVersion" . }}
kind: HorizontalPodAutoscaler
metadata:
labels:
Expand Down
Loading