Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix defaulting and validation around the two modes for function scaling ( default vs. external scaler ) #14900

Closed
kwiatekus opened this issue Jul 25, 2022 · 3 comments
Labels
area/serverless Issues or PRs related to serverless
Milestone

Comments

@kwiatekus
Copy link
Contributor

kwiatekus commented Jul 25, 2022

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 and spec.scaleConfig.maxReplicas (higher than min)
than
default ( serverless managed Horizontal Pod Autoscaler kicks in to scale the function)

when
user defines spec.scaleConfig.minReplicas and spec.scaleConfig.maxReplicas (values equal or max lower than min)
than
validation webhook rejects such configuration

when
user leaves spec.scaleConfig empty
then
the default HPA scaler would not kick in

when
user defines spec.replicas with X
then
the deployment has X replicas

when
user leaves both spec.replicas and spec.scaleConfig empty
then
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

@kwiatekus kwiatekus added the area/serverless Issues or PRs related to serverless label Jul 25, 2022
@kwiatekus kwiatekus changed the title Integration test for scaling function via external scaler Integration test for the two modes of function scaling ( default vs. external scaler ) Sep 2, 2022
@kwiatekus kwiatekus added this to the 2.7 milestone Sep 2, 2022
@kwiatekus kwiatekus changed the title Integration test for the two modes of function scaling ( default vs. external scaler ) Test the two modes for function scaling ( default vs. external scaler ) Sep 2, 2022
@kwiatekus kwiatekus changed the title Test the two modes for function scaling ( default vs. external scaler ) Fix defaulting and validation around the two modes for function scaling ( default vs. external scaler ) Sep 2, 2022
@kwiatekus kwiatekus removed the kind/missing-test Categorizes issue or PR as related to missing automated tests for scenario. label Sep 2, 2022
@kwiatekus kwiatekus modified the milestones: 2.7, 2.8 Sep 5, 2022
@kwiatekus
Copy link
Contributor Author

Investigate whether function controller managed HPA scaling the function would simplify the logic ( p 3 ).

@dbadura
Copy link
Contributor

dbadura commented Oct 10, 2022

I would add case when user to max or min replicas.
In this case we should reject such configuration.

@kwiatekus kwiatekus modified the milestones: Future, 2.9 Dec 1, 2022
@kwiatekus
Copy link
Contributor Author

Works like described since #15576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/serverless Issues or PRs related to serverless
Projects
None yet
Development

No branches or pull requests

2 participants