Skip to content
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

Add platform.Feature #761

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
6 changes: 5 additions & 1 deletion image-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ For the media type(s) that this document is compatible with, see the [matrix][ma

- **`features`** *array of strings*

This property is RESERVED for future versions of the specification.
This OPTIONAL property specifies an array of strings, each specifying a mandatory hardware/host feature. Examples are:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mandatory" doesn't really have meaning in this spec, you need to explain what the behaviour needs to be and how a runtime should check the features.

- CPU type (*haswell*, *broadwell*, *skylake*, *ryzen*)
- GPU [NVIDIA Compute Capability](https://developer.nvidia.com/cuda-gpus) (3.7, 6.1)
- Host name, to separate different types in a data center without flushing out all the specifics (*ComputeNode-20190213*, *storage-2019*)
By using this feature flag, a manifest list is able to provide specific images for certain hosts.
Copy link
Contributor

@jonjohnsonjr jonjohnsonjr Mar 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/a manifest list/an image index/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonjohnsonjr changed it - thx for the correction


- **`annotations`** *string-string map*

Expand Down
6 changes: 6 additions & 0 deletions schema/image-index-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
},
"variant": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions specs-go/v1/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,8 @@ type Platform struct {
// Variant is an optional field specifying a variant of the CPU, for
// example `v7` to specify ARMv7 when architecture is `arm`.
Variant string `json:"variant,omitempty"`

// Features is an optional field specifying an array of strings,
// each listing a required general feature (CPU feature like `avx512` or CUDA driver version).
Features []string `json:"features,omitempty"`
}
4 changes: 2 additions & 2 deletions specs-go/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const (
// VersionMajor is for an API incompatible changes
VersionMajor = 1
// VersionMinor is for functionality in a backwards-compatible manner
VersionMinor = 0
VersionMinor = 1
// VersionPatch is for backwards-compatible bug fixes
VersionPatch = 1
VersionPatch = 0

// VersionDev indicates development branch. Releases will be empty string.
VersionDev = "-dev"
Expand Down