-
Notifications
You must be signed in to change notification settings - Fork 557
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
clarify user ns mappings and time ns offset configurations #1237
base: main
Are you sure you want to change the base?
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 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -37,7 +37,7 @@ The following parameters can be specified to set up namespaces: | |||||||||||||||||||||||
* **`time`** the container will be able to have its own clocks. | ||||||||||||||||||||||||
* **`path`** *(string, OPTIONAL)* - namespace file. | ||||||||||||||||||||||||
This value MUST be an absolute path in the [runtime mount namespace](glossary.md#runtime-namespace). | ||||||||||||||||||||||||
The runtime MUST place the container process in the namespace associated with that `path`. | ||||||||||||||||||||||||
The runtime MUST let the container process join in the namespace associated with that `path`. | ||||||||||||||||||||||||
The runtime MUST [generate an error](runtime.md#errors) if `path` is not associated with a namespace of type `type`. | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
If `path` is not specified, the runtime MUST create a new [container namespace](glossary.md#container-namespace) of type `type`. | ||||||||||||||||||||||||
|
@@ -80,6 +80,9 @@ If a `namespaces` field contains duplicated namespaces with same `type`, the run | |||||||||||||||||||||||
|
||||||||||||||||||||||||
## <a name="configLinuxUserNamespaceMappings" />User namespace mappings | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
If the runtime should create an new user namespace for the container, `uidMappings` and `gidMappings` should be provided, otherwise, these two fields should not be specified, | ||||||||||||||||||||||||
and it will be ignored by the runtime. | ||||||||||||||||||||||||
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.
Suggested change
Comment on lines
+83
to
+84
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. In the runtime-spec, we don't hard-wrap lines. Each line is meant to be a complete sentence (to make diffs less messy). I think the text here is also a little confusing. Maybe something like this would better explain things:
Suggested change
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
**`uidMappings`** (array of objects, OPTIONAL) describes the user namespace uid mappings from the host to the container. | ||||||||||||||||||||||||
**`gidMappings`** (array of objects, OPTIONAL) describes the user namespace gid mappings from the host to the container. | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
@@ -113,6 +116,9 @@ Note that the number of mapping entries MAY be limited by the [kernel][user-name | |||||||||||||||||||||||
|
||||||||||||||||||||||||
## <a name="configLinuxTimeOffset" />Offset for Time Namespace | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
If the runtime should create an new time namespace for the container, `timeOffsets` should be provided, otherwise, it should not be specified, | ||||||||||||||||||||||||
and it will be ignored by the runtime. | ||||||||||||||||||||||||
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. idem
Comment on lines
+119
to
+120
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.
Suggested change
We can be a bit more strict here because there's no released version of runc with timens support yet. |
||||||||||||||||||||||||
|
||||||||||||||||||||||||
**`timeOffsets`** (object, OPTIONAL) sets the offset for Time Namespace. For more information | ||||||||||||||||||||||||
see the [time_namespaces][time_namespaces.7]. | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this wording change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old wording was better IMHO, "let the container process join" is not an accurate description.