File tree 3 files changed +41
-5
lines changed
3 files changed +41
-5
lines changed Original file line number Diff line number Diff line change 1
1
{{- if .Values.autoscaling.enabled }}
2
- apiVersion : autoscaling/v2beta1
2
+ apiVersion : autoscaling/v2
3
3
kind : HorizontalPodAutoscaler
4
4
metadata :
5
5
name : {{ include "api-platform.fullname" . }}
@@ -17,12 +17,16 @@ spec:
17
17
- type : Resource
18
18
resource :
19
19
name : cpu
20
- targetAverageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
20
+ target :
21
+ averageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
22
+ type : Utilization
21
23
{{- end }}
22
24
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
23
25
- type : Resource
24
26
resource :
25
27
name : memory
26
- targetAverageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
28
+ target :
29
+ averageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
30
+ type : Utilization
27
31
{{- end }}
28
32
{{- end }}
Original file line number Diff line number Diff line change
1
+ {{- if .Values.autoscaling.enabled }}
2
+ apiVersion : autoscaling/v2
3
+ kind : HorizontalPodAutoscaler
4
+ metadata :
5
+ name : {{ include "api-platform.fullname" . }}-pwa
6
+ labels :
7
+ {{- include "api-platform.labels" . | nindent 4 }}
8
+ spec :
9
+ scaleTargetRef :
10
+ apiVersion : apps/v1
11
+ kind : Deployment
12
+ name : {{ include "api-platform.fullname" . }}-pwa
13
+ minReplicas : {{ .Values.autoscaling.minReplicas }}
14
+ maxReplicas : {{ .Values.autoscaling.maxReplicas }}
15
+ metrics :
16
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17
+ - type : Resource
18
+ resource :
19
+ name : cpu
20
+ target :
21
+ averageUtilization : {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
22
+ type : Utilization
23
+ {{- end }}
24
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
25
+ - type : Resource
26
+ resource :
27
+ name : memory
28
+ target :
29
+ averageUtilization : {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
30
+ type : Utilization
31
+ {{- end }}
32
+ {{- end }}
Original file line number Diff line number Diff line change @@ -261,10 +261,10 @@ resources: {}
261
261
replicaCount : 1
262
262
263
263
autoscaling :
264
- enabled : false
264
+ enabled : true
265
265
minReplicas : 1
266
266
maxReplicas : 100
267
- targetCPUUtilizationPercentage : 80
267
+ targetCPUUtilizationPercentage : 50
268
268
# targetMemoryUtilizationPercentage: 80
269
269
270
270
nodeSelector : {}
You can’t perform that action at this time.
0 commit comments