Skip to content

[Federation] Make the hpa scale time window configurable#49583

Merged
k8s-github-robot merged 2 commits intokubernetes:masterfrom
irfanurrehman:fed-hpa-configTimeout
Aug 9, 2017
Merged

[Federation] Make the hpa scale time window configurable#49583
k8s-github-robot merged 2 commits intokubernetes:masterfrom
irfanurrehman:fed-hpa-configTimeout

Conversation

@irfanurrehman
Copy link
Copy Markdown

@irfanurrehman irfanurrehman commented Jul 25, 2017

This PR is on top of open pr #45993.
Please review only the last commit in this PR.
This adds a config param to controller manager, the value of which gets passed to hpa adapter via sync controller.
This is needed to reduce the overall time limit of the hpa scaling window to much lesser (then the default 2 mins) to get e2e tests run faster. Please see the comment on the newly added parameter.

Special notes for your reviewer:
@kubernetes/sig-federation-pr-reviews
@quinton-hoole
@marun to please validate the mechanism used to pass a parameter from cmd line to adapter.

Release note:

federation-controller-manager gets a new flag --hpa-scale-forbidden-window.
This flag is used to configure the duration used by federation hpa controller to determine if it can move max and/or min replicas 
around (or not), of a cluster local hpa object, by comparing current time with the last scaled time of that cluster local hpa. 
Lower value will result in faster response to scalibility conditions achieved by cluster local hpas on local replicas, but too low 
a value can result in thrashing. Higher values will result in slower response to scalibility conditions on local replicas.

@k8s-ci-robot k8s-ci-robot added sig/federation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 25, 2017
@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jul 25, 2017
@irfanurrehman irfanurrehman force-pushed the fed-hpa-configTimeout branch 6 times, most recently from 0e48108 to 7a3e8af Compare July 31, 2017 08:48
@ghost ghost assigned ghost and unassigned madhusudancs and colhom Jul 31, 2017
@ghost ghost self-requested a review July 31, 2017 16:20
@marun
Copy link
Copy Markdown
Contributor

marun commented Aug 1, 2017

If an argument is going to be added to the AdaptrerFactory signature, would it make more sense to make it a map of interfaces to allow for future extensibility?

@irfanurrehman
Copy link
Copy Markdown
Author

If an argument is going to be added to the AdaptrerFactory signature, would it make more sense to make it a map of interfaces to allow for future extensibility?

I do not clearly understand the need of doing so.
If you mean to point at being able to pass multiple params to a particular adapter, if the need be. Wouldn't it be possible to pass a map (or an array) of params to an interface{} (rather then a map of interfaces), which the adapter then casts back to the needed map or array. Am I missing something?

@marun
Copy link
Copy Markdown
Contributor

marun commented Aug 1, 2017

My suggestion is to avoid having to special-case instantiation in the controller and instead provide a map of all parameters (of type interface) to all sync controllers.

@irfanurrehman irfanurrehman force-pushed the fed-hpa-configTimeout branch from 7a3e8af to 93d094b Compare August 2, 2017 10:43
@irfanurrehman
Copy link
Copy Markdown
Author

My suggestion is to avoid having to special-case instantiation in the controller and instead provide a map of all parameters (of type interface) to all sync controllers.

Got it, thanks for the suggestion. Updated!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/Forbiddne/Forbidden/

Also, why is it desirable to drop the comment?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess it's been moved to options.go above. Makes sense.

Copy link
Copy Markdown
Author

@irfanurrehman irfanurrehman Aug 5, 2017

Choose a reason for hiding this comment

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

Actually, I did add quite an elaborate comment on the new argument added to the federation controller manager, thus dropped the one from here; but I see that it makes sense to keep the comment here also. Updated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider basing scaledTime on ScaleForbiddenWindow so that any change in that value does not require a change in this test.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agreed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

@ghost
Copy link
Copy Markdown

ghost commented Aug 3, 2017

Looks OK to me. @marun let me know when you're happy and I can approve.

@irfanurrehman irfanurrehman force-pushed the fed-hpa-configTimeout branch from 9e4d3fe to 2be69a5 Compare August 5, 2017 19:39
@ghost
Copy link
Copy Markdown

ghost commented Aug 7, 2017

/lgtm
/approve no-issue

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 7, 2017
@irfanurrehman
Copy link
Copy Markdown
Author

@madhusudancs @shashidharatd, can one of you please approve this for the flag name updated in "hack".

@shashidharatd
Copy link
Copy Markdown

/lgtm

@k8s-github-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: irfanurrehman, quinton-hoole, shashidharatd

Associated issue requirement bypassed by: quinton-hoole

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

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 9, 2017
@fejta-bot
Copy link
Copy Markdown

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)

@k8s-github-robot k8s-github-robot merged commit 82b3a80 into kubernetes:master Aug 9, 2017
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants