add HPA to Kubernetes deployment
All checks were successful
Gitea Actions Demo / lint (push) Successful in 25s
Gitea Actions Demo / test (push) Successful in 13s
Gitea Actions Demo / release-image (push) Successful in 1m56s

This commit is contained in:
Ryan Cavicchioni 2025-03-10 23:50:17 -05:00
parent 9869e98346
commit 61c3acf9b2
Signed by: ryanc
SSH Key Fingerprint: SHA256:KbXiwUnZnHFwFtt3Bytd+F3FN9pPHn1Z1cxMIE1TPbg
3 changed files with 20 additions and 1 deletions

View File

@ -6,7 +6,6 @@ metadata:
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 5
selector:
matchLabels:
app: kubernaut

19
kustomize/app/hpa.yaml Normal file
View File

@ -0,0 +1,19 @@
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: kubernaut
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: kubernaut
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50

View File

@ -6,4 +6,5 @@ resources:
- secret.yaml
- configmap.yaml
- deployment.yaml
- hpa.yaml
- services.yaml