Autoscaling components for Kubernetes
Go to file
vadasambar 23f03e112e feat: support custom scheduler config for in-tree schedulr plugins (without extenders)
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: rename `--scheduler-config` -> `--scheduler-config-file` to avoid confusion
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

fix: `goto` causing infinite loop
- abstract out running extenders in a separate function
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: remove code around extenders
- we decided not to use scheduler extenders for checking if a pod would fit on a node
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: move scheduler config to a `utils/scheduler` package`
- use default config as a fallback
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

test: fix static_autoscaler test
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: `GetSchedulerConfiguration` fn
- remove falling back
- add mechanism to detect if the scheduler config file flag was set
-
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

test: wip add tests for `GetSchedulerConfig`
- tests are failing now
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

test: add tests for `GetSchedulerConfig`
- abstract error messages so that we can use them in the tests
- set api version explicitly (this is what upstream does as well)
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: do a round of cleanup to make PR ready for review
- make import names consistent
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

fix: use `pflag` to check if the `--scheduler-config-file` flag was set
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

docs: add comments for exported error constants
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: don't export error messages
- exporting is not needed
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

fix: add underscore in test file name
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

test: fix test failing because of no comment on exported `SchedulerConfigFileFlag`
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refacotr: change name of flag variable `schedulerConfig` -> `schedulerConfigFile`
- avoids confusion
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

test: add extra test cases for predicate checker
- where the predicate checker uses custom scheduler config
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: remove `setFlags` variable
- not needed anymore
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: abstract custom scheduler configs into `conifg` package
- make them constants
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

test: fix linting error
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: introduce a new custom test predicate checker
- instead of adding a param to the current one
- this is so that we don't have to pass `nil` to the existing test predicate checker in many places
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: rename `NewCustomPredicateChecker` -> `NewTestPredicateCheckerWithCustomConfig`
- latter narrows down meaning of the function better than former
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

refactor: rename `GetSchedulerConfig` -> `ConfigFromPath`
- `scheduler.ConfigFromPath` is shorter and feels less vague than `scheduler.GetSchedulerConfig`
- move test config to a new package `test` under `config` package
Signed-off-by: vadasambar <surajrbanakar@gmail.com>

docs: add `TODO` for replacing code to parse scheduler config
- with upstream function
Signed-off-by: vadasambar <surajrbanakar@gmail.com>
2023-07-13 09:51:33 +05:30
.github Bump golang to 1.20 2023-04-15 10:15:52 +02:00
addon-resizer Merge pull request #5547 from jbartosik/addon-resizer-kep-proposal 2023-05-31 05:03:45 -07:00
balancer Fix typo at balancer.md 2023-05-25 09:28:46 +09:00
builder Bump golang to 1.20 2023-04-15 10:15:52 +02:00
charts Bump the Chart version to 9.29.1 and CA image to 1.27.2 2023-06-13 15:46:11 +05:30
cluster-autoscaler feat: support custom scheduler config for in-tree schedulr plugins (without extenders) 2023-07-13 09:51:33 +05:30
hack Merge pull request #5637 from dougsong/master 2023-05-02 04:02:12 -07:00
multidimensional-pod-autoscaler aligned naming with Google API 2023-05-22 20:50:03 -07:00
vertical-pod-autoscaler Merge pull request #5911 from wu0407/add-status-subresource 2023-07-03 02:30:51 -07:00
.gitignore Move GPULabel and GPUTypes to cloud provider 2019-03-25 13:03:01 -07:00
.pre-commit-config.yaml Update helm-docs version and add PR action to ensure docs are updated 2020-10-07 23:53:33 +01:00
CONTRIBUTING.md Update CONTRIBUTING.md 2018-07-18 11:02:10 +05:30
LICENSE Top level readme and license 2017-04-18 17:05:03 +02:00
OWNERS Clean up stale OWNERS 2022-09-30 12:28:23 +02:00
README.md docs: replaces Travis CI badge with GitHub Actions badges 2021-07-13 10:20:32 -07:00
SECURITY_CONTACTS Update embargo doc link in SECURITY_OWNERS and changes PST to PSC 2019-03-08 10:23:48 -07:00
code-of-conduct.md Add code-of-conduct.md 2017-12-20 13:31:27 -05:00

README.md

Kubernetes Autoscaler

Release Charts Tests GoDoc Widget

This repository contains autoscaling-related components for Kubernetes.

What's inside

Cluster Autoscaler - a component that automatically adjusts the size of a Kubernetes Cluster so that all pods have a place to run and there are no unneeded nodes. Supports several public cloud providers. Version 1.0 (GA) was released with kubernetes 1.8.

Vertical Pod Autoscaler - a set of components that automatically adjust the amount of CPU and memory requested by pods running in the Kubernetes Cluster. Current state - beta.

Addon Resizer - a simplified version of vertical pod autoscaler that modifies resource requests of a deployment based on the number of nodes in the Kubernetes Cluster. Current state - beta.

Charts - Supported Helm charts for components above.

Contact Info

Interested in autoscaling? Want to talk? Have questions, concerns or great ideas?

Please join us on #sig-autoscaling at https://kubernetes.slack.com/, or join one of our weekly meetings. See the Kubernetes Community Repo for more information.

Getting the Code

Fork the repository in the cloud:

  1. Visit https://github.com/kubernetes/autoscaler
  2. Click Fork button (top right) to establish a cloud-based fork.

The code must be checked out as a subdirectory of k8s.io, and not github.com.

mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
# Replace "$YOUR_GITHUB_USERNAME" below with your github username
git clone https://github.com/$YOUR_GITHUB_USERNAME/autoscaler.git
cd autoscaler

Please refer to Kubernetes Github workflow guide for more details.