Skip to content
Snippets Groups Projects
Verified Commit 00f9ffed authored by David Hoese's avatar David Hoese
Browse files

Add horizontal pod autoscaling

parent 400bbf81
No related branches found
No related tags found
1 merge request!6Add horizontal pod autoscaling
Pipeline #41408 passed with stages
in 11 minutes and 14 seconds
......@@ -4,10 +4,10 @@ stages:
- build chart
- deploy
variables:
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: "tcp://docker:2375"
# DOCKER_TLS_CERTDIR: "/certs"
# DOCKER_HOST: "tcp://localhost:2376"
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://docker:2376"
DOCKER_DRIVER: overlay2
include:
......
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "geosphere-mapserver.fullname" . }}
labels:
{{- include "geosphere-mapserver.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "geosphere-mapserver.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
......@@ -81,6 +81,13 @@ resources: {}
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
......
......@@ -44,7 +44,7 @@
# handler should be added by the enabled module
#AddHandler fcgid-script fcgi
<IfModule mod_fcgid.c>
FcgidMaxProcessesPerClass 30
FcgidMaxProcessesPerClass 10
FcgidInitialEnv PROJ_LIB /usr/local/share/proj
FcgidInitialEnv LD_LIBRARY_PATH "/usr/local/lib:/usr/local/pgsql/lib:/usr3/pkg3/oracle9/lib"
</IfModule>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment