fmt & fix e2e
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
This commit is contained in:
parent
1679398adc
commit
87f8bd6c61
|
|
@ -433,4 +433,4 @@ func waitForResourceRequestInRangeInPods(f *framework.Framework, timeout time.Du
|
||||||
return fmt.Errorf("error waiting for %s request in range of (%v,%v) for pods: %+v", resourceName, lowerBound, upperBound, listOptions)
|
return fmt.Errorf("error waiting for %s request in range of (%v,%v) for pods: %+v", resourceName, lowerBound, upperBound, listOptions)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import (
|
||||||
|
|
||||||
autoscaling "k8s.io/api/autoscaling/v1"
|
autoscaling "k8s.io/api/autoscaling/v1"
|
||||||
apiv1 "k8s.io/api/core/v1"
|
apiv1 "k8s.io/api/core/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/fields"
|
"k8s.io/apimachinery/pkg/fields"
|
||||||
vpa_types "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1"
|
vpa_types "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1"
|
||||||
|
|
@ -446,7 +447,7 @@ var _ = RecommenderE2eDescribe("OOM with custom config", func() {
|
||||||
WithNamespace(f.Namespace.Name).
|
WithNamespace(f.Namespace.Name).
|
||||||
WithTargetRef(targetRef).
|
WithTargetRef(targetRef).
|
||||||
WithContainer(containerName).
|
WithContainer(containerName).
|
||||||
WithOOMBumpUpRatio(2).
|
WithOOMBumpUpRatio(resource.NewQuantity(2, resource.DecimalSI)).
|
||||||
Get()
|
Get()
|
||||||
InstallVPA(f, vpaCRD)
|
InstallVPA(f, vpaCRD)
|
||||||
})
|
})
|
||||||
|
|
@ -465,7 +466,7 @@ var _ = RecommenderE2eDescribe("OOM with custom config", func() {
|
||||||
gomega.Expect(vpa.Status.Recommendation.ContainerRecommendations).Should(gomega.HaveLen(1))
|
gomega.Expect(vpa.Status.Recommendation.ContainerRecommendations).Should(gomega.HaveLen(1))
|
||||||
|
|
||||||
currentMemory := vpa.Status.Recommendation.ContainerRecommendations[0].Target.Memory().Value()
|
currentMemory := vpa.Status.Recommendation.ContainerRecommendations[0].Target.Memory().Value()
|
||||||
oomReplicationControllerRequestLimit := int64(1024 * 1024 * 1024) // from runOomingReplicationController
|
oomReplicationControllerRequestLimit := int64(1024 * 1024 * 1024) // from runOomingReplicationController
|
||||||
defaultBumpMemory := float64(oomReplicationControllerRequestLimit) * 1.2 // DefaultOOMBumpUpRatio
|
defaultBumpMemory := float64(oomReplicationControllerRequestLimit) * 1.2 // DefaultOOMBumpUpRatio
|
||||||
customBumpMemory := float64(oomReplicationControllerRequestLimit) * 2.0 // Custom ratio from VPA config
|
customBumpMemory := float64(oomReplicationControllerRequestLimit) * 2.0 // Custom ratio from VPA config
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ const (
|
||||||
// optimization strategies to be applied to different workloads within the
|
// optimization strategies to be applied to different workloads within the
|
||||||
// same cluster.
|
// same cluster.
|
||||||
PerVPAConfig featuregate.Feature = "PerVPAConfig"
|
PerVPAConfig featuregate.Feature = "PerVPAConfig"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// MutableFeatureGate is a mutable, versioned, global FeatureGate.
|
// MutableFeatureGate is a mutable, versioned, global FeatureGate.
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ var defaultVersionedFeatureGates = map[featuregate.Feature]featuregate.Versioned
|
||||||
InPlaceOrRecreate: {
|
InPlaceOrRecreate: {
|
||||||
{Version: version.MustParse("1.4"), Default: false, PreRelease: featuregate.Alpha},
|
{Version: version.MustParse("1.4"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
},
|
},
|
||||||
PerVPAConfig : {
|
PerVPAConfig: {
|
||||||
{Version: version.MustParse("1.5"), Default: true, PreRelease: featuregate.Alpha},
|
{Version: version.MustParse("1.5"), Default: true, PreRelease: featuregate.Alpha},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue