Commit Graph

182 Commits

Author SHA1 Message Date
Marco Voelz 6380df01d8 Fix import ordering 2023-09-22 14:32:04 +02:00
Marco Voelz 2fc880b09f Inline SetupVPA 2023-09-22 14:32:04 +02:00
Marco Voelz 5cf09fbd73 Inline SetupVPAFor2Containers 2023-09-22 14:32:04 +02:00
Marco Voelz e0a9b5a1f3 Adapt e2e tests to use new helper functions with builders 2023-09-22 14:32:04 +02:00
Marco Voelz a8dc1e4b94 Run `go mod tidy` and `go mod vendor` 2023-09-22 14:32:03 +02:00
Marco Voelz 1c6e8e82a5 Use Builders to create VPAs in updater e2e tests 2023-09-22 14:32:03 +02:00
Marco Voelz 34343c8257 Update vertical-pod-autoscaler/e2e/v1/updater.go
Co-authored-by: Joachim <jbartosik@google.com>
2023-09-22 14:30:07 +02:00
Marco Voelz 456e60169c Update vertical-pod-autoscaler/e2e/v1/updater.go
Co-authored-by: Joachim <jbartosik@google.com>
2023-09-22 14:30:07 +02:00
Marco Voelz 59a2969409 Add updater e2e test for EvictionRequirements 2023-09-22 14:30:07 +02:00
Marco Voelz 50b7606d67 Run `go mod vendor` to get API changes into e2e tests 2023-09-22 14:30:07 +02:00
xiaoqing 1f342ffcf6 Add subresource status for vpa
Add status field in subresource on crd yaml and add new ClusterRole system:vpa-actor to patch /status subresource.
The `metadata.generation` only increase on vpa spec update.
Fix e2e test for patch and create vpa
2023-07-03 11:09:00 +08:00
Kevin Wiesmueller 76a7d21079 update agnhost image to pull from registry.k8s.io 2023-06-27 18:42:49 +00:00
Karol Golab 4c4ff67d61 Fix the setup for allow containers to fail (they should be OOM-killed) 2023-03-27 15:47:17 +02:00
Karol Golab 20420986a4 Make the "OOMing pods under VPA" test more robust. 2023-03-27 11:52:28 +02:00
Kushagra 5bbf9ec57b fix tests due to vendor upgrade 2023-02-27 16:30:27 +00:00
Kushagra 346f553e1e upgrade vpa and vpa-e2e vendor to 1.26 2023-02-27 16:29:13 +00:00
salasberryfin 773a3716b4 revert changes in /vendor specific files 2023-02-14 08:15:16 +01:00
salasberryfin 66e1eeb7c6 update image references from k8s.gcr.io to registry.k8s.io 2023-02-14 08:15:16 +01:00
Marco Voelz 25106e94d0 Increase timeout for OOMKill test 2022-11-23 15:33:45 +01:00
Marco Voelz 4e8fa6083b Stop filtering aggregatedContainerStates without samples 2022-11-23 15:16:50 +01:00
Marco Voelz 2233a87da0 Adapt e2e OOM test to CrashLoopBackOff scenario 2022-11-21 16:27:08 +01:00
Joachim Bartosik 5500a15d9b Fix accessing index out of bonds
The function should match containers to their recommendations directly instead
of hoping thier order will match,

See [this comment](https://github.com/kubernetes/autoscaler/issues/3966#issuecomment-1262159504)
2022-10-06 20:47:38 +02:00
Joachim Bartosik ab755762aa Add VPA E2E for recomemndation not exaclty matching pod with limit range
Containers in recommendation can be different from recommendations in pod:

- A new container can be added to a pod. At first there will be no
  recommendation for the container
- A container can be removed from pod. For some time recommendation will contain
  recommendation for the old container
- Container can be renamed. Then there will be recommendation for container
  under its old name.

Add tests for what VPA does in those situations, when limit range exists.
2022-10-04 16:37:22 +02:00
Joachim Bartosik 0973954d80 Add VPA E2E for recomemndation not exaclty matching pod
Containers in recommendation can be different from recommendations in pod:

- A new container can be added to a pod. At first there will be no
  recommendation for the container
- A container can be removed from pod. For some time recommendation will contain
  recommendation for the old container
- Container can be renamed. Then there will be recommendation for container
  under its old name.

Add tests for what VPA does in those situations.
2022-10-04 16:36:51 +02:00
Joachim Bartosik 3f7ef8eca4 Switch VPA e2e to K8s 1.25, go 1.19, and ginkgo v2 2022-08-30 18:13:03 +02:00
Joachim Bartosik b16ab89c3c Allow privilidged pods in VPA E2E
We allowed them before (it was default) but now we need to allow it explicitly:

https://groups.google.com/a/kubernetes.io/g/dev/c/BZlDyz9FK1U/m/57PgQlA4BgAJ

Long term I want to run pods without privilidge but it requeres:

- https://github.com/kubernetes/kubernetes/pull/110779 to merge
- Syncing e2e dependencies to include the merged change
- Changing tests to run pods without privilidges

To keep tests passing through removal of PodSecurityPolicy for 1.25 I want to
merge this change first and reduce pod privilidges later
2022-07-19 13:22:37 +02:00
Joachim Bartosik f22b40eab8 Update K8s dependencies of VPA E2E tests 2022-07-19 13:22:32 +02:00
Joachim Bartosik d4fa6f5bcf Switch to using policy v1 API
v1beta1 is deprecated in 1.25
2022-05-17 11:27:10 +02:00
Joachim Bartosik 7f20ae22ec Move CronJob to v1 in e2e
So e2e will work with K8s 1.25
2022-05-13 15:17:39 +02:00
Joachim Bartosik 42b0482707 Make e2e vendor update work
- Change default K8s to 1.23.5
- Change go to 1.17 (json dependency doesn't compile with 1.16 anymore)
- Drop references to bindata
- Update some calls
2022-03-28 09:10:21 +02:00
Joachim Bartosik 3fdfc56d76 Update VPA and VPA e2e vendor 2022-03-28 09:10:06 +02:00
Karol Gołąb 273e35b88c Introduce per-VPA minReplicas to allow overriding global setting. 2022-01-18 11:41:42 +01:00
Joachim Bartosik ad2b745e8d Remove file for building stress image
Since tests don't use it anymore we don't need it.
2021-12-22 12:17:41 +01:00
Joachim Bartosik f4d804b65e Use command to pass flags In VPA E2E OOM tests
Use `gcr.io/google-containers/stress:v1` and use `Command` to pass flags
to the command. Before we used `gcr.io/jbartosik-gke-dev/stress:0.10`
image which baked in flags in the image.
2021-12-22 12:12:41 +01:00
Min Wang 340336e8d5
Update the klog version to v2 in e2e 2021-12-17 13:10:28 -08:00
Joachim Bartosik 6d7302ebd8 Increase upper bound for expected VPA CPU recommendations
Tests are flaky with VPA sometimes generating recommendations higher
than 1000 mCPU.

I think this is a reasonable behavior - we're asking resoirce consumer
to use 1800 mCPU between 3 pods, if it gets unevenly distributed we can
end up with some pods using 1000 mCPU.
2021-11-16 13:47:51 +01:00
Chen-Wang1 c4bd38b17a Added changes to support alternative recommender 2021-11-15 16:08:59 -05:00
Joachim Bartosik 87b262b743 Update vpa e2e vendor 2021-09-06 22:53:41 +02:00
Joachim Bartosik 136eaa9340 Update vpa e2e go/mod and go.sum 2021-09-06 22:53:40 +02:00
Joachim Bartosik a6bb213ca9 Update VPA e2e dependencies so they will work with 1.20 K8s
1. IsRetryableAPIError is no longer needed, stop using it
https://github.com/kubernetes/kubernetes/pull/95495
2. LogClusterImageSources is now private, stop using it
https://github.com/kubernetes/kubernetes/pull/89676
3. DeleteResourceAndWaitForGC was moved
4. k8s.io/kubernetes/test/e2e/manifest was moved
2021-09-06 22:53:15 +02:00
Krzysztof Siedlecki c0a9c6d04c Changing injection test webhook API from V1Beta1 to V1 2021-06-08 15:32:07 +02:00
Joachim Bartosik 79ed69e3dd Make output of recommender tests easier to read 2020-09-03 15:56:06 +02:00
Beata Lach (Skiba) 92bddcd8b8 VPA v1beta2 tests use v1beta2 client 2020-07-30 19:00:06 +02:00
Krzysztof Siedlecki d4a17550ca adding altName to e2e webhook cert 2020-07-30 13:35:08 +02:00
Beata Lach (Skiba) 99f1df5b2e Fix for VPA e2e vendor update 2020-07-23 11:22:03 +02:00
Beata Lach (Skiba) 3edbe0c708 Fixes needed after e2e deps update 2020-07-21 16:32:08 +02:00
Beata Lach (Skiba) 428ddcc7df Update VPA e2e k8s dependencies to 1.18.3 2020-07-21 16:31:49 +02:00
Johannes Würbach 727dab656e
vpa: container controlled values e2e 2020-07-05 15:36:15 +02:00
Johannes Würbach f251c9c10e
vpa: e2e update vpa 2020-07-05 15:36:14 +02:00
Krzysztof Siedlecki 9fc65512bd full vpa e2e - bumping up cpu request tolerance 2020-06-30 12:01:34 +02:00