CONTENT_TYPE in this case is `kube-api-content-type=application/vnd.kubernetes.protobuf` and it can be removed since
we don’t see a need for setting it differently in the tests.
Signed-off-by: Jiaxin Shan <seedjeffwan@gmail.com>
This patch splits declaration and assignment for local variables where
shellcheck triggers risk of shadowing warnings. Some missing exports
also added, and an unused variable was removed.
Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
We will have two layers of the validation.
- the first part of the validation logic will be implemented under the
`ValidateKubeletConfiguration` method
- the second one that requires knowledge about machine topology and
node allocatable resources will be implemented under the memory manager.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
The new flag will parse the `--reserved-memory` flag straight forward
to the []kubeletconfig.MemoryReservation variable instead of parsing
it to the middle map representation.
It gives us possibility to get rid of a lot of unneeded code and use the single
presentation for the reserved-memory.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
Move the fakeTopologyManagerWithHint and all related methods
from the topology manager package to the memory manager static policy unittests.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
With the memory manager static policy:
- start multiple guaranteed pods and verify that pods succeeded to start
- start workload pod on each NUMA node to load the memory and start the
pod that requested more memory than each NUMA node have, the pod should fail
to start with the admission error, because no single NUMA node has enough
memory to start the pod and also each NUMA node already used for single
NUMA node allocation
The test requires at least two NUMA nodes
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
Provides basic tests e2e to verify that pod succeeds
to start with MemoryManager enabled.
Verifies both MemoryManager policies and when the node has
multiple NUMA nodes it will verify the memory pinning.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
The commit rename state structs and some fields under these structs.
- NodeMap -> NUMANodeMap
- NodeState -> NUMANodeState
- NUMANodeState.Nodes -> NUMANodesState.Cells
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
Calculate the total amount of reserved memory only for NUMA nodes
that are existing under the machine.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>