- The `Allocate` method will try to allocate the memory according to the affinity hints
saved under the `TopologyManager` store. If the store does not have any hints for the memory
it will call `getDefaultHint` to get the default hint. If the affinity does not satisfy
the memory request, it will call `extendTopologyManagerHint` to extend the topology hint to
satisfy the memory request. Once it has the preferred hint, it will allocate the memory and
update the the memory manager state accordingly.
- The `RemoveContainer` will release the allocated memory and update the memory manager state accordingly.
- The `GetTopologyHints` method will try to re-generate topology hints when the container already presents
under the memory manager state. If it does not present it will call `calculateHints` to get topology hints.
The `calculateHints` uses an approach similar to the one used under the CPU manager:
1. If the container memory request can be satisfied by the single NUMA node, it will not allocate the memory from
more than one NUMA node and it will set only single NUMA hints as the preferred one.
It can affect the density, but it gives us guarantees regarding the NUMA alignment.
2. The NUMA node used in the multi NUMA assignment can not be used in the single NUMA assignment.
And the NUMA node used in the single NUMA assignment can not be used in the multi NUMA assignment.
3. Only hints with NUMA node that have enough memory will be returned.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
Reserved memory of all kinds (and over all
NUMA nodes) must be equal to the values determined
by Node Allocatable feature.
Signed-off-by: Cezary Zukowski <c.zukowski@samsung.com>
Pass memory manager flags to the container manager and call all relevant memory manager
methods under the container manager.
Signed-off-by: Byonggon Chun <bg.chun@samsung.com>
Add BracketSeparatedSliceMapStringString to parse config like the below
{numa-node=0,type=memory,limit=1Gi},{numa-node=1,type=memory,limit=1Gi}
Signed-off-by: Byonggon Chun <bg.chun@samsung.com>
The commit includes tests to verify the functionallity:
- to restore state from the file
- to store the state to the file
- to clean the state from old data
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
The checkpoint manager provides a way to save the memory manager
`MemoryTable` both under the memory and under the state file.
Saving the `MemoryTable` under the state file can be useful when kubelet
restarted and you want to restore memory allocations for running containers.
Also, it provides a way to monitor memory allocations done by the memory manager,
and in the future, the state file content can be exposed under the pod metrics.
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
Due to the dockerhub rate limiting, we had to find an alternative solution. We've mirrored the dockerhub
images into our own.
Additionally, our own busybox, httpd, and nginx images also have Windows support.
Pods that are filtered by the plugin should has UID associated, otherwise all those
matching pods will be filtered out, this is the against of the spec of testcases.
Signed-off-by: Dave Chen <dave.chen@arm.com>
Current gcRegistry configuration is responsible for both etcd and pause images. We should
use the upstream pause image in testing.
The etcd image doesn't have Windows support yet, so we need to have a separate configuration
for it.
We've added Windows support to the resource-consumer image and 1.8 tag is already promoted.
We need to bump the VERSION, so we can promote the new image.
Updates kubeadm version resolution to use kubernetes community infra
bucket to fetch appropriate k8s ci versions. The images are already
being pulled from the kubernetes community infra bucket meaning that a
mismatch can occur when the ci version is fetched from the google infra
bucket and the image is not yet present on k8s infra.
Follow-up to kubernetes/kubernetes#97087
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>