Skip to content

Commit 6be516e

Browse files
author
Mrunal Patel
authored
Merge pull request #956 from kinvolk/alban/uid-mapping
uidMappings: change order of fields for clarity
2 parents fa4b36a + cd39042 commit 6be516e

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

config-linux.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ If a `namespaces` field contains duplicated namespaces with same `type`, the run
8282

8383
Each entry has the following structure:
8484

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

8989
The runtime SHOULD NOT modify the ownership of referenced filesystems to realize the mapping.
@@ -94,15 +94,15 @@ Note that the number of mapping entries MAY be limited by the [kernel][user-name
9494
```json
9595
"uidMappings": [
9696
{
97-
"hostID": 1000,
9897
"containerID": 0,
98+
"hostID": 1000,
9999
"size": 32000
100100
}
101101
],
102102
"gidMappings": [
103103
{
104-
"hostID": 1000,
105104
"containerID": 0,
105+
"hostID": 1000,
106106
"size": 32000
107107
}
108108
]

config.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -664,15 +664,15 @@ Here is a full example `config.json` for reference.
664664
],
665665
"uidMappings": [
666666
{
667-
"hostID": 1000,
668667
"containerID": 0,
668+
"hostID": 1000,
669669
"size": 32000
670670
}
671671
],
672672
"gidMappings": [
673673
{
674-
"hostID": 1000,
675674
"containerID": 0,
675+
"hostID": 1000,
676676
"size": 32000
677677
}
678678
],

schema/defs.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,19 @@
108108
"IDMapping": {
109109
"type": "object",
110110
"properties": {
111-
"hostID": {
111+
"containerID": {
112112
"$ref": "#/definitions/uint32"
113113
},
114-
"containerID": {
114+
"hostID": {
115115
"$ref": "#/definitions/uint32"
116116
},
117117
"size": {
118118
"$ref": "#/definitions/uint32"
119119
}
120120
},
121121
"required": [
122-
"hostID",
123122
"containerID",
123+
"hostID",
124124
"size"
125125
]
126126
},

schema/test/config/good/spec-example.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,15 @@
194194
],
195195
"uidMappings": [
196196
{
197-
"hostID": 1000,
198197
"containerID": 0,
198+
"hostID": 1000,
199199
"size": 32000
200200
}
201201
],
202202
"gidMappings": [
203203
{
204-
"hostID": 1000,
205204
"containerID": 0,
205+
"hostID": 1000,
206206
"size": 32000
207207
}
208208
],

specs-go/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ const (
194194

195195
// LinuxIDMapping specifies UID/GID mappings
196196
type LinuxIDMapping struct {
197-
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
198-
HostID uint32 `json:"hostID"`
199197
// ContainerID is the starting UID/GID in the container
200198
ContainerID uint32 `json:"containerID"`
199+
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
200+
HostID uint32 `json:"hostID"`
201201
// Size is the number of IDs to be mapped
202202
Size uint32 `json:"size"`
203203
}

0 commit comments

Comments
 (0)