Skip to content

Commit 2b47412

Browse files
committed
VPA: add InPlaceVerticalScaling feature gate to admission-controller
Adds logic to vpa admission webhook to deny requests creating VPAs with InPlaceOrRecreate update mode without enabling feature gate. Also adds admission e2e logic to wait for the vpa-webhook to be registered before starting the test. Signed-off-by: Max Cao <[email protected]>
1 parent b8648eb commit 2b47412

File tree

12 files changed

+984
-905
lines changed

12 files changed

+984
-905
lines changed

vertical-pod-autoscaler/deploy/admission-controller-deployment.yaml

-12
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,3 @@ spec:
4747
- name: tls-certs
4848
secret:
4949
secretName: vpa-tls-certs
50-
---
51-
apiVersion: v1
52-
kind: Service
53-
metadata:
54-
name: vpa-webhook
55-
namespace: kube-system
56-
spec:
57-
ports:
58-
- port: 443
59-
targetPort: 8000
60-
selector:
61-
app: vpa-admission-controller
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: vpa-webhook
5+
namespace: kube-system
6+
spec:
7+
ports:
8+
- port: 443
9+
targetPort: 8000
10+
selector:
11+
app: vpa-admission-controller

vertical-pod-autoscaler/docs/flags.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This document is auto-generated from the flag definitions in the VPA admission-c
1212
| `--address` | ":8944" | The address to expose Prometheus metrics. |
1313
| `--alsologtostderr` | | log to standard error as well as files (no effect when -logtostderr=true) |
1414
| `--client-ca-file` | "/etc/tls-certs/caCert.pem" | Path to CA PEM file. |
15+
| `--feature-gates` | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are: |
1516
| `--ignored-vpa-object-namespaces` | | A comma-separated list of namespaces to ignore when searching for VPA objects. Leave empty to avoid ignoring any namespaces. These namespaces will not be cleaned by the garbage collector. |
1617
| `--kube-api-burst` | 10 | QPS burst limit when making requests to Kubernetes apiserver |
1718
| `--kube-api-qps` | 5 | QPS limit when making requests to Kubernetes apiserver |

vertical-pod-autoscaler/e2e/v1/actuation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ var _ = ActuationSuiteE2eDescribe("InPlaceVerticalScaling", func() {
521521
f.NamespacePodSecurityEnforceLevel = podsecurity.LevelBaseline
522522

523523
ginkgo.BeforeEach(func() {
524-
checkInPlaceVerticalScalingTestsEnabled(f)
524+
checkInPlaceVerticalScalingTestsEnabled(f, true, true)
525525
})
526526

527527
ginkgo.It("still applies recommendations on restart when update mode is InPlaceOrRecreate", func() {

0 commit comments

Comments
 (0)