Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 487e4840 authored by Jamalac Orange's avatar Jamalac Orange
Browse files

feat(k8s): add horizontalPodAutoscaler

parent b4f7dccc
No related branches found
No related tags found
Loading
Pipeline #734339 failed
...@@ -34,6 +34,13 @@ spec: ...@@ -34,6 +34,13 @@ spec:
secretKeyRef: secretKeyRef:
name: submission-secrets name: submission-secrets
key: SPRING_DATASOURCE_PASSWORD key: SPRING_DATASOURCE_PASSWORD
resources:
limits:
cpu: "2"
memory: 2Gi
requests:
cpu: "1"
memory: 750Mi
containers: containers:
- name: submission-app - name: submission-app
image: submission-image image: submission-image
......
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: submission-code-hpa
labels:
app: submission-code
spec:
maxReplicas: 2
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: submission-code-server-deployment
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 50
...@@ -7,3 +7,4 @@ resources: ...@@ -7,3 +7,4 @@ resources:
- role.yml - role.yml
- rolebinding.yml - rolebinding.yml
- serviceMonitor.yml - serviceMonitor.yml
- horizontalPodAutoscaler.yml
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