Skip to content

Commit

Permalink
Update to CPA v1.0.0, HPA v0.6.0 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jthomperoo authored Aug 31, 2020
1 parent 4863445 commit 6fe47d1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 37 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Update Custom Pod Autoscaler version to `v1.0.0`.
- Update Horizontal Pod Autoscaler version to `v0.6.0`.

## [v0.5.0] - 2020-03-27
### Changed
Expand Down Expand Up @@ -58,4 +61,4 @@ https://github.com/jthomperoo/predictive-horizontal-pod-autoscaler/compare/v0.2.
[v0.2.0]:
https://github.com/jthomperoo/predictive-horizontal-pod-autoscaler/compare/v0.1.0...v0.2.0
[v0.1.0]:
https://github.com/jthomperoo/predictive-horizontal-pod-autoscaler/releases/tag/v0.1.0
https://github.com/jthomperoo/predictive-horizontal-pod-autoscaler/releases/tag/v0.1.0
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/jthomperoo/predictive-horizontal-pod-autoscaler)
[![Go Report Card](https://goreportcard.com/badge/github.com/jthomperoo/predictive-horizontal-pod-autoscaler)](https://goreportcard.com/report/github.com/jthomperoo/predictive-horizontal-pod-autoscaler)
[![Documentation Status](https://readthedocs.org/projects/predictive-horizontal-pod-autoscaler/badge/?version=latest)](https://predictive-horizontal-pod-autoscaler.readthedocs.io/en/latest)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![License](https://img.shields.io/:license-apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)

<p>This project is supported by:</p>
<p>
Expand All @@ -13,19 +13,19 @@
</p>

# Predictive Horizontal Pod Autoscaler
This is a [Custom Pod Autoscaler](https://www.github.com/jthomperoo/custom-pod-autoscaler); aiming
to have identical functionality to the Horizontal Pod Autoscaler, however with added predictive
elements.
This is a [Custom Pod Autoscaler](https://www.github.com/jthomperoo/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](https://www.github.com/jthomperoo/horizontal-pod-autoscaler)
extensively to provide most functionality for the Horizontal Pod Autoscaler parts.
This uses the
[Horizontal Pod Autoscaler Custom Pod Autoscaler](https://www.github.com/jthomperoo/horizontal-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
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
Expand Down Expand Up @@ -67,4 +67,4 @@ To view docs locally, requires:
* `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`.
* `make doc` - hosts the documentation locally, at `127.0.0.1:8000`.
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ENV USER_UID=1001 \
RUN dnf install sqlite wget -y

# Install CPA
RUN wget -qO- https://github.com/jthomperoo/custom-pod-autoscaler/releases/download/v0.11.0/custom-pod-autoscaler.tar.gz | tar xvz && mv dist cpa
RUN wget -qO- https://github.com/jthomperoo/custom-pod-autoscaler/releases/download/v1.0.0/custom-pod-autoscaler.tar.gz | tar xvz && mv dist cpa

WORKDIR /app

Expand All @@ -45,4 +45,4 @@ RUN mkdir /store && \

USER ${USER_UID}

CMD [ "/entrypoint.sh" ]
CMD [ "/entrypoint.sh" ]
34 changes: 17 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@
[![go.dev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/jthomperoo/predictive-horizontal-pod-autoscaler)
[![Go Report Card](https://goreportcard.com/badge/github.com/jthomperoo/predictive-horizontal-pod-autoscaler)](https://goreportcard.com/report/github.com/jthomperoo/predictive-horizontal-pod-autoscaler)
[![Documentation Status](https://readthedocs.org/projects/predictive-horizontal-pod-autoscaler/badge/?version=latest)](https://predictive-horizontal-pod-autoscaler.readthedocs.io/en/latest)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![License](https://img.shields.io/:license-apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
# Predictive Horizontal Pod Autoscaler

# What is it?

This is a [Custom Pod Autoscaler](https://www.github.com/jthomperoo/custom-pod-autoscaler);
aiming to have identical functionality to the Horizontal Pod Autoscaler, however with added
predictive elements using statistical models.
This is a [Custom Pod Autoscaler](https://www.github.com/jthomperoo/custom-pod-autoscaler);
aiming to have identical functionality to the Horizontal Pod Autoscaler, however with added
predictive elements using statistical models.

This uses the
[Horizontal Pod Autoscaler reimplemented as a Custom Pod Autoscaler](https://www.github.com/jthomperoo/horizontal-pod-autoscaler)
extensively to provide most functionality for the Horizontal Pod Autoscaler parts.
This uses the
[Horizontal Pod Autoscaler reimplemented as a Custom Pod Autoscaler](https://www.github.com/jthomperoo/horizontal-pod-autoscaler)
extensively to provide most functionality for the Horizontal Pod Autoscaler parts.

# Why would I use it?

This autoscaler lets you choose models and fine tune them in order to predict how many replicas a
resource should have, preempting events such as regular, repeated high load.
This autoscaler lets you choose models and fine tune them in order to predict how many replicas a
resource should have, preempting events such as regular, repeated high load.

# What systems would need it?

Systems that have predictable changes in load, for example; if over a 24 hour period the load on a
resource is generally higher between 3pm and 5pm - with enough data and use of correct models and
tuning the autoscaler could predict this and preempt the load, increasing responsiveness of the
system to changes in load. This could be useful for handling different userbases across different
timezones, or understanding that if a load is rapidly increasing we can prempt the load by
Systems that have predictable changes in load, for example; if over a 24 hour period the load on a
resource is generally higher between 3pm and 5pm - with enough data and use of correct models and
tuning the autoscaler could predict this and preempt the load, increasing responsiveness of the
system to changes in load. This could be useful for handling different userbases across different
timezones, or understanding that if a load is rapidly increasing we can prempt the load by
predicting replica counts.

# 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
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.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.13
require (
github.com/golang-migrate/migrate/v4 v4.7.0
github.com/google/go-cmp v0.3.1
github.com/jthomperoo/custom-pod-autoscaler v0.11.0
github.com/jthomperoo/custom-pod-autoscaler v1.0.0
github.com/jthomperoo/holtwinters v0.2.0
github.com/jthomperoo/horizontal-pod-autoscaler v0.5.0
github.com/jthomperoo/horizontal-pod-autoscaler v0.6.0
github.com/mattn/go-sqlite3 v2.0.1+incompatible
gonum.org/v1/gonum v0.6.1
k8s.io/api v0.17.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62F
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jteeuwen/go-bindata v0.0.0-20151023091102-a0ff2567cfb7/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs=
github.com/jthomperoo/custom-pod-autoscaler v0.11.0 h1:D+pqvvPqhBic5GPOFuARyeU5lu6IEbliHiFFB1MykMQ=
github.com/jthomperoo/custom-pod-autoscaler v0.11.0/go.mod h1:IXqowId2V8CtKih/aK0ulVxjBfUI5Er6S6iR2EAzFM8=
github.com/jthomperoo/custom-pod-autoscaler v1.0.0 h1:QvYuoidDCsks7gspno6QMwKFWu7fUQKy/AeK+wnRjhQ=
github.com/jthomperoo/custom-pod-autoscaler v1.0.0/go.mod h1:u17XF4vuU55t2/U9FesZ5gypneyGJR4avmofHQvnm2Q=
github.com/jthomperoo/holtwinters v0.2.0 h1:4NcU3z6EfEtqlRF2P9xXv3DSY3TsRekgoJfWnprlI4Y=
github.com/jthomperoo/holtwinters v0.2.0/go.mod h1:uo/ij0URykDyHDOIGK+Ivt5JsH0xn+uGDpYuvhnIWsU=
github.com/jthomperoo/horizontal-pod-autoscaler v0.5.0 h1:ZT1ONEwCg3UcdVHjj0+cSD5OAJTI2cCmJbbXlkNQjqs=
github.com/jthomperoo/horizontal-pod-autoscaler v0.5.0/go.mod h1:rMNmbitxBtL8O0Gx76U/ao3AN0LULqx79ivIlY8aXM4=
github.com/jthomperoo/horizontal-pod-autoscaler v0.6.0 h1:2IZ/EMUFX7UKt60coesHDoBhZsMi4Buq/ceCO80lf5Y=
github.com/jthomperoo/horizontal-pod-autoscaler v0.6.0/go.mod h1:xVxTdSmKtrKEq0eWWGm5ODck/7oLcPMizPclFSQKtnA=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
Expand Down

0 comments on commit 6fe47d1

Please sign in to comment.