Skip to content

FeatureRequest: use InPlacePodVerticalScaling when updating only resources.requests or limits #5693

@odoucet

Description

@odoucet

Describe the bug

Flux does not utilize the InPlacePodVerticalScaling feature gate when the only change to a workload is in resources.requests or resources.limits. Even with the feature gate enabled in Kubernetes, Flux recreates pods instead of resizing them in place as expected.

Steps to reproduce

  1. Enable the InPlacePodVerticalScaling feature gate in the Kubernetes cluster (or just use K8s >= 1.35)
  2. Deploy a workload via Flux.
  3. Modify only the resources.requests or resources.limits settings in the workload.
  4. Observe that Flux do whatever is expected to use subresource=resize and that the pod is not restarted.

Expected behavior

When the InPlacePodVerticalScaling feature gate is enabled and resources are updated without changing other pod fields, Flux should perform an in-place resource resize rather than recreating pods (after checking ResizePolicy)

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

N/A

Flux check

N/A

Git provider

No response

Container Registry provider

No response

Additional context

Related docs: https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/

I'm willing to work on a patch for this, I just need some guidance on warning areas (== painpoints I may miss).

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions