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

hpa-controller supports custom metrics #3673

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

Poor12
Copy link
Member

@Poor12 Poor12 commented Jun 16, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:
hpa-controller supports custom metrics, depends on #3638.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:
None

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 16, 2023
@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 16, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2023

Codecov Report

Merging #3673 (eeab59c) into master (527efd1) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master    #3673      +/-   ##
==========================================
- Coverage   56.64%   56.61%   -0.03%     
==========================================
  Files         221      221              
  Lines       20838    20831       -7     
==========================================
- Hits        11803    11794       -9     
  Misses       8413     8413              
- Partials      622      624       +2     
Flag Coverage Δ
unittests 56.61% <ø> (-0.03%) ⬇️

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

see 12 files with indirect coverage changes

@Poor12 Poor12 force-pushed the add-hpa-controller branch 3 times, most recently from 8270653 to 7212a5c Compare June 19, 2023 07:51
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder, #3638 has been merged.

@Poor12 Poor12 marked this pull request as ready for review June 20, 2023 01:17
@karmada-bot karmada-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 20, 2023
@Poor12
Copy link
Member Author

Poor12 commented Jun 20, 2023

Test results can refer to karmada-io/website#378.
e2e fails occasionally.

@Poor12
Copy link
Member Author

Poor12 commented Jun 20, 2023

/cc @jwcesign

@jwcesign
Copy link
Member

Could you please review this as well, @chaunceyjiang?

@jwcesign
Copy link
Member

jwcesign commented Jun 20, 2023

Do you have any pictures of the testing result?

Refer to: karmada-io/website#378

@jwcesign
Copy link
Member

/lgtm cc @chaunceyjiang @RainbowMango for checking

Copy link
Member

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -678,6 +679,8 @@ func (c *FederatedHPAController) validateAndParseSelector(hpa *autoscalingv1alph

// Computes the desired number of replicas for a specific hpa and metric specification,
// returning the metric status and a proposed condition to be set on the HPA object.
//
//nolint:gocyclo
func (c *FederatedHPAController) computeReplicasForMetric(ctx context.Context, hpa *autoscalingv1alpha1.FederatedHPA, spec autoscalingv2.MetricSpec,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many parameters on this method, please open an issue to optimize it and remove nolint:gocyclo.

Signed-off-by: Poor12 <shentiecheng@huawei.com>
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

/hold
for #3673 (comment).
Please unhold after the issue is created.

@karmada-bot karmada-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 21, 2023
@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2023
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 21, 2023
@Poor12
Copy link
Member Author

Poor12 commented Jun 21, 2023

/hold cancel

@karmada-bot karmada-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 21, 2023
@karmada-bot karmada-bot merged commit db9d56c into karmada-io:master Jun 21, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants