feat: add support for showing the normalized node allocation based on the higher allocated dimension among CPU and Memory #419
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available: This is actually a feature request, so I haven't created an issue for it before
Description of changes:
Some times, depending how your workloads are structured in terms of resources requests, mostly if the amount of cpu and memory requested do not follow an appropriated ratio, you can end up with a cluster allocation like the one in the following example:
CPU allocation

Memory Allocation

As you can see, the allocation on each dimension (CPU and Memory) is relatively low, and it is hard to tell if Karpenter for instance, is doing a good job on consolidating and choosing the right instance type for bin-packing the workloads.
However, if eks-node-viewer would offer a flag to enable a normalized view of resources, meaning, if when watching for CPU resources, the memory allocation on a given node is higher than the cpu, the viewer would normalize the CPU allocation on the node to match the memory allocation, increasing it to show the node is actually higher allocated on CPU as well, and vice versa.
For the example above, when this logic is applied, you can actually see the cluster is 99.6% allocated, clearly showing that Karpenter is doing a good job and there is pretty much no wasted resources from a normalized point of view.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.