Files

43 lines
910 B
YAML
Raw Permalink Normal View History

---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: pixelfed-worker-hpa
namespace: pixelfed-application
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: pixelfed-worker
minReplicas: 1
maxReplicas: 2
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 200 #1000m / 1500m
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 150 # 3GB / 4GB
behavior:
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Percent
value: 50
periodSeconds: 60
scaleUp:
stabilizationWindowSeconds: 60
policies:
- type: Percent
value: 100
periodSeconds: 60
- type: Pods
value: 1
periodSeconds: 60
selectPolicy: Max