Skip to content

Commit acec272

Browse files
committed
Fix HPA Template
1 parent fc0bb96 commit acec272

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

charts/whatsapp-proxy-chart/templates/deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ spec:
6868
containerPort: 5222
6969
protocol: TCP
7070
{{- end}}
71+
{{- if .Values.service.media_port }}
72+
- name: media
73+
containerPort: 587
74+
protocol: TCP
75+
{{- end}}
76+
{{- if .Values.service.media_proxy_port}}
77+
- name: media-proxy
78+
containerPort: 7777
79+
protocol: TCP
80+
{{- end}}
7181
{{- if .Values.service.stats_port }}
7282
- name: stats
7383
containerPort: 8199

charts/whatsapp-proxy-chart/templates/hpa.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# License found in the LICENSE file in the root directory
44
# of this source tree.
55
{{- if .Values.autoscaling.enabled }}
6-
apiVersion: autoscaling/v2beta1
6+
apiVersion: autoscaling/v2
77
kind: HorizontalPodAutoscaler
88
metadata:
99
name: {{ include "whatsapp-proxy-chart.fullname" . }}
@@ -21,12 +21,16 @@ spec:
2121
- type: Resource
2222
resource:
2323
name: cpu
24-
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
24+
target:
25+
type: Utilization
26+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
2527
{{- end }}
2628
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
2729
- type: Resource
2830
resource:
2931
name: memory
30-
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
32+
target:
33+
type: Utilization
34+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
3135
{{- end }}
3236
{{- end }}

charts/whatsapp-proxy-chart/templates/service.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ spec:
6464
protocol: TCP
6565
name: media
6666
{{- end}}
67-
6867
{{- if .Values.service.media_proxy_port }}
6968
- port: {{ .Values.service.media_proxy_port }}
7069
targetPort: 7777

0 commit comments

Comments
 (0)