predictive-horizontal-pod-autoscaler

module
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2020 License: Apache-2.0

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.

Directories

Path Synopsis
cmd
predictive-horizontal-pod-autoscaler
Predictive Horizontal Pod Autoscaler provides executable Predictive Horizontal Pod Autoscaler logic, which can be built into a Custom Pod Autoscaler.
Predictive Horizontal Pod Autoscaler provides executable Predictive Horizontal Pod Autoscaler logic, which can be built into a Custom Pod Autoscaler.
Package config provides configuration options for the Predictive Horizontal Pod Autoscaler
Package config provides configuration options for the Predictive Horizontal Pod Autoscaler
Package prediction provides a framework for using models to make predictions based on historical evaluations
Package prediction provides a framework for using models to make predictions based on historical evaluations
Package stored provides interfacing methods for updating/retrieving data from the local sqlite3 database
Package stored provides interfacing methods for updating/retrieving data from the local sqlite3 database

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL