From d26a1f639152645ab2eb22c07186204a8b5fedba Mon Sep 17 00:00:00 2001 From: vineet-jayaprakasan Date: Sun, 17 Dec 2023 15:11:45 +0900 Subject: [PATCH] Upgrade hpa to api version v2 for k8s 1.26 Signed-off-by: Vineet JP --- charts/aws-pca-issuer/templates/hpa.yaml | 7 +++++-- charts/aws-pca-issuer/values.yaml | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/aws-pca-issuer/templates/hpa.yaml b/charts/aws-pca-issuer/templates/hpa.yaml index 46f54793..735b1b75 100644 --- a/charts/aws-pca-issuer/templates/hpa.yaml +++ b/charts/aws-pca-issuer/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "aws-privateca-issuer.fullname" . }} @@ -11,9 +11,12 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ include "aws-privateca-issuer.fullname" . }} - namespace: {{ .Release.Namespace }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} + {{- with .Values.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} metrics: {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - type: Resource diff --git a/charts/aws-pca-issuer/values.yaml b/charts/aws-pca-issuer/values.yaml index 91e6baa0..025a61a8 100644 --- a/charts/aws-pca-issuer/values.yaml +++ b/charts/aws-pca-issuer/values.yaml @@ -61,7 +61,8 @@ autoscaling: maxReplicas: 100 targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 - + behavior: {} + nodeSelector: {} tolerations: []