in pkg/nitro_enclaves_cpu_plugin/device_plugin.go [159:171]
func (necdp *NitroEnclavesCPUDevicePlugin) Allocate(ctx context.Context, reqs *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error) {
responses := pluginapi.AllocateResponse{}
for _, req := range reqs.ContainerRequests {
responses.ContainerResponses = append(responses.ContainerResponses, &pluginapi.ContainerAllocateResponse{
Envs: map[string]string{
"NITRO_ENCLAVES_CPUS": strconv.Itoa(len(req.DevicesIDs)),
},
})
}
return &responses, nil
}