-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.sig/nodeCategorizes an issue or PR as relevant to SIG Node.Categorizes an issue or PR as relevant to SIG Node.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
What happened?
If InPlacePodVerticalScaling is enabled and only a memory resource request is configured in a pod, the minimum CPU request set internally is displayed in the pod status:
$ kubectl get pod testpod -o jsonpath='spec: {.spec.containers[0].resources}{"\nallocatedResources: "}{.status.containerStatuses[0].allocatedResources}{"\nstatus: "}{.status.containerStatuses[0].resources}{"\n"}'
spec: {"requests":{"memory":"200Mi"}}
allocatedResources: {"memory":"200Mi"}
status: {"requests":{"cpu":"2m","memory":"200Mi"}}
What did you expect to happen?
The minimum CPU request is not displayed in the pod status.
How can we reproduce it (as minimally and precisely as possible)?
-
Enables the
InPlacePodVerticalScalingfeature. -
Create a pod where only memory request is configured:
apiVersion: v1 kind: Pod metadata: labels: run: testpod name: testpod spec: containers: - image: nginx name: testpod resources: requests: memory: 200Mi restartPolicy: Always -
See its resources in the pod status:
$ kubectl get pod testpod -o jsonpath='spec: {.spec.containers[0].resources}{"\nallocatedResources: "}{.status.containerStatuses[0].allocatedResources}{"\nstatus: "}{.status.containerStatuses[0].resources}{"\n"}' spec: {"requests":{"memory":"200Mi"}} allocatedResources: {"memory":"200Mi"} status: {"requests":{"cpu":"2m","memory":"200Mi"}}
Anything else we need to know?
No response
Kubernetes version
$ kubectl version
Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0Cloud provider
N/A
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output hereInstall tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.sig/nodeCategorizes an issue or PR as relevant to SIG Node.Categorizes an issue or PR as relevant to SIG Node.triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Type
Projects
Status
Done
Status
Done