Skip to content
Horizontal Pod Autoscaler built with predictive abilities using statistical models
Go Dockerfile Shell Other
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Initial commit Dec 8, 2019
build Update CPA to 0.11.0 and HPA to 0.5.0 (#18) Mar 10, 2020
cmd/predictive-horizontal-pod-autoscaler Add defaults matching K8s HPA, add settable config (#19) Mar 10, 2020
config Add defaults matching K8s HPA, add settable config (#19) Mar 10, 2020
docs Include HPA eval as part of decision making (#23) Mar 23, 2020
evaluate Include HPA eval as part of decision making (#23) Mar 23, 2020
example Add defaults matching K8s HPA, add settable config (#19) Mar 10, 2020
fake Add unit tests to fake package (#20) Mar 10, 2020
prediction Add multiplicative method for Holt Winters model (#4) Dec 20, 2019
sql Initial commit Dec 8, 2019
stored Add holt-winters prediction model support (#1) Dec 16, 2019
.gitignore Initial commit Dec 8, 2019
CHANGELOG.md Cut 0.5.0 release (#25) Mar 27, 2020
LICENSE Initial commit Dec 8, 2019
Makefile Add docs (#9) Feb 25, 2020
README.md Cut 0.5.0 release (#25) Mar 27, 2020
codecov.yml Update to CPA 0.10.0 and HPA 0.4.0 (#6) Jan 25, 2020
config.yaml Add defaults matching K8s HPA, add settable config (#19) Mar 10, 2020
go.mod Update CPA to 0.11.0 and HPA to 0.5.0 (#18) Mar 10, 2020
go.sum Update CPA to 0.11.0 and HPA to 0.5.0 (#18) Mar 10, 2020
mkdocs.yml Add defaults matching K8s HPA, add settable config (#19) Mar 10, 2020
readthedocs.yml Add docs (#9) Feb 25, 2020

README.md

Build codecov go.dev Go Report Card Documentation Status License

Predictive Horizontal Pod Autoscaler

This is a Custom Pod Autoscaler; aiming to have identical functionality to the Horizontal Pod Autoscaler, however with added predictive elements.

This uses the Horizontal Pod Autoscaler Custom Pod Autoscaler extensively to provide most functionality for the Horizontal Pod Autoscaler parts.

How does it work?

This project works by calculating the number of replicas a resource should have, then storing these values and using statistical models against them to produce predictions for the future.
These predictions are compared and can be used instead of the raw replica count calculated by the Horizontal Pod Autoscaler logic.

Features

  • Functionally identical to Horizontal Pod Autoscaler for calculating replica counts without prediction.
  • Choice of statistical models to apply over Horizontal Pod Autoscaler replica counting logic.
    • Holt-Winters Smoothing
    • Linear Regression
  • Allows customisation of Kubernetes autoscaling options without master node access. Can therefore work on managed solutions such as EKS or GCP.
    • CPU Initialization Period.
    • Downscale Stabilization.
    • Sync Period.
    • Initial Readiness Delay.
  • Runs in Kubernetes as a standard Deployment.

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 Predictive HPA binary.
  • make docker - builds the Predictive HPA image.
  • 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.