Skip to content

Commit

Permalink
Upgrade hpa to api version v2 for k8s 1.26
Browse files Browse the repository at this point in the history
Signed-off-by: Vineet JP <[email protected]>
  • Loading branch information
vineetjp committed Dec 17, 2023
1 parent eba5263 commit d26a1f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions charts/aws-pca-issuer/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "aws-privateca-issuer.fullname" . }}
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion charts/aws-pca-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ autoscaling:
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

behavior: {}

nodeSelector: {}

tolerations: []
Expand Down

0 comments on commit d26a1f6

Please sign in to comment.