Add support for custom metrics for HPA (#2423)
* Add support for custom metrics for HPA * Cleanup TargetCPUPercent references from possible places * HPA v2beta has 80% default cpu limit if not set Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ sleep 5
|
||||
func=function
|
||||
actualMinScale=$(kubectl -n default get $func $fn -ojsonpath='{.spec.InvokeStrategy.ExecutionStrategy.MinScale}')
|
||||
actualMaxScale=$(kubectl -n default get $func $fn -ojsonpath='{.spec.InvokeStrategy.ExecutionStrategy.MaxScale}')
|
||||
actualTargetCPU=$(kubectl -n default get $func $fn -ojsonpath='{.spec.InvokeStrategy.ExecutionStrategy.TargetCPUPercent}')
|
||||
actualTargetCPU=$(kubectl -n default get $func $fn -ojsonpath='{.spec.InvokeStrategy.ExecutionStrategy.hpaMetrics[0].target.averageUtilization}')
|
||||
|
||||
if [ "$actualMinScale" -ne "$targetMinScale" ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user