Skip to content
Custom Pod Autoscaler base, allows creation of Custom Pod Autoscalers
Go Python Dockerfile Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Update unit tests for consistency with operator (#63) Nov 16, 2019
api Add log levels, new log framework, verbosity (#93) Jan 19, 2020
cmd/custom-pod-autoscaler Add log levels, new log framework, verbosity (#93) Jan 19, 2020
config Add log levels, new log framework, verbosity (#93) Jan 19, 2020
docs Add log levels, new log framework, verbosity (#93) Jan 19, 2020
evaluate Add log levels, new log framework, verbosity (#93) Jan 19, 2020
example Add new resources, scale with API (#92) Jan 18, 2020
execute Remove unnecessary error catching (#91) Jan 17, 2020
fake Add new resources, scale with API (#92) Jan 18, 2020
metric Add log levels, new log framework, verbosity (#93) Jan 19, 2020
resourceclient Add new resources, scale with API (#92) Jan 18, 2020
scaler Add log levels, new log framework, verbosity (#93) Jan 19, 2020
.gitignore Update unit tests for consistency with operator (#63) Nov 16, 2019
CHANGELOG.md Cut 0.9.0 release (#94) Jan 19, 2020
Dockerfile Add graceful shutdown of API and scaler (#18) Oct 3, 2019
LICENSE Initial Proof of Concept Sep 26, 2019
Makefile Add documentation to source control (#82) Dec 22, 2019
README.md Add metric, eval and method guides (#86) Dec 24, 2019
codecov.yml Add log levels, new log framework, verbosity (#93) Jan 19, 2020
go.mod Add log levels, new log framework, verbosity (#93) Jan 19, 2020
go.sum Add log levels, new log framework, verbosity (#93) Jan 19, 2020
mkdocs.yml Add new resources, scale with API (#92) Jan 18, 2020
readthedocs.yml Add documentation to source control (#82) Dec 22, 2019

README.md

Build codecov GoDoc Go Report Card Documentation Status License

Custom Pod Autoscaler

This is the Custom Pod Autoscaler (CPA) code and base images.

The CPA is part of the Custom Pod Autoscaler Framework.

What is it?

A Custom Pod Autoscaler is a Kubernetes autoscaler that is customised and user created. Custom Pod Autoscalers are designed to be similar to the Kubernetes Horizontal Pod Autoscaler. The Custom Pod Autoscaler framework allows easier and faster development of Kubernetes autoscalers.
A Custom Pod Autoscaler can be created by using this project, extending the Docker base images provided and inserting your own logic; see the examples for more information.

How does it work?

A Custom Pod Autoscaler has a base program (defined in this repository) that handles interacting with user logic, for example by using shell commands and piping data into them.
When developing a Custom Pod Autoscaler you define logic for two stages:

  • Metric gathering - collecting or generating metrics; can be calling metrics APIs, running calculations locally, making HTTP requests.
  • Evaluating metrics - taking these gathered metrics and using them to decide how many replicas a resource should have.

These two pieces of logic are all the custom logic required to build a Custom Pod Autoscaler, the base program will handle all Kubernetes API interactions for scaling/retrieving resources.

Getting started

Check out this getting started guide for a quick start for developers.

More information

See the wiki for more information, such as guides and references.

Developing this project

Environment

Developing this project requires these dependencies:

To view docs locally, requires:

Commands

  • make - builds the CPA binary.
  • make docker - builds the CPA base images.
  • make lint - lints the code.
  • make unittest - runs the unit tests.
  • make vendor - generates a vendor folder.
  • make doc - hosts the documentation locally, at 127.0.0.1:8000.
You can’t perform that action at this time.