Skip to content

Commit

Permalink
update autoscaling/v2beta1 to autoscaling/v2 in skeleton chart
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Kamenskikh <kupnu4x@gmail.com>
(cherry picked from commit b4a4c7a)
  • Loading branch information
kupnu4x authored and mattfarina committed Jun 13, 2023
1 parent aca1e44 commit 321f71a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/chartutil/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ metadata:
`

const defaultHorizontalPodAutoscaler = `{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "<CHARTNAME>.fullname" . }}
Expand All @@ -387,13 +387,17 @@ spec:
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
`
Expand Down

0 comments on commit 321f71a

Please sign in to comment.