Skip to content

non-sidecar init containers should create one device request for the max quantity per DRA extended resource #134880

@yliaog

Description

@yliaog

What would you like to be added?

non-sidecar init containers are run serially, sidecar init containers are running forever, hence we need to allow multiple device requests per container per resource, instead of, one device requet per container per DRA extended resource, to implement the formula given in https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/753-sidecar-containers#resources-calculation-for-scheduling-and-pod-admission

In the following example, there should be just one device reuqest for example.com/gpu: 2, instead of, two device requests, one for ic1, example.com/gpu: 1, and another for ic2, example.com/gpu: 2

initContainers:

  • name: ic1
    resources: {example.com/gpu: 1} // before=0, during=1, after=0
  • name: sidecar
    resources: {example.com/gpu: 1} // before=0, during=1, stays running so after=1
    restartPolicy: Always
  • name: ic2
    resources: {example.com/gpu: 2} // before=1, during=3, after=1
    // once all initContainers are complete and all sidecars are running, before running any containers, we're using 1 gpu
    containers:
  • name: c1
    resources: {example.com/gpu: 1}
    // sum of containers is 1
    // sum of containers and sidecars is 2
    // max(sum of containers and sidecars, high-water mark during initContainer run) is 3

Why is this needed?

avoid wasting the costly DRA devices, currently, each init container (non sidecar) would request the devices separately, even though they are run serially

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.wg/device-managementCategorizes an issue or PR as relevant to WG Device Management.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions