All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v0.13.2 - 2023-07-01
- Upgraded
statsmodels
to0.14.0
. - Upgraded
dataclasses-json
to0.5.8
.
v0.13.1 - 2023-03-07
- Upgraded to Go
v1.20
. - Upgraded package dependencies.
v0.13.0 - 2023-01-16
- New ability to choose a start interval for a model, e.g. a holt winters model that only starts at the next full hour.
startInterval
is an optional duration that defines the next interval to start at. For example1m
would start the model recording data and calculating after the next full minute has passed.
- New ability to clear a model's replica history if too much time has passed since it last recorded any data.
resetDuration
is an optional duration that defines how long should be allowed to pass without a model recording any data, if that occurs the replica history is cleared and if a start interval is provided a new start time is calculated. If a model is not calculated for an extended period of time (e.g. a cluster being powered off) this allows old data to be cleared out and not used in calculations and a new start time calculated to respect any provided interval. For example3m
would clear the model's replica history (and reset the start time if interval is provided) if it has been more than 3 minutes since the last data was recorded for the model.
- BREAKING CHANGE typo fixed,
ModelHistory.ReplicaHistroy
renamed toModelHistory.ReplicaHistory
.
v0.12.0 - 2023-01-15
- See the migration guide from
v0.11.2
here. - BREAKING CHANGE PHPA spec upgraded from
autoscaling/v2beta2
toautoscaling/v2
for the following definitions:CrossVersionObjectReference
in thescaleTargetRef
field.MetricSpec
in themetrics
field.MetricStatus
in thecurrentMetrics
field.
- Upgraded to k8shorizmetrics
v2.0.0
. - Upgraded from
autoscaling/v2beta2
toautoscaling/v2
. - Upgraded to Go
v1.19
.
- BREAKING CHANGE Removed
downscaleStabilization
, replaced withbehavior
,scaleDown
,stabilizationWindowSeconds
.
- Support for HPA scaling behaviors.
v0.11.2 - 2022-11-25
- Bug that would display a statsmodels error when using Holt-Winters and having too few observations (less than 2 * seasonal periods).
v0.11.1 - 2022-07-23
- Bug that caused the autoscaler to fail to scale every time, due to invalid K8s GVR resource fed to the scaling client.
v0.11.0 - 2022-07-23
- See the migration guide from
v0.10.0
here. - BREAKING CHANGE: Major rewrite converting this project from a Custom Pod Autoscaler to have its own dedicated CRD
and operator.
- Configuration and deployment has changed completely, no longer need to install the Custom Pod Autoscaler Operator, instead you need to install the Predictive Horizontal Pod Autoscaler as an operator.
- No longer deployed as
CustomPodAutoscaler
custom resources, now deployed asPredictiveHorizontalPodAutoscaler
custom resources.
- BREAKING CHANGES: Several configuration options renamed for clarity.
LinearModel -> storedValues
renamed toLinearModel -> historySize
Model -> perInterval
renamed toModel -> perSyncPeriod
- BREAKING CHANGES:
perSyncPeriod
behaviour changed slightly, now it will no longer calculate the prediction, but it will still update the replica history available to make a prediction with and prune the replica history if needed. - Holt-Winters runtime hooks format changed:
evaluations
renamed toreplicaHistory
.- Format change for
replicaHistory
, now in the format[{"time": "<timestamp>", "replicas": <replica count>}]
.
- Upgrade to Go
v1.18
. - No longer SQLite based storage, instead using Kubernetes configmaps which give persistent storage by default with resiliency when the autoscaler operator restarts.
- BREAKING CHANGES: Removed some no longer relevant configuration options.
DBPath
MigrationPath
- BREAKING CHANGE: Since no longer built as a
CustomPodAutoscaler
thestartTime
configuration is no longer available: https://custom-pod-autoscaler.readthedocs.io/en/latest/reference/configuration/#starttime. - BREAKING CHANGE: Holt-Winters runtime hooks limited to only support HTTP, shell support dropped.
v0.10.0 - 2022-05-14
- Removed dependency on
jthomperoo/horizontal-pod-autoscaler
in favour ofjthomperoo/k8shorizmetrics
. - Bump
jthomperoo/custom-pod-autoscaler
tov2.6.0
. - Upgrade to Go
v1.17
.
v0.9.0 - 2021-12-28
- Support for
argoproj.io/v1alpha1
Rollout
resource.
- Bump
jthomperoo/custom-pod-autoscaler
tov2.3.0
- Bump
jthomperoo/horizontal-pod-autoscaler
tov0.8.0
v0.8.0 - 2021-08-15
- Updated to Custom Pod Autoscaler
v2.2.0
. - Updated to Horizontal Pod Autoscaler CPA
v0.7.0
.
- Linear regression no longer fails on first run.
v0.7.0 - 2021-04-05
- Holt Winters values can now be fetched at runtime, rather than simply being hardcoded.
- Fixed slow shutdown of PHPA due to ignoring SIGTERM from K8s.
- Switched from Golang to Python for calculating statistical predictions for Linear Regression and Holt-Winters.
- Holt-Winters now calculated using statsmodels, opening up statsmodels configuration options for tuning.
trend
- Eitheradd
/additive
ormul
/multiplicative
, defines the method for the trend element.seasonal
- Eitheradd
/additive
ormul
/multiplicative
, defines the method for the seasonal element.dampedTrend
- Boolean value to determine if the trend should be damped.initializationMethod
- Which initialization method to use, see statsmodels for details, eitherestimated
,heuristic
,known
, orlegacy-heuristic
initialLevel
- The initial level value, required ifinitializationMethod
isknown
.initialTrend
- The initial trend value, required ifinitializationMethod
isknown
.initialSeasonal
- The initial seasonal value, required ifinitializationMethod
isknown
.
- Holt-Winters
seasonLength
variable renamed toseasonalPeriods
. - Holt-Winters
method
split intotrend
andseasonal
variables. - Switched docs theme to material theme.
v0.6.0 - 2020-08-31
- Update Custom Pod Autoscaler version to
v1.0.0
. - Update Horizontal Pod Autoscaler version to
v0.6.0
.
v0.5.0 - 2020-03-27
- Evaluation from HPA now included in list of predicted replica counts, rather than being treated separately at the end. Now included in mean, median, minimum calculations rather than just the maximum calculation.
v0.4.0 - 2020-03-10
- Documentation as code; configuration reference.
- New decision type
median
, returns the median average of the predictions. - JSON support for configuration options.
- Can now configure
tolerance
,initialReadinessDelay
andinitializationPeriod
that are available to be configured in the K8s HPA. - Default
downscaleStabilization
set to300
(5 minutes) to match K8s HPA.
- Metric specs now defined in
predictiveConfig
rather than in their own section. - Update Custom Pod Autoscaler version to v0.11.0.
- Update Horizontal Pod Autoscaler version to v0.5.0.
- Default
interval
set to15000
(15 seconds) to match K8s HPA. - Default
minReplicas
set to1
to match K8s HPA. - Default
maxReplicas
set to10
to match K8s HPA.
v0.3.0 - 2020-02-17
- Multiplicative method for Holt-Winters time series prediction.
- Update Custom Pod Autoscaler version to v0.10.0.
- Update Horizontal Pod Autoscaler version to v0.4.0.
- Holt-Winters no longer additive by default, must specify a method, either
additive
ormultiplicative
in the Holt-Winters configuration.
v0.2.0 - 2019-12-19
- Holt-Winters time series based prediction model.
v0.1.0 - 2019-12-9
- Added the ability to use Linear Regression models to predict future scaling.