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

Add support for custom metrics for HPA #2423

Merged
merged 3 commits into from
May 9, 2022
Merged

Add support for custom metrics for HPA #2423

merged 3 commits into from
May 9, 2022

Conversation

sanketsudake
Copy link
Member

@sanketsudake sanketsudake commented May 2, 2022

Description

Previous PR: #2421

Add new fields in Function Specification to autoscale function based on different metrics combination.

// hpaMetrics is the list of metrics used to determine the desired replica count of the Deployment
// created for the function.
// Applicable for executor type newdeploy and container.
// +optional
Metrics []asv2beta2.MetricSpec `json:"hpaMetrics,omitempty"`

// hpaBehavior is the behavior of HPA when scaling in up/down direction.
// Applicable for executor type newdeploy and container.
// +optional
Behavior *asv2beta2.HorizontalPodAutoscalerBehavior `json:"hpaBehavior,omitempty"`

Which issue(s) this PR fixes:

Fixes #854

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

Merging #2423 (bdfa9c2) into master (ed4bd25) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #2423      +/-   ##
==========================================
- Coverage   17.42%   17.41%   -0.01%     
==========================================
  Files          60       60              
  Lines        6544     6539       -5     
==========================================
- Hits         1140     1139       -1     
+ Misses       5320     5317       -3     
+ Partials       84       83       -1     
Flag Coverage Δ
unittests 17.41% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/fission-cli/cmd/function/list.go 0.00% <0.00%> (ø)
pkg/fission-cli/cmd/function/create.go 25.64% <57.14%> (+<0.01%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
@sanketsudake sanketsudake merged commit 39dd65b into master May 9, 2022
@sanketsudake sanketsudake deleted the custom-metrics branch May 24, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom metric based HPA
1 participant