-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
❗Potential Conflict Between HPA and SlimFaas/ReplicasAtStart
When using Horizontal Pod Autoscaler (HPA) together with SlimFaas, the minReplicas value defined in the HPA must be greater than or equal to the SlimFaas annotation SlimFaas/ReplicasAtStart.
Failing to respect this rule may result in unexpected behavior:
the HPA will enforce its minimum replicas based on CPU utilization, while SlimFaas will attempt to set its initial replica count independently, potentially causing conflicting scaling decisions or oscillations.
✅ Example Configuration
HPA
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: my-hpa
spec:
maxReplicas: 8
minReplicas: 2 # Must be >= SlimFaas/ReplicasAtStart
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: receiver
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 65SlimFaas
template:
metadata:
labels:
app: my-service
annotations:
SlimFaas/Function: "true"
SlimFaas/NumberParallelRequest: "2"
SlimFaas/ReplicasAtStart: "2"✅ Recommendation
Ensure that:
HPA.minReplicas >= SlimFaas/ReplicasAtStart
This guarantees consistent autoscaling behavior between SlimFaas and the Kubernetes HPA.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers