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:
@@ -22,6 +22,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
v2beta2 "k8s.io/api/autoscaling/v2beta2"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
@@ -313,6 +314,18 @@ func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ExecutionStrategy) DeepCopyInto(out *ExecutionStrategy) {
|
||||
*out = *in
|
||||
if in.Metrics != nil {
|
||||
in, out := &in.Metrics, &out.Metrics
|
||||
*out = make([]v2beta2.MetricSpec, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Behavior != nil {
|
||||
in, out := &in.Behavior, &out.Behavior
|
||||
*out = new(v2beta2.HorizontalPodAutoscalerBehavior)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -442,7 +455,7 @@ func (in *FunctionSpec) DeepCopyInto(out *FunctionSpec) {
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.Resources.DeepCopyInto(&out.Resources)
|
||||
out.InvokeStrategy = in.InvokeStrategy
|
||||
in.InvokeStrategy.DeepCopyInto(&out.InvokeStrategy)
|
||||
if in.IdleTimeout != nil {
|
||||
in, out := &in.IdleTimeout, &out.IdleTimeout
|
||||
*out = new(int)
|
||||
@@ -580,7 +593,7 @@ func (in *IngressConfig) DeepCopy() *IngressConfig {
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *InvokeStrategy) DeepCopyInto(out *InvokeStrategy) {
|
||||
*out = *in
|
||||
out.ExecutionStrategy = in.ExecutionStrategy
|
||||
in.ExecutionStrategy.DeepCopyInto(&out.ExecutionStrategy)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user