Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ needs a new checkpoint API version (with conversion), not just a new release.

## [Unreleased]

### Added

- `api/checkpoint/v1`: the state of the NVIDIA GPU and ComputeDomain kubelet
plugins of dra-driver-nvidia-gpu that v1 could not hold: `Device.ShareID` and
`Device.Metadata`; per NVIDIA device group `timeSliceApplied`, `mpsApplied`,
`computeDomain` and `type`; `pciBusID` and `id` of NVIDIA devices and
`parentPCIBusID` of MIG partitions; `PrepareAborted` claims with `abortedAt`.
All optional, so existing v1 files stay valid.
- `checkpoint`: the legacy reader reads the checkpointmanager layouts of both
NVIDIA plugins, including the ComputeDomain V1+V2, V1 only and 25.3.0-rc.2
layouts.

## [0.1.0] - 2026-12-01

### Added
Expand Down
47 changes: 47 additions & 0 deletions api/checkpoint/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,20 @@ type PreparedClaim struct {
Devices []PreparedDevice `json:"devices,omitempty"`
// +optional
NVIDIA *NVIDIAClaim `json:"nvidia,omitempty"`
// AbortedAt is when the claim entered PrepareStateAborted.
// +optional
AbortedAt *metav1.Time `json:"abortedAt,omitempty"`
}

type PrepareState string

const (
PrepareStateStarted PrepareState = "PrepareStarted"
PrepareStateCompleted PrepareState = "PrepareCompleted"
// PrepareStateAborted marks a claim whose prepare was undone; the entry
// stays until AbortedAt plus a driver-defined TTL so that stale retries of
// the prepare can be recognised.
PrepareStateAborted PrepareState = "PrepareAborted"
)

type PreparedDevice struct {
Expand All @@ -92,6 +99,20 @@ type Device struct {
// +optional
// +listType=atomic
CDIDeviceIDs []string `json:"cdiDeviceIDs,omitempty"`
// ShareID identifies the share of a device that several claims share.
// +optional
ShareID *types.UID `json:"shareID,omitempty"`
// Metadata is the device metadata the driver returned to the kubelet.
// +optional
Metadata *DeviceMetadata `json:"metadata,omitempty"`
}

// DeviceMetadata mirrors the kubelet DRA API's device metadata.
type DeviceMetadata struct {
// +optional
Attributes map[string]resourcev1.DeviceAttribute `json:"attributes,omitempty"`
// +optional
NetworkData *resourcev1.NetworkDeviceData `json:"networkData,omitempty"`
}

// +k8s:deepcopy-gen=false
Expand Down Expand Up @@ -202,6 +223,20 @@ type NVIDIAClaim struct {
type NVIDIADeviceGroup struct {
// +optional
MPSControlDaemonID string `json:"mpsControlDaemonID,omitempty"`
// MPSApplied records whether MPS was applied to the group. Unset in
// checkpoints that predate it.
// +optional
MPSApplied *bool `json:"mpsApplied,omitempty"`
// TimeSliceApplied records whether time-slicing was applied to the group.
// Unset in checkpoints that predate it, which implied time-slicing.
// +optional
TimeSliceApplied *bool `json:"timeSliceApplied,omitempty"`
// Type is the device type of the group's ComputeDomain config.
// +optional
Type NVIDIADeviceType `json:"type,omitempty"`
// ComputeDomain is the ID of the ComputeDomain the group belongs to.
// +optional
ComputeDomain string `json:"computeDomain,omitempty"`
}

type NVIDIADeviceType string
Expand All @@ -210,6 +245,9 @@ const (
NVIDIADeviceTypeGPU NVIDIADeviceType = "gpu"
NVIDIADeviceTypeMIG NVIDIADeviceType = "mig"
NVIDIADeviceTypeVFIO NVIDIADeviceType = "vfio"
// ComputeDomain devices: an IMEX channel or the daemon of a domain.
NVIDIADeviceTypeChannel NVIDIADeviceType = "channel"
NVIDIADeviceTypeDaemon NVIDIADeviceType = "daemon"
)

type NVIDIADevice struct {
Expand All @@ -219,6 +257,12 @@ type NVIDIADevice struct {
// UUID is the GPU UUID of gpu and vfio devices.
// +optional
UUID string `json:"uuid,omitempty"`
// PCIBusID is the PCI bus ID of vfio devices.
// +optional
PCIBusID string `json:"pciBusID,omitempty"`
// ID is the IMEX channel or daemon ID of channel and daemon devices.
// +optional
ID *int32 `json:"id,omitempty"`
}

// NVIDIAPartition holds the MIG device identity of a hard partition.
Expand All @@ -227,4 +271,7 @@ type NVIDIAPartition struct {
GIID int32 `json:"giID"`
CIID int32 `json:"ciID"`
MIGUUID string `json:"migUUID"`
// ParentPCIBusID is the PCI bus ID of the parent GPU.
// +optional
ParentPCIBusID string `json:"parentPCIBusID,omitempty"`
}
63 changes: 61 additions & 2 deletions api/checkpoint/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading