Fix defaulting and validation around the two modes for function scaling ( default vs. external scaler ) #14900
Labels
area/serverless
Issues or PRs related to serverless
Milestone
Description
Fix the validation, defaulting logic so that it conforms with the following case description.
Write tests that validates the scenarios.
when
user defines
spec.scaleConfig.minReplicas
andspec.scaleConfig.maxReplicas
(higher than min)than
default ( serverless managed Horizontal Pod Autoscaler kicks in to scale the function)
when
user defines
spec.scaleConfig.minReplicas
andspec.scaleConfig.maxReplicas
(values equal or max lower than min)than
validation webhook rejects such configuration
when
user leaves
spec.scaleConfig
emptythen
the default HPA scaler would not kick in
when
user defines
spec.replicas
with Xthen
the deployment has X replicas
when
user leaves both
spec.replicas
andspec.scaleConfig
emptythen
the defaulting webhook should fill in spec.replicas=1
Reason
Function CR support scale subresource that would enable scaling functions via external scalers.
Additionally it still offers the way to configure default scaling ( via serverless managed HPA ) based on cpu consumption
Those configuration modes should be tested
Related
#15291
#15292
The text was updated successfully, but these errors were encountered: