Add HPA status conditions to API types

This commit adds the new API status conditions to the API types.
The field exists as a field in autoscaling/v2alpha1, and is
round-tripped through an annotation in autoscaling/v1.
This commit is contained in:
Solly Ross
2017-05-24 16:53:25 -04:00
parent 0cff839317
commit 26ef38fe89
5 changed files with 166 additions and 2 deletions

View File

@@ -24,6 +24,10 @@ const MetricSpecsAnnotation = "autoscaling.alpha.kubernetes.io/metrics"
// statuses when converting the `CurrentMetrics` field from autoscaling/v2alpha1
const MetricStatusesAnnotation = "autoscaling.alpha.kubernetes.io/current-metrics"
// HorizontalPodAutoscalerConditionsAnnotation is the annotation which holds the conditions
// of an HPA when converting the `Conditions` field from autoscaling/v2alpha1
const HorizontalPodAutoscalerConditionsAnnotation = "autoscaling.alpha.kubernetes.io/conditions"
// DefaultCPUUtilization is the default value for CPU utilization, provided no other
// metrics are present. This is here because it's used by both the v2alpha1 defaulting
// logic, and the pseudo-defaulting done in v1 conversion.