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 Kubernetes Workload scaler #2010

Merged
merged 18 commits into from
Aug 6, 2021
Merged

Conversation

JorTurFer
Copy link
Member

@JorTurFer JorTurFer commented Aug 4, 2021

Add a new scaler based on the amount of pods which match the selectors (allowing also to specify a specific namespace or all)

With this scaler, you can scale a workload according to another relater workload inside the cluster:

For example - Workload A processes a queue and interacts with workload B. Workload A can autoscale based on queue depth and workload B on CPU. But in some scenarios, you want to add 1 instance for workload B for every 4 instances of workload A

Checklist

Relates to #1735

JorTurFer and others added 11 commits August 2, 2021 23:00
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
@JorTurFer JorTurFer marked this pull request as ready for review August 5, 2021 15:19
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

Looking good, minor nits only.

.golangci.yml Show resolved Hide resolved
pkg/scalers/kubernetes_workload_scaler.go Outdated Show resolved Hide resolved
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM, we could potentially add it to 2.4 release, wdyt @tomkerkhove @ahmelsayed ?

@zroubalik
Copy link
Member

@JorTurFer the linter is complaining about the empty line, there's probably some char left from the gh suggestion :(

Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
@JorTurFer
Copy link
Member Author

Yes it is. I have just solved it 😁

@tomkerkhove
Copy link
Member

That's fine by me @zroubalik but added a remark on the docs PR related to the namespace that we might want to change first if we agree on it.

Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Copy link
Contributor

@ahmelsayed ahmelsayed left a comment

Choose a reason for hiding this comment

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

LGTM too. Thanks @JorTurFer

@JorTurFer
Copy link
Member Author

JorTurFer commented Aug 5, 2021

As we discussed @tomkerkhove @zroubalik, I have just removed the possibility to select the namespace. The search scope is the namespace where the scaledobject is placed

Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

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

LGTM

@zroubalik zroubalik added this to the v2.4.0 milestone Aug 6, 2021
@zroubalik zroubalik merged commit a3b7c3b into kedacore:main Aug 6, 2021
TsuyoshiUshio pushed a commit that referenced this pull request Aug 6, 2021
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
Signed-off-by: Tsuyoshi Ushio <ushio@simplearchitect.com>
@JorTurFer JorTurFer deleted the workload_autoscaler branch August 27, 2021 17:32
nilayasiktoprak pushed a commit to nilayasiktoprak/keda that referenced this pull request Oct 23, 2021
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
Signed-off-by: nilayasiktoprak <nilayasiktoprak@gmail.com>
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.

4 participants