Skip to content

Commit

Permalink
try fix hpa, ajout resources requests et limits
Browse files Browse the repository at this point in the history
  • Loading branch information
Khagou committed Mar 25, 2024
1 parent 9089c14 commit ec7724c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions client/prod-front.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ spec:
- containerPort: 80
- containerPort: 7000
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"
---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
Expand All @@ -37,6 +43,7 @@ spec:
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
metrics:
- type: "Resource"
resource:
Expand Down
9 changes: 8 additions & 1 deletion server/prod-back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ spec: # Spécification
image: "europe-west1-docker.pkg.dev/khagu-devops/khagu-dev-images-registry/khagu-dev-back:1.0.9.8" # Image du conteneur
ports: # Ports du conteneur
- containerPort: 7000 # Port du conteneur
resources:
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"
---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
Expand All @@ -36,6 +42,7 @@ spec:
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
metrics:
- type: "Resource"
resource:
Expand Down

0 comments on commit ec7724c

Please sign in to comment.