Skip to content

Commit

Permalink
Add comments with version info
Browse files Browse the repository at this point in the history
  • Loading branch information
bart0sh committed Aug 7, 2024
1 parent 61fe2c4 commit ca319de
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type Spec struct {
Version string `json:"cdiVersion"`
Kind string `json:"kind"`
// Annotations add meta information per CDI spec. Note these are CDI-specific and do not affect container metadata.
// Added in v0.6.0.
Annotations map[string]string `json:"annotations,omitempty"`
Devices []Device `json:"devices"`
ContainerEdits ContainerEdits `json:"containerEdits,omitempty"`
Expand All @@ -19,6 +20,7 @@ type Spec struct {
type Device struct {
Name string `json:"name"`
// Annotations add meta information per device. Note these are CDI-specific and do not affect container metadata.
// Added in v0.6.0.
Annotations map[string]string `json:"annotations,omitempty"`
ContainerEdits ContainerEdits `json:"containerEdits"`
}
Expand All @@ -29,14 +31,14 @@ type ContainerEdits struct {
DeviceNodes []*DeviceNode `json:"deviceNodes,omitempty"`
Hooks []*Hook `json:"hooks,omitempty"`
Mounts []*Mount `json:"mounts,omitempty"`
IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
AdditionalGIDs []uint32 `json:"additionalGids,omitempty"`
IntelRdt *IntelRdt `json:"intelRdt,omitempty"` // Added in v0.7.0
AdditionalGIDs []uint32 `json:"additionalGids,omitempty"` // Added in v0.7.0
}

// DeviceNode represents a device node that needs to be added to the OCI spec.
type DeviceNode struct {
Path string `json:"path"`
HostPath string `json:"hostPath,omitempty"`
HostPath string `json:"hostPath,omitempty"` // Added in v0.5.0
Type string `json:"type,omitempty"`
Major int64 `json:"major,omitempty"`
Minor int64 `json:"minor,omitempty"`
Expand All @@ -51,7 +53,7 @@ type Mount struct {
HostPath string `json:"hostPath"`
ContainerPath string `json:"containerPath"`
Options []string `json:"options,omitempty"`
Type string `json:"type,omitempty"`
Type string `json:"type,omitempty"` // Added in v0.4.0
}

// Hook represents a hook that needs to be added to the OCI spec.
Expand Down

0 comments on commit ca319de

Please sign in to comment.