Skip to content

DRA KEP 5004: Handle extended resource requests via DRA Driver #3231

Description

@jmdeal

Overview

KEP Graduation Status
5004 GA (1.37)

KEP 5004 enables users to request DRA resources through the extended resource API. A device class is associated with an extended resource (either explicitly or though an implicit device class identifier), enabling pods to request resources matching that device class' constraints.

For example, the following device class definition surfaces GPUs as an extended resource:

apiVersion: resource.k8s.io/v1beta1
kind: DeviceClass
metadata:
  name: gpu.example.com
spec:
  selectors:
  - cel:
      expression: device.driver == 'gpu.example.com' && device.attributes['gpu.example.com'].type
        == 'gpu'
  extendedResourceName: example.com/gpu

Note that the same resource name, in this case example.com/gpu may be surfaced by a non-DRA driver. In this scenario, a pod may schedule via either resource.

Karpenter Integration

While the scheduler does create a ResourceClaim to track allocation metadata for the pod, this claim is not created until the scheduler's pre-bind phase. Since Karpenter reacts to pending pods, we can not rely on plumbing this claim through our scheduler. We'll instead need to create virtual claims for each pod requesting these extended resources.

An additional consideration is when an instance type has offering that advertise both a classic extended resource and DRA resources that can be mapped to an extended resource of the same name. This is a motivating use-case of this feature, as it enables a transition to DRA without requiring application owners to update their resource requests. This poses a challenge for Karpenter's NodeClaim initialization check — we need to model on the NodeClaim that we need one of the two types of resources to be published by the resulting node, but it differs depending on the offering / launch configuration that is chosen by the cloudprovider implementation. We will likely need to extend the NodeClaim interface to model this.

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • Comments asking for updates generate extra noise for issue followers and do not help maintainers prioritize issues. If you think the issue is higher priority than it is labelled, please instead add your user story.
  • If you are interested in working on this issue or have submitted a pull request, please assign yourself

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-prioritytriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions