Update device plugin to support 4 enclaves per instance #13
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 #
Increase the nitro_enclaves capacity to 4 as per the documentation #9
Problem
AWS supports running up to 4 enclaves per instance. Currently, the device plugin allows only one pod to be scheduled in a k8s worker node/EC2 instance requiring nitro_enclaves host device. This is because, the device plugin server's ListAndWatch endpoint is configured to send the list of Devices as 1, preventing k8s scheduler from scheduling multiple pods requiring nitro_enclaves resource on the same worker node/EC2 instance.
solution
Updating the response for ListAndWatch request with 4, will let the kubelet know the available/allocatable "aws.ec2.nitro/nitro_enclaves" devices in a given k8s worker node.