Skip to content

Commit 6549d9c

Browse files
committed
Add HorizontalPodAutoscaler for cgimap
1 parent 42798ed commit 6549d9c

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{- if and .Values.cgimap.enabled .Values.cgimap.autoscaling.enabled -}}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: {{ .Release.Name }}-cgimmap-hpa
6+
spec:
7+
scaleTargetRef:
8+
apiVersion: apps/v1
9+
kind: Deployment
10+
name: {{ .Release.Name }}-cgimap-deployment
11+
minReplicas: {{ .Values.cgimap.autoscaling.minReplicas }}
12+
maxReplicas: {{ .Values.cgimap.autoscaling.maxReplicas }}
13+
metrics:
14+
- type: Resource
15+
resource:
16+
name: cpu
17+
target:
18+
type: Utilization
19+
averageUtilization: {{ .Values.cgimap.autoscaling.cpuUtilization }}
20+
- type: Resource
21+
resource:
22+
name: memory
23+
target:
24+
type: Utilization
25+
averageUtilization: {{ .Values.cgimap.autoscaling.memoryUtilization }}
26+
{{- end }}

osm-seed/values.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@ memcached:
206206
# Cgimap
207207
# ====================================================================================================
208208
cgimap:
209+
image:
210+
name: ""
211+
tag: ""
209212
enabled: false
210213
priorityClass: "low-priority"
211214
resources:
@@ -218,6 +221,12 @@ cgimap:
218221
cpu: '10'
219222
nodeSelector:
220223
enabled: false
224+
autoscaling:
225+
enabled: false
226+
minReplicas: 2
227+
maxReplicas: 4
228+
cpuUtilization: 60
229+
memoryUtilization: 60
221230
# ====================================================================================================
222231
# Variables for full-history container
223232
# ====================================================================================================

0 commit comments

Comments
 (0)