From 55a6d829d01f192abc64b81f1985e11e124fb56c Mon Sep 17 00:00:00 2001 From: Scott McCullough Date: Mon, 27 Mar 2023 19:12:42 +0000 Subject: [PATCH] feat(charts/dex): use updated HorizontalPodAutoscaler API Version Signed-off-by: Scott McCullough --- charts/dex/Chart.yaml | 4 ++-- charts/dex/README.md | 2 +- charts/dex/templates/hpa.yaml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/dex/Chart.yaml b/charts/dex/Chart.yaml index 70bf26df..1dca4b71 100644 --- a/charts/dex/Chart.yaml +++ b/charts/dex/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 type: application name: dex -version: 0.14.0 +version: 0.14.1 appVersion: "2.36.0" kubeVersion: ">=1.14.0-0" description: OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. @@ -22,7 +22,7 @@ maintainers: annotations: artifacthub.io/changes: | - kind: added - description: "Common labels to all resources created by the chart" + description: "Use updated HorizontalPodAutoscaler API Version which is no longer served in K8s >=1.25" artifacthub.io/images: | - name: dex image: ghcr.io/dexidp/dex:v2.36.0 diff --git a/charts/dex/README.md b/charts/dex/README.md index df0d6bf0..cb755154 100644 --- a/charts/dex/README.md +++ b/charts/dex/README.md @@ -1,6 +1,6 @@ # dex -![version: 0.14.0](https://img.shields.io/badge/version-0.14.0-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.36.0](https://img.shields.io/badge/app%20version-2.36.0-informational?style=flat-square) ![kube version: >=1.14.0-0](https://img.shields.io/badge/kube%20version->=1.14.0--0-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-dex-informational?style=flat-square)](https://artifacthub.io/packages/helm/dex/dex) +![version: 0.14.1](https://img.shields.io/badge/version-0.14.1-informational?style=flat-square) ![type: application](https://img.shields.io/badge/type-application-informational?style=flat-square) ![app version: 2.36.0](https://img.shields.io/badge/app%20version-2.36.0-informational?style=flat-square) ![kube version: >=1.14.0-0](https://img.shields.io/badge/kube%20version->=1.14.0--0-informational?style=flat-square) [![artifact hub](https://img.shields.io/badge/artifact%20hub-dex-informational?style=flat-square)](https://artifacthub.io/packages/helm/dex/dex) OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. diff --git a/charts/dex/templates/hpa.yaml b/charts/dex/templates/hpa.yaml index f381c7d7..1b0a7e06 100644 --- a/charts/dex/templates/hpa.yaml +++ b/charts/dex/templates/hpa.yaml @@ -1,5 +1,9 @@ {{- if .Values.autoscaling.enabled }} +{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: autoscaling/v2 +{{- else -}} apiVersion: autoscaling/v2beta1 +{{- end }} kind: HorizontalPodAutoscaler metadata: name: {{ include "dex.fullname" . }}