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

uidMappings: change order of fields for clarity #956

Merged
merged 1 commit into from
Mar 9, 2018
Merged
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
6 changes: 3 additions & 3 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ If a `namespaces` field contains duplicated namespaces with same `type`, the run

Each entry has the following structure:

* **`hostID`** *(uint32, REQUIRED)* - is the starting uid/gid on the host to be mapped to *containerID*.
* **`containerID`** *(uint32, REQUIRED)* - is the starting uid/gid in the container.
* **`hostID`** *(uint32, REQUIRED)* - is the starting uid/gid on the host to be mapped to *containerID*.
* **`size`** *(uint32, REQUIRED)* - is the number of ids to be mapped.

The runtime SHOULD NOT modify the ownership of referenced filesystems to realize the mapping.
Expand All @@ -94,15 +94,15 @@ Note that the number of mapping entries MAY be limited by the [kernel][user-name
```json
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
]
Expand Down
4 changes: 2 additions & 2 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,15 @@ Here is a full example `config.json` for reference.
],
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
Expand Down
6 changes: 3 additions & 3 deletions schema/defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@
"IDMapping": {
"type": "object",
"properties": {
"hostID": {
"containerID": {
"$ref": "#/definitions/uint32"
},
"containerID": {
"hostID": {
"$ref": "#/definitions/uint32"
},
"size": {
"$ref": "#/definitions/uint32"
}
},
"required": [
"hostID",
"containerID",
"hostID",
"size"
]
},
Expand Down
4 changes: 2 additions & 2 deletions schema/test/config/good/spec-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@
],
"uidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
"gidMappings": [
{
"hostID": 1000,
"containerID": 0,
"hostID": 1000,
"size": 32000
}
],
Expand Down
4 changes: 2 additions & 2 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ const (

// LinuxIDMapping specifies UID/GID mappings
type LinuxIDMapping struct {
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
HostID uint32 `json:"hostID"`
// ContainerID is the starting UID/GID in the container
ContainerID uint32 `json:"containerID"`
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
HostID uint32 `json:"hostID"`
// Size is the number of IDs to be mapped
Size uint32 `json:"size"`
}
Expand Down