-
Notifications
You must be signed in to change notification settings - Fork 42
Document fields in spec to indicate when these were added. #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ type Spec struct { | |
Version string `json:"cdiVersion"` | ||
Kind string `json:"kind"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to call out the allowed character change for the class in a docstring? |
||
// 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"` | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One thought that I had was whether we wanted to add golang field tags so that we could parse these programatically? This could be done as a follow-up though. |
||
Annotations map[string]string `json:"annotations,omitempty"` | ||
ContainerEdits ContainerEdits `json:"containerEdits"` | ||
} | ||
|
@@ -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"` | ||
|
@@ -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. | ||
|
Uh oh!
There was an error while loading. Please reload this page.