Skip to content

Commit bf70d28

Browse files
authored
Merge pull request kubernetes#128875 from pacoxu/revert-128682-ippr-beta
Revert "[FG:InPlacePodVerticalScaling] Graduate to Beta"
2 parents c9092f6 + 03a15fa commit bf70d28

File tree

8 files changed

+11
-31
lines changed

8 files changed

+11
-31
lines changed

pkg/apis/core/fuzzer/fuzzer.go

-17
Original file line numberDiff line numberDiff line change
@@ -309,23 +309,6 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
309309
c.FuzzNoCustom(ct) // fuzz self without calling this function again
310310
ct.TerminationMessagePath = "/" + ct.TerminationMessagePath // Must be non-empty
311311
ct.TerminationMessagePolicy = "File"
312-
// Match defaulting in pkg/apis/core/v1/defaults.go.
313-
_, hasCPUReq := ct.Resources.Requests[core.ResourceCPU]
314-
_, hasCPULim := ct.Resources.Limits[core.ResourceCPU]
315-
_, hasMemReq := ct.Resources.Requests[core.ResourceMemory]
316-
_, hasMemLim := ct.Resources.Limits[core.ResourceMemory]
317-
if hasCPUReq || hasCPULim {
318-
ct.ResizePolicy = append(ct.ResizePolicy, core.ContainerResizePolicy{
319-
ResourceName: core.ResourceCPU,
320-
RestartPolicy: core.NotRequired,
321-
})
322-
}
323-
if hasMemReq || hasMemLim {
324-
ct.ResizePolicy = append(ct.ResizePolicy, core.ContainerResizePolicy{
325-
ResourceName: core.ResourceMemory,
326-
RestartPolicy: core.NotRequired,
327-
})
328-
}
329312
},
330313
func(ep *core.EphemeralContainer, c fuzz.Continue) {
331314
c.FuzzNoCustom(ep) // fuzz self without calling this function again

pkg/features/versioned_kube_features.go

-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
404404

405405
InPlacePodVerticalScaling: {
406406
{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
407-
{Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.Beta},
408407
},
409408

410409
InPlacePodVerticalScalingAllocatedStatus: {

pkg/kubelet/kuberuntime/kuberuntime_manager_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -1264,11 +1264,6 @@ func verifyActions(t *testing.T, expected, actual *podActions, desc string) {
12641264
actual.ContainersToKill[k] = info
12651265
}
12661266
}
1267-
1268-
if expected.ContainersToUpdate == nil && actual.ContainersToUpdate != nil {
1269-
// No need to distinguish empty and nil maps for the test.
1270-
expected.ContainersToUpdate = map[v1.ResourceName][]containerToUpdateInfo{}
1271-
}
12721267
assert.Equal(t, expected, actual, desc)
12731268
}
12741269

pkg/kubelet/status/status_manager.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ func NewManager(kubeClient clientset.Interface, podManager PodManager, podDeleti
179179
podDeletionSafety: podDeletionSafety,
180180
podStartupLatencyHelper: podStartupLatencyHelper,
181181
stateFileDirectory: stateFileDirectory,
182-
state: state.NewNoopStateCheckpoint(),
183182
}
184183
}
185184

@@ -203,6 +202,9 @@ func isPodStatusByKubeletEqual(oldStatus, status *v1.PodStatus) bool {
203202
}
204203

205204
func (m *manager) Start() {
205+
// Initialize m.state to no-op state checkpoint manager
206+
m.state = state.NewNoopStateCheckpoint()
207+
206208
// Create pod allocation checkpoint manager even if client is nil so as to allow local get/set of AllocatedResources & Resize
207209
if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) {
208210
stateImpl, err := state.NewStateCheckpoint(m.stateFileDirectory, podStatusManagerStateFile)

test/e2e/common/node/pod_resize.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"k8s.io/apimachinery/pkg/api/resource"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727
"k8s.io/apimachinery/pkg/types"
28+
"k8s.io/kubernetes/test/e2e/feature"
2829
"k8s.io/kubernetes/test/e2e/framework"
2930
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
3031
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -1173,7 +1174,7 @@ func doPodResizeErrorTests(f *framework.Framework) {
11731174
// Above tests are performed by doSheduletTests() and doPodResizeResourceQuotaTests()
11741175
// in test/e2e/node/pod_resize.go
11751176

1176-
var _ = SIGDescribe("Pod InPlace Resize Container", framework.WithSerial(), func() {
1177+
var _ = SIGDescribe("Pod InPlace Resize Container", framework.WithSerial(), feature.InPlacePodVerticalScaling, "[NodeAlphaFeature:InPlacePodVerticalScaling]", func() {
11771178
f := framework.NewDefaultFramework("pod-resize-tests")
11781179

11791180
ginkgo.BeforeEach(func(ctx context.Context) {

test/e2e/feature/feature.go

+3
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ var (
186186
// Ingress.networking.k8s.io to be present.
187187
Ingress = framework.WithFeature(framework.ValidFeatures.Add("Ingress"))
188188

189+
// TODO: document the feature (owning SIG, when to use this feature for a test)
190+
InPlacePodVerticalScaling = framework.WithFeature(framework.ValidFeatures.Add("InPlacePodVerticalScaling"))
191+
189192
// Owner: sig-network
190193
// Marks tests that require a cluster with dual-stack pod and service networks.
191194
IPv6DualStack = framework.WithFeature(framework.ValidFeatures.Add("IPv6DualStack"))

test/e2e/node/pod_resize.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2828
"k8s.io/apimachinery/pkg/types"
2929
resourceapi "k8s.io/kubernetes/pkg/api/v1/resource"
30+
"k8s.io/kubernetes/test/e2e/feature"
3031
"k8s.io/kubernetes/test/e2e/framework"
3132
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
3233
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
@@ -355,7 +356,7 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
355356
})
356357
}
357358

358-
var _ = SIGDescribe(framework.WithSerial(), "Pod InPlace Resize Container (scheduler-focused)", func() {
359+
var _ = SIGDescribe(framework.WithSerial(), "Pod InPlace Resize Container (scheduler-focused)", feature.InPlacePodVerticalScaling, func() {
359360
f := framework.NewDefaultFramework("pod-resize-scheduler-tests")
360361
ginkgo.BeforeEach(func(ctx context.Context) {
361362
node, err := e2enode.GetRandomReadySchedulableNode(ctx, f.ClientSet)
@@ -367,7 +368,7 @@ var _ = SIGDescribe(framework.WithSerial(), "Pod InPlace Resize Container (sched
367368
doPodResizeSchedulerTests(f)
368369
})
369370

370-
var _ = SIGDescribe("Pod InPlace Resize Container", func() {
371+
var _ = SIGDescribe("Pod InPlace Resize Container", feature.InPlacePodVerticalScaling, func() {
371372
f := framework.NewDefaultFramework("pod-resize-tests")
372373

373374
ginkgo.BeforeEach(func(ctx context.Context) {

test/featuregates_linter/test_data/versioned_feature_list.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,6 @@
540540
lockToDefault: false
541541
preRelease: Alpha
542542
version: "1.27"
543-
- default: true
544-
lockToDefault: false
545-
preRelease: Beta
546-
version: "1.32"
547543
- name: InPlacePodVerticalScalingAllocatedStatus
548544
versionedSpecs:
549545
- default: false

0 commit comments

Comments
 (0)