Skip to content

Commit 65be976

Browse files
authored
Merge pull request #8423 from adrianmoisey/bump-in-place-to-beta
Promote In-Place to Beta
2 parents 1fe2801 + af2bc81 commit 65be976

File tree

10 files changed

+10
-63
lines changed

10 files changed

+10
-63
lines changed

vertical-pod-autoscaler/docs/features.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ To enable this feature, set the `--round-memory-bytes` flag when running the VPA
8282

8383
> [!WARNING]
8484
> FEATURE STATE: VPA v1.4.0 [alpha]
85+
> FEATURE STATE: VPA v1.5.0 [beta]
8586
8687
VPA supports in-place updates to reduce disruption when applying resource recommendations. This feature leverages Kubernetes' in-place update capabilities (which is in beta as of Kubernetes 1.33) to modify container resources without requiring pod recreation.
8788
For more information, see [AEP-4016: Support for in place updates in VPA](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/enhancements/4016-in-place-updates-support)
@@ -151,4 +152,4 @@ VPA provides metrics to track in-place update operations:
151152
* `vpa_in_place_updated_pods_total`: Number of pods successfully updated in-place
152153
* `vpa_vpas_with_in_place_updatable_pods_total`: Number of VPAs with pods eligible for in-place updates
153154
* `vpa_vpas_with_in_place_updated_pods_total`: Number of VPAs with successfully in-place updated pods
154-
* `vpa_updater_failed_in_place_update_attempts_total`: Number of failed attempts to update pods in-place.
155+
* `vpa_updater_failed_in_place_update_attempts_total`: Number of failed attempts to update pods in-place.

vertical-pod-autoscaler/docs/flags.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This document is auto-generated from the flag definitions in the VPA admission-c
1414
| `address` | string | ":8944" | The address to expose Prometheus metrics. |
1515
| `alsologtostderr` | | | log to standard error as well as files (no effect when -logtostderr=true) |
1616
| `client-ca-file` | string | "/etc/tls-certs/caCert.pem" | Path to CA PEM file. |
17-
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (ALPHA - default=false) |
17+
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (BETA - default=true) |
1818
| `ignored-vpa-object-namespaces` | string | | 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. |
1919
| `kube-api-burst` | float | 100 | QPS burst limit when making requests to Kubernetes apiserver |
2020
| `kube-api-qps` | float | 50 | QPS limit when making requests to Kubernetes apiserver |
@@ -68,7 +68,7 @@ This document is auto-generated from the flag definitions in the VPA recommender
6868
| `cpu-integer-post-processor-enabled` | | | Enable the cpu-integer recommendation post processor. The post processor will round up CPU recommendations to a whole CPU for pods which were opted in by setting an appropriate label on VPA object (experimental) |
6969
| `external-metrics-cpu-metric` | string | | ALPHA. Metric to use with external metrics provider for CPU usage. |
7070
| `external-metrics-memory-metric` | string | | ALPHA. Metric to use with external metrics provider for memory usage. |
71-
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (ALPHA - default=false) |
71+
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (BETA - default=true) |
7272
| `history-length` | string | "8d" | How much time back prometheus have to be queried to get historical metrics |
7373
| `history-resolution` | string | "1h" | Resolution at which Prometheus is queried for historical metrics |
7474
| `humanize-memory` | | | DEPRECATED: Convert memory values in recommendations to the highest appropriate SI unit with up to 2 decimal places for better readability. This flag is deprecated and will be removed in a future version. Use --round-memory-bytes instead. |
@@ -144,7 +144,7 @@ This document is auto-generated from the flag definitions in the VPA updater cod
144144
| `eviction-rate-burst` | int | 1 | Burst of pods that can be evicted. |
145145
| `eviction-rate-limit` | float | | Number of pods that can be evicted per seconds. A rate limit set to 0 or -1 will disable<br>the rate limiter. (default -1) |
146146
| `eviction-tolerance` | float | 0.5 | Fraction of replica count that can be evicted for update, if more than one pod can be evicted. |
147-
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (ALPHA - default=false) |
147+
| `feature-gates` | mapStringBool | | A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:<br>AllAlpha=true\|false (ALPHA - default=false)<br>AllBeta=true\|false (BETA - default=false)<br>InPlaceOrRecreate=true\|false (BETA - default=true) |
148148
| `ignored-vpa-object-namespaces` | string | | 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. |
149149
| `in-recommendation-bounds-eviction-lifetime-threshold` | | 12h0m0s | duration Pods that live for at least that long can be evicted even if their request is within the [MinRecommended...MaxRecommended] range |
150150
| `kube-api-burst` | float | 100 | QPS burst limit when making requests to Kubernetes apiserver |

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,10 @@ import (
5252
"github.com/onsi/gomega"
5353
)
5454

55-
var _ = ActuationSuiteE2eDescribe("Actuation", ginkgo.Label("FG:InPlaceOrRecreate"), func() {
55+
var _ = ActuationSuiteE2eDescribe("Actuation", func() {
5656
f := framework.NewDefaultFramework("vertical-pod-autoscaling")
5757
f.NamespacePodSecurityEnforceLevel = podsecurity.LevelBaseline
5858

59-
ginkgo.BeforeEach(func() {
60-
checkInPlaceOrRecreateTestsEnabled(f, true, true)
61-
})
62-
6359
ginkgo.It("still applies recommendations on restart when update mode is InPlaceOrRecreate", func() {
6460
ginkgo.By("Setting up a hamster deployment")
6561
SetupHamsterDeployment(f, "100m", "100Mi", defaultHamsterReplicas)
@@ -283,11 +279,6 @@ var _ = ActuationSuiteE2eDescribe("Actuation", ginkgo.Label("FG:InPlaceOrRecreat
283279
err = WaitForPodsEvicted(f, podList)
284280
gomega.Expect(err).NotTo(gomega.HaveOccurred())
285281
})
286-
})
287-
288-
var _ = ActuationSuiteE2eDescribe("Actuation", func() {
289-
f := framework.NewDefaultFramework("vertical-pod-autoscaling")
290-
f.NamespacePodSecurityEnforceLevel = podsecurity.LevelBaseline
291282

292283
ginkgo.It("stops when pods get pending", func() {
293284

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ var _ = AdmissionControllerE2eDescribe("Admission-controller", ginkgo.Label("FG:
4747
f.NamespacePodSecurityEnforceLevel = podsecurity.LevelBaseline
4848

4949
ginkgo.BeforeEach(func() {
50-
checkInPlaceOrRecreateTestsEnabled(f, true, false)
5150
waitForVpaWebhookRegistration(f)
5251
})
5352

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import (
3737
"k8s.io/apimachinery/pkg/util/wait"
3838
vpa_types "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1"
3939
vpa_clientset "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/client/clientset/versioned"
40-
"k8s.io/autoscaler/vertical-pod-autoscaler/pkg/features"
4140
clientset "k8s.io/client-go/kubernetes"
4241
"k8s.io/kubernetes/test/e2e/framework"
4342
framework_deployment "k8s.io/kubernetes/test/e2e/framework/deployment"
@@ -613,39 +612,6 @@ func WaitForPodsUpdatedWithoutEviction(f *framework.Framework, initialPods *apiv
613612
return err
614613
}
615614

616-
// checkInPlaceOrRecreateTestsEnabled check for enabled feature gates in the cluster used for the
617-
// InPlaceOrRecreate VPA feature.
618-
// Use this in a "beforeEach" call before any suites that use InPlaceOrRecreate featuregate.
619-
func checkInPlaceOrRecreateTestsEnabled(f *framework.Framework, checkAdmission, checkUpdater bool) {
620-
ginkgo.By("Checking InPlacePodVerticalScaling cluster feature gate is on")
621-
622-
if checkUpdater {
623-
ginkgo.By("Checking InPlaceOrRecreate VPA feature gate is enabled for updater")
624-
625-
deploy, err := f.ClientSet.AppsV1().Deployments(VpaNamespace).Get(context.TODO(), "vpa-updater", metav1.GetOptions{})
626-
gomega.Expect(err).NotTo(gomega.HaveOccurred())
627-
gomega.Expect(deploy.Spec.Template.Spec.Containers).To(gomega.HaveLen(1))
628-
vpaUpdaterPod := deploy.Spec.Template.Spec.Containers[0]
629-
gomega.Expect(vpaUpdaterPod.Name).To(gomega.Equal("updater"))
630-
if !anyContainsSubstring(vpaUpdaterPod.Args, fmt.Sprintf("%s=true", string(features.InPlaceOrRecreate))) {
631-
ginkgo.Skip("Skipping suite: InPlaceOrRecreate feature gate is not enabled for the VPA updater")
632-
}
633-
}
634-
635-
if checkAdmission {
636-
ginkgo.By("Checking InPlaceOrRecreate VPA feature gate is enabled for admission controller")
637-
638-
deploy, err := f.ClientSet.AppsV1().Deployments(VpaNamespace).Get(context.TODO(), "vpa-admission-controller", metav1.GetOptions{})
639-
gomega.Expect(err).NotTo(gomega.HaveOccurred())
640-
gomega.Expect(deploy.Spec.Template.Spec.Containers).To(gomega.HaveLen(1))
641-
vpaAdmissionPod := deploy.Spec.Template.Spec.Containers[0]
642-
gomega.Expect(vpaAdmissionPod.Name).To(gomega.Equal("admission-controller"))
643-
if !anyContainsSubstring(vpaAdmissionPod.Args, fmt.Sprintf("%s=true", string(features.InPlaceOrRecreate))) {
644-
ginkgo.Skip("Skipping suite: InPlaceOrRecreate feature gate is not enabled for VPA admission controller")
645-
}
646-
}
647-
}
648-
649615
func anyContainsSubstring(arr []string, substr string) bool {
650616
for _, s := range arr {
651617
if strings.Contains(s, substr) {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ var _ = FullVpaE2eDescribe("Pods under VPA", func() {
6363

6464
ginkgo.Describe("with InPlaceOrRecreate update mode", ginkgo.Label("FG:InPlaceOrRecreate"), func() {
6565
ginkgo.BeforeEach(func() {
66-
checkInPlaceOrRecreateTestsEnabled(f, true, false)
67-
6866
ns := f.Namespace.Name
6967
ginkgo.By("Setting up a hamster deployment")
7068
rc = NewDynamicResourceConsumer("hamster", ns, KindDeployment,

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,6 @@ var _ = UpdaterE2eDescribe("Updater", func() {
138138
ginkgo.By(fmt.Sprintf("Waiting for pods to be evicted, hoping it won't happen, sleep for %s", VpaEvictionTimeout.String()))
139139
CheckNoPodsEvicted(f, MakePodSet(podList))
140140
})
141-
})
142-
143-
var _ = UpdaterE2eDescribe("Updater", ginkgo.Label("FG:InPlaceOrRecreate"), func() {
144-
f := framework.NewDefaultFramework("vertical-pod-autoscaling")
145-
f.NamespacePodSecurityEnforceLevel = podsecurity.LevelBaseline
146-
147-
ginkgo.BeforeEach(func() {
148-
checkInPlaceOrRecreateTestsEnabled(f, false, true)
149-
})
150141

151142
ginkgo.It("In-place update pods when Admission Controller status available", func() {
152143
const statusUpdateInterval = 10 * time.Second

vertical-pod-autoscaler/pkg/admission-controller/resource/vpa/handler_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,7 @@ func TestValidateVPA(t *testing.T) {
322322
}
323323
for _, tc := range tests {
324324
t.Run(fmt.Sprintf("test case: %s", tc.name), func(t *testing.T) {
325-
if !tc.inPlaceOrRecreateFeatureGateDisabled {
326-
featuregatetesting.SetFeatureGateDuringTest(t, features.MutableFeatureGate, features.InPlaceOrRecreate, true)
327-
}
325+
featuregatetesting.SetFeatureGateDuringTest(t, features.MutableFeatureGate, features.InPlaceOrRecreate, !tc.inPlaceOrRecreateFeatureGateDisabled)
328326
err := ValidateVPA(&tc.vpa, tc.isCreate)
329327
if tc.expectError == nil {
330328
assert.NoError(t, err)

vertical-pod-autoscaler/pkg/features/features.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const (
4141
// The feature must be enabled by the --feature-gates argument on each listed component.
4242

4343
// alpha: v1.4.0
44+
// beta: v1.5.0
45+
4446
// components: admission-controller, updater
4547

4648
// InPlaceOrRecreate enables the InPlaceOrRecreate update mode to be used.

vertical-pod-autoscaler/pkg/features/versioned_features.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ import (
2929
var defaultVersionedFeatureGates = map[featuregate.Feature]featuregate.VersionedSpecs{
3030
InPlaceOrRecreate: {
3131
{Version: version.MustParse("1.4"), Default: false, PreRelease: featuregate.Alpha},
32+
{Version: version.MustParse("1.5"), Default: true, PreRelease: featuregate.Beta},
3233
},
3334
}

0 commit comments

Comments
 (0)