Back to godoc.org
github.com/jthomperoo/predictive-horizontal-pod-autoscaler

Directory github.com/jthomperoo/predictive-horizontal-pod-autoscaler

v0.5.0
Latest Go to latest
Published: Mar 27, 2020 | License: Apache-2.0 | Module: github.com/jthomperoo/predictive-horizontal-pod-autoscaler

README

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.
Source: github.com/jthomperoo/predictive-horizontal-pod-autoscaler@v0.5.0/README.md