jthomperoo/predictive-horizontal-pod-autoscaler

Update to CPA 0.11.0 to add downscale stabilization

Closed this issue · 0 comments

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 than snake_case for consistency with the Kubernetes API.
    • Evaluation now uses targetReplicas over target_replicas.
    • ResourceMetric now uses runType over run_type.
    • Scale hook now provided with minReplicas, maxReplicas, currentReplicas and targetReplicas rather than their snakecase equivalents.
  • 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 optional dry_run parameter for marking metric gathering as in dry run mode.
  • ResourceMetrics replaced with a list of Metric and a Resource.
  • /api/v1/metrics now simply returns a list of Metrics rather than a ResourceMetrics.

Removed

  • ResourceMetrics struct removed as it was redundant.