Skip to content

Commit

Permalink
Merge pull request kubernetes#128875 from pacoxu/revert-128682-ippr-beta
Browse files Browse the repository at this point in the history
Revert "[FG:InPlacePodVerticalScaling] Graduate to Beta"
  • Loading branch information
k8s-ci-robot authored Nov 20, 2024
2 parents c9092f6 + 03a15fa commit bf70d28
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 31 deletions.
17 changes: 0 additions & 17 deletions pkg/apis/core/fuzzer/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,23 +309,6 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
c.FuzzNoCustom(ct) // fuzz self without calling this function again
ct.TerminationMessagePath = "/" + ct.TerminationMessagePath // Must be non-empty
ct.TerminationMessagePolicy = "File"
// Match defaulting in pkg/apis/core/v1/defaults.go.
_, hasCPUReq := ct.Resources.Requests[core.ResourceCPU]
_, hasCPULim := ct.Resources.Limits[core.ResourceCPU]
_, hasMemReq := ct.Resources.Requests[core.ResourceMemory]
_, hasMemLim := ct.Resources.Limits[core.ResourceMemory]
if hasCPUReq || hasCPULim {
ct.ResizePolicy = append(ct.ResizePolicy, core.ContainerResizePolicy{
ResourceName: core.ResourceCPU,
RestartPolicy: core.NotRequired,
})
}
if hasMemReq || hasMemLim {
ct.ResizePolicy = append(ct.ResizePolicy, core.ContainerResizePolicy{
ResourceName: core.ResourceMemory,
RestartPolicy: core.NotRequired,
})
}
},
func(ep *core.EphemeralContainer, c fuzz.Continue) {
c.FuzzNoCustom(ep) // fuzz self without calling this function again
Expand Down
1 change: 0 additions & 1 deletion pkg/features/versioned_kube_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate

InPlacePodVerticalScaling: {
{Version: version.MustParse("1.27"), Default: false, PreRelease: featuregate.Alpha},
{Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.Beta},
},

InPlacePodVerticalScalingAllocatedStatus: {
Expand Down
5 changes: 0 additions & 5 deletions pkg/kubelet/kuberuntime/kuberuntime_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1264,11 +1264,6 @@ func verifyActions(t *testing.T, expected, actual *podActions, desc string) {
actual.ContainersToKill[k] = info
}
}

if expected.ContainersToUpdate == nil && actual.ContainersToUpdate != nil {
// No need to distinguish empty and nil maps for the test.
expected.ContainersToUpdate = map[v1.ResourceName][]containerToUpdateInfo{}
}
assert.Equal(t, expected, actual, desc)
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/kubelet/status/status_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ func NewManager(kubeClient clientset.Interface, podManager PodManager, podDeleti
podDeletionSafety: podDeletionSafety,
podStartupLatencyHelper: podStartupLatencyHelper,
stateFileDirectory: stateFileDirectory,
state: state.NewNoopStateCheckpoint(),
}
}

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

func (m *manager) Start() {
// Initialize m.state to no-op state checkpoint manager
m.state = state.NewNoopStateCheckpoint()

// Create pod allocation checkpoint manager even if client is nil so as to allow local get/set of AllocatedResources & Resize
if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) {
stateImpl, err := state.NewStateCheckpoint(m.stateFileDirectory, podStatusManagerStateFile)
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/common/node/pod_resize.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
Expand Down Expand Up @@ -1173,7 +1174,7 @@ func doPodResizeErrorTests(f *framework.Framework) {
// Above tests are performed by doSheduletTests() and doPodResizeResourceQuotaTests()
// in test/e2e/node/pod_resize.go

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

ginkgo.BeforeEach(func(ctx context.Context) {
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ var (
// Ingress.networking.k8s.io to be present.
Ingress = framework.WithFeature(framework.ValidFeatures.Add("Ingress"))

// TODO: document the feature (owning SIG, when to use this feature for a test)
InPlacePodVerticalScaling = framework.WithFeature(framework.ValidFeatures.Add("InPlacePodVerticalScaling"))

// Owner: sig-network
// Marks tests that require a cluster with dual-stack pod and service networks.
IPv6DualStack = framework.WithFeature(framework.ValidFeatures.Add("IPv6DualStack"))
Expand Down
5 changes: 3 additions & 2 deletions test/e2e/node/pod_resize.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
resourceapi "k8s.io/kubernetes/pkg/api/v1/resource"
"k8s.io/kubernetes/test/e2e/feature"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
Expand Down Expand Up @@ -355,7 +356,7 @@ func doPodResizeSchedulerTests(f *framework.Framework) {
})
}

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

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

ginkgo.BeforeEach(func(ctx context.Context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,6 @@
lockToDefault: false
preRelease: Alpha
version: "1.27"
- default: true
lockToDefault: false
preRelease: Beta
version: "1.32"
- name: InPlacePodVerticalScalingAllocatedStatus
versionedSpecs:
- default: false
Expand Down

0 comments on commit bf70d28

Please sign in to comment.