Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

hvpa redesign#76

Closed
ggaurav10 wants to merge 27 commits intogardener-attic:masterfrom
ggaurav10:bucketwithscale
Closed

hvpa redesign#76
ggaurav10 wants to merge 27 commits intogardener-attic:masterfrom
ggaurav10:bucketwithscale

Conversation

@ggaurav10
Copy link
Contributor

@ggaurav10 ggaurav10 commented Aug 10, 2020

What this PR does / why we need it:
hvpa redesign

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Refer this for design details

Release note:

Change API Group to `autoscaling.gardener.cloud`
Implement scale subresource - Now HPA, if deployed, will scale HVPA's scale subresource instead of the HVPA's target
The scaling is not based on HPA/VPA weightage anymore. Max of total resources recommended by HPA/VPA is considered for scaling based on provided scale intervals.

@ggaurav10 ggaurav10 requested a review from a team as a code owner August 10, 2020 07:17
@ghost ghost added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 10, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 13, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@ghost ghost added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@ghost ghost added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 13, 2020
@ghost ghost added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 14, 2020
@ghost ghost added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 25, 2020
Copy link
Collaborator

@amshuman-kr amshuman-kr left a comment

Choose a reason for hiding this comment

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

Thanks a lot @ggaurav10 for the substantial changes ❤️
The PR really looks good now!

Only some minor questions/suggestions 🙂

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 27, 2020
Copy link
Collaborator

@amshuman-kr amshuman-kr left a comment

Choose a reason for hiding this comment

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

Thanks @ggaurav10 for good test coverage! As discussed offline, the main code line looks good.

Just a few questions and perhaps a 3-4 more test cases to cover some other scenarios.

Also, would it be possible to use the relevant formula (or even a test utility function call) in the expected value rather than code it in as a constant? That might make the test cases more readable.

return h.Status.OverrideScaleUpStabilization
}, timeout).Should(BeTrue())

// Update VPA status, let HVPA scale
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we cover the update HPA and let HVPA scale case too?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, can we include a couple of more entries where HPA and/or VPA deployment is disabled?

},

Entry("UpdateMode Auto, Should Scale only memory", &data{
Entry("UpdateMode Auto, scale up, paradoxical scaling, replicas increases, resources per replica decreases", &data{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Entry("UpdateMode Auto, scale up, paradoxical scaling, replicas increases, resources per replica decreases", &data{
Entry("UpdateMode Auto, scale up, paradoxical scaling, replicas increases, resources per replica decrease is blocked", &data{

},
},
}),
Entry("UpdateMode Auto, overall scale up, paradoxical scaling, but replicas decrease - should not be considered paradoxical", &data{
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I understood right, this case is where the current replicas and requests are such that they are not within the right effective scaling interval for the currentReplicas and the recommendation results in a scale up but the effective scaling interval has the desiredReplicas < currentReplicas. Is that correct?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Related to this scenario, could we also cover change in scaling interval spec such that the current replicas and requests that were valid for the effective scaling interval earlier but are now no longer valid after the spec change (for no change in recommendations, scale up and down)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is that correct?

Yes

Related to this scenario, could we also cover change in scaling interval spec such that the current replicas and requests that were valid for the effective scaling interval earlier but are now no longer valid after the spec change (for no change in recommendations, scale up and down)?

will add in next commit

},
}),
Entry("UpdateMode Auto, Proportional scaling", &data{
Entry("UpdateMode Auto, scale down hysteresis", &data{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Entry("UpdateMode Auto, scale down hysteresis", &data{
Entry("UpdateMode Auto, scale down hysteresis based on scaling intervals overlap", &data{

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the scale up side of this covered?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add a couple of cases (scale up and down) without scaling interval gaps configured?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

scale down hysteresis due to ScalingIntervalsOverlap is covered in this case. scale up hysteresis is provided by minChange which is covered in test case - UpdateMode Auto, scale up blocked due to minChange

Copy link
Collaborator

Choose a reason for hiding this comment

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

scale up hysteresis is provided by minChange which is covered in test case - UpdateMode Auto, scale up blocked due to minChange

Understood. But I meant a specific case for scale up hysteresis where minChange doesn't block. I.e. scale up happens within the current bucket even though the next bucket's min total resources is higher than the scaled up total resources. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah ok.. sure. will add.

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Sep 10, 2020
@ghost ghost removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Sep 10, 2020
@CLAassistant
Copy link

CLAassistant commented Sep 16, 2020

CLA assistant check
All committers have signed the CLA.

@gardener-robot gardener-robot added lifecycle/stale Nobody worked on this for 6 months (will further age) needs/changes Needs (more) changes labels Nov 16, 2020
@gardener-robot gardener-robot added size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Nov 20, 2020
@ghost ghost added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 20, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 20, 2020
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 23, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 23, 2020
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels May 19, 2021
@amshuman-kr
Copy link
Collaborator

/close in favour of #88

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lifecycle/rotten Nobody worked on this for 12 months (final aging stage) needs/changes Needs (more) changes needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/second-opinion Needs second review by someone else size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants