Closed cl-rf closed 1 year ago
It looks like this is when deployments are used instead of just a single pod definition.
ping @PiotrProkop @ffromani
@cl-rf did pod(s) from your deployment get scheduled on the node you're looking at?
Hi, the meaning of the fields (we should probably annotate [more] the CRD spec) is
Thus "allocatable" should never change if the machine/cluster config doesn't change first, which is an event we expect to happen rarely. "available" should instead change depending on the workload running. And it seems to me in the above example it is changing?
HTH,
It is only 1 node. If I set the requirements for both cpu and memory, it seems like it reports fine vs just setting a cpu requirement.
Working
resources:
limits:
cpu: 20
memory: "256M"
requests:
cpu: 20
memory: "256M"
vs
resources:
limits:
cpu: 20
requests:
cpu: 20
noderesourcetopology.topology.node.k8s.io reports correctly with 20 less available.
- costs:
- name: node-0
value: 10
- name: node-1
value: 21
name: node-0
resources:
- allocatable: "36"
available: "16"
capacity: "36"
name: cpu
Yes, the accouting is done only for exclusively-assigned resources (CPUs in this case), which is possible only for guaranteed QoS pods. This may be surprising but is due to how kubernetes works, we can't do it differently. There's something else not working as expected? because it seems to me this part could be documented perhaps better, but seems to work as intended.
Yeah, I guess a note on the documentation would help.
fair enough, I'll review the docs and perhaps post a PR to clarify further in the coming days
What happened: Deploying a pod with a cpu request/limit does not change the allocatable value for the noderesourcetopology.
What you expected to happen: I expect the value to decrease based on the request/limit of the pod.
How to reproduce it (as minimally and precisely as possible):
kubectl get noderesourcetopology.topology.node.k8s.io -o yaml
Deploy a test.
The available and allocatable does not decrease.
Anything else we need to know?:
Environment:
Kubernetes version (use
kubectl version
):Cloud provider or hardware configuration:
EC2 - c5n.metal
OS (e.g:
cat /etc/os-release
):Red Hat Enterprise Linux release 9.1 (Plow)
Kernel (e.g.
uname -a
):Linux ip-1.1.1.1-west-1.compute.internal 5.14.0-162.6.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 30 07:36:03 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux