From f251c9c10e6dd0d0d50b2f974a1c291d6dc75008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Sat, 6 Jun 2020 15:27:49 +0200 Subject: [PATCH] vpa: e2e update vpa --- vertical-pod-autoscaler/e2e/go.mod | 3 +-- vertical-pod-autoscaler/e2e/go.sum | 2 -- .../pkg/apis/autoscaling.k8s.io/v1/types.go | 21 +++++++++++++++++++ .../v1/zz_generated.deepcopy.go | 18 ++++++++++++++-- .../v1beta1/zz_generated.deepcopy.go | 4 ++-- .../v1beta2/zz_generated.deepcopy.go | 4 ++-- .../v1alpha1/zz_generated.deepcopy.go | 4 ++-- .../e2e/vendor/modules.txt | 2 +- 8 files changed, 45 insertions(+), 13 deletions(-) diff --git a/vertical-pod-autoscaler/e2e/go.mod b/vertical-pod-autoscaler/e2e/go.mod index 3b8878c3c6f2..32095be59107 100644 --- a/vertical-pod-autoscaler/e2e/go.mod +++ b/vertical-pod-autoscaler/e2e/go.mod @@ -18,7 +18,6 @@ require ( github.com/onsi/gomega v1.5.0 github.com/prometheus/procfs v0.0.6 // indirect github.com/spf13/pflag v1.0.5 // indirect - golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d // indirect golang.org/x/net v0.0.0-20191112182307-2180aed22343 // indirect golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea // indirect google.golang.org/appengine v1.6.5 // indirect @@ -26,7 +25,7 @@ require ( gopkg.in/yaml.v2 v2.2.5 // indirect k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 - k8s.io/autoscaler/vertical-pod-autoscaler v0.0.0-20200207133143-e7988a6dd041 + k8s.io/autoscaler/vertical-pod-autoscaler v0.0.0-20200605154545-936eea18fb1d k8s.io/client-go v11.0.0+incompatible k8s.io/component-base v0.0.0 k8s.io/klog v1.0.0 diff --git a/vertical-pod-autoscaler/e2e/go.sum b/vertical-pod-autoscaler/e2e/go.sum index b2fe2e0f4219..a91ea6b3d213 100644 --- a/vertical-pod-autoscaler/e2e/go.sum +++ b/vertical-pod-autoscaler/e2e/go.sum @@ -545,8 +545,6 @@ golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 h1:1wopBVtVdWnn03fZelqdXTqk7U7zPQCb+T4rbU9ZEoU= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708 h1:pXVtWnwHkrWD9ru3sDxY/qFK/bfc0egRovX91EjWjf4= -golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d h1:1ZiEyfaQIg3Qh0EoqpwAakHVhecoE5wlSg5GjnafJGw= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= diff --git a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go index f2be65511b87..1b25eff4919b 100644 --- a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go +++ b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go @@ -147,6 +147,16 @@ type ContainerResourcePolicy struct { // for the container. The default is no maximum. // +optional MaxAllowed v1.ResourceList `json:"maxAllowed,omitempty" protobuf:"bytes,4,rep,name=maxAllowed,casttype=ResourceList,castkey=ResourceName"` + + // Specifies the type of recommendations that will be computed + // (and possibly applied) by VPA. + // If not specified, the default of [ResourceCPU, ResourceMemory] will be used. + ControlledResources *[]v1.ResourceName `json:"controlledResources,omitempty" patchStrategy:"merge" protobuf:"bytes,5,rep,name=controlledResources"` + + // Specifies which resource values should be controlled. + // The default is "RequestsAndLimits". + // +optional + ControlledValues *ContainerControlledValues `json:"controlledValues,omitempty" protobuf:"bytes,6,rep,name=controlledValues"` } const ( @@ -166,6 +176,17 @@ const ( ContainerScalingModeOff ContainerScalingMode = "Off" ) +// ContainerControlledValues controls which resource value should be autoscaled. +type ContainerControlledValues string + +const ( + // ContainerControlledValuesRequestsAndLimits means resource request and limits + // are scaled automatically. The limit is scaled proportionally to the request. + ContainerControlledValuesRequestsAndLimits ContainerControlledValues = "RequestsAndLimits" + // ContainerControlledValuesRequestsOnly means only requested resource is autoscaled. + ContainerControlledValuesRequestsOnly ContainerControlledValues = "RequestsOnly" +) + // VerticalPodAutoscalerStatus describes the runtime state of the autoscaler. type VerticalPodAutoscalerStatus struct { // The most recently computed amount of resources recommended by the diff --git a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/zz_generated.deepcopy.go b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/zz_generated.deepcopy.go index b7baaf21e90d..dfd2eadd99f7 100644 --- a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/zz_generated.deepcopy.go +++ b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/zz_generated.deepcopy.go @@ -48,6 +48,20 @@ func (in *ContainerResourcePolicy) DeepCopyInto(out *ContainerResourcePolicy) { (*out)[key] = val.DeepCopy() } } + if in.ControlledResources != nil { + in, out := &in.ControlledResources, &out.ControlledResources + *out = new([]corev1.ResourceName) + if **in != nil { + in, out := *in, *out + *out = make([]corev1.ResourceName, len(*in)) + copy(*out, *in) + } + } + if in.ControlledValues != nil { + in, out := &in.ControlledValues, &out.ControlledValues + *out = new(ContainerControlledValues) + **out = **in + } return } @@ -256,7 +270,7 @@ func (in *VerticalPodAutoscalerCheckpoint) DeepCopyObject() runtime.Object { func (in *VerticalPodAutoscalerCheckpointList) DeepCopyInto(out *VerticalPodAutoscalerCheckpointList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscalerCheckpoint, len(*in)) @@ -343,7 +357,7 @@ func (in *VerticalPodAutoscalerCondition) DeepCopy() *VerticalPodAutoscalerCondi func (in *VerticalPodAutoscalerList) DeepCopyInto(out *VerticalPodAutoscalerList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscaler, len(*in)) diff --git a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta1/zz_generated.deepcopy.go b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta1/zz_generated.deepcopy.go index 17414894a2b2..74a0f94d1be2 100644 --- a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta1/zz_generated.deepcopy.go +++ b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta1/zz_generated.deepcopy.go @@ -256,7 +256,7 @@ func (in *VerticalPodAutoscalerCheckpoint) DeepCopyObject() runtime.Object { func (in *VerticalPodAutoscalerCheckpointList) DeepCopyInto(out *VerticalPodAutoscalerCheckpointList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscalerCheckpoint, len(*in)) @@ -343,7 +343,7 @@ func (in *VerticalPodAutoscalerCondition) DeepCopy() *VerticalPodAutoscalerCondi func (in *VerticalPodAutoscalerList) DeepCopyInto(out *VerticalPodAutoscalerList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscaler, len(*in)) diff --git a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2/zz_generated.deepcopy.go b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2/zz_generated.deepcopy.go index c7f00f124267..255d419bd9e1 100644 --- a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2/zz_generated.deepcopy.go +++ b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2/zz_generated.deepcopy.go @@ -256,7 +256,7 @@ func (in *VerticalPodAutoscalerCheckpoint) DeepCopyObject() runtime.Object { func (in *VerticalPodAutoscalerCheckpointList) DeepCopyInto(out *VerticalPodAutoscalerCheckpointList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscalerCheckpoint, len(*in)) @@ -343,7 +343,7 @@ func (in *VerticalPodAutoscalerCondition) DeepCopy() *VerticalPodAutoscalerCondi func (in *VerticalPodAutoscalerList) DeepCopyInto(out *VerticalPodAutoscalerList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscaler, len(*in)) diff --git a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/poc.autoscaling.k8s.io/v1alpha1/zz_generated.deepcopy.go b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/poc.autoscaling.k8s.io/v1alpha1/zz_generated.deepcopy.go index 01e3f9181f14..f7c2b1640d7c 100644 --- a/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/poc.autoscaling.k8s.io/v1alpha1/zz_generated.deepcopy.go +++ b/vertical-pod-autoscaler/e2e/vendor/k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/poc.autoscaling.k8s.io/v1alpha1/zz_generated.deepcopy.go @@ -249,7 +249,7 @@ func (in *VerticalPodAutoscalerCheckpoint) DeepCopyObject() runtime.Object { func (in *VerticalPodAutoscalerCheckpointList) DeepCopyInto(out *VerticalPodAutoscalerCheckpointList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscalerCheckpoint, len(*in)) @@ -336,7 +336,7 @@ func (in *VerticalPodAutoscalerCondition) DeepCopy() *VerticalPodAutoscalerCondi func (in *VerticalPodAutoscalerList) DeepCopyInto(out *VerticalPodAutoscalerList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]VerticalPodAutoscaler, len(*in)) diff --git a/vertical-pod-autoscaler/e2e/vendor/modules.txt b/vertical-pod-autoscaler/e2e/vendor/modules.txt index 25bf0b9f2235..e0120c502ad2 100644 --- a/vertical-pod-autoscaler/e2e/vendor/modules.txt +++ b/vertical-pod-autoscaler/e2e/vendor/modules.txt @@ -925,7 +925,7 @@ k8s.io/apiserver/pkg/util/webhook k8s.io/apiserver/pkg/util/wsstream k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook -# k8s.io/autoscaler/vertical-pod-autoscaler v0.0.0-20200207133143-e7988a6dd041 => ../ +# k8s.io/autoscaler/vertical-pod-autoscaler v0.0.0-20200605154545-936eea18fb1d => ../ k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1 k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta1 k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1beta2