Update to CPA 0.11.0 to add downscale stabilization
Closed this issue · 0 comments
jthomperoo commented
Update to CPA v0.11.0
, requires updating CPA-HPA.
Depends on jthomperoo/horizontal-pod-autoscaler#14
[v0.11.0] - 2020-02-28
Added
- Series of hooks for injecting user logic throughout the execution process.
preMetric
- Runs before metric gathering, given metric gathering input.postMetric
- Runs after metric gathering, given metric gathering input and result.preEvaluate
- Runs before evaluation, given evaluation input.postEvaluate
- Runs after evaluation, given evaluation input and result.preScale
- Runs before scaling decision, given min and max replicas, current replicas, target replicas, and resource being scaled.postScale
- Runs before scaling decision, given min and max replicas, current replicas, target replicas, and resource being scaled.
- New
downscaleStabilization
option, based on the Horizontal Pod Autoscaler downscale stabilization, operates by taking the maximum target replica count over the stabilization window.
Changed
- Metrics from API now returns the entire resource definition as JSON rather than just the resource name.
- Changed JSON generated to be in
camelCase
rather thansnake_case
for consistency with the Kubernetes API.- Evaluation now uses
targetReplicas
overtarget_replicas
. - ResourceMetric now uses
runType
overrun_type
. - Scale hook now provided with
minReplicas
,maxReplicas
,currentReplicas
andtargetReplicas
rather than their snakecase equivalents.
- Evaluation now uses
- Metric gathering and hooks have access to
dryRun
field, allowing them to determine if they are called as part of a dry run. - Standardised input to metric gatherer, evaluator and scaler to take specs rather than lists of parameters, allowing easier serialisation for hooks.
- Endpoint
/api/v1/metrics
now accepts the optionaldry_run
parameter for marking metric gathering as in dry run mode. ResourceMetrics
replaced with a list ofMetric
and aResource
./api/v1/metrics
now simply returns a list ofMetrics
rather than aResourceMetrics
.
Removed
ResourceMetrics
struct removed as it was redundant.