Skip to content

Commit

Permalink
added autoscaler to cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 12, 2024
1 parent 467df41 commit 761a76c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion config/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ metadata:
labels:
app: deepface
spec:
replicas: 1
selector:
matchLabels:
app: deepface
Expand Down Expand Up @@ -41,3 +40,22 @@ spec:
targetPort: 5000
selector:
app: deepface

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: deepface-autoscaler
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: deepface
minReplicas: 2
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50

0 comments on commit 761a76c

Please sign in to comment.