NVIDIA / k8s-dra-driver

Dynamic Resource Allocation (DRA) for NVIDIA GPUs in Kubernetes
Apache License 2.0
226 stars 41 forks source link

Add status to resourceclaimtemplate #21

Closed asm582 closed 9 months ago

asm582 commented 10 months ago

Resource claim is created and consumed by the pod but it does not have the status or event:

Name:         gpu.example.com
Namespace:    gpu-test1
Labels:       <none>
Annotations:  <none>
API Version:  resource.k8s.io/v1alpha2
Kind:         ResourceClaimTemplate
Metadata:
  Creation Timestamp:  2023-11-16T21:20:04Z
  Resource Version:    29288
  UID:                 13584603-d6ae-4576-a799-919f10d6283e
Spec:
  Metadata:
    Creation Timestamp:  <nil>
  Spec:
    Allocation Mode:      WaitForFirstConsumer
    Resource Class Name:  gpu.example.com
Events:                   <none>

Such a notification would be helpful when user uses Immediate mode.

klueska commented 10 months ago

What event are you expecting to see here?

asm582 commented 10 months ago

Hi @klueska , We would like to have a status of the claim like claim-config-completed with an event that describes a node name.

klueska commented 10 months ago

Yes, I notice there is no Status field in a ResourceClaimTemplate: https://github.com/kubernetes/kubernetes/blob/c28c2009181fcc44c5f6b47e10e62dacf53e4da0/pkg/apis/resource/types.go#L397

You would need to open an issue against kubernetes itself, as ResourceClaimTemplate is an in-tree abstraction (not something specific to our driver).

asm582 commented 9 months ago

Thanks, I created this issue, Hopefully its in the correct place: https://github.com/kubernetes/kubernetes/issues/121987