Skip to content

Commit 90027b0

Browse files
author
Mrunal Patel
authored
Merge pull request #525 from wking/go-comment-sync
config: Synchronize comments between Markdown and Go
2 parents c66adcc + 7477fa5 commit 90027b0

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

config.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Below is a detailed description of each field defined in the configuration forma
1010

1111
## Specification version
1212

13-
* **`ociVersion`** (string, required) MUST be in [SemVer v2.0.0](http://semver.org/spec/v2.0.0.html) format and specifies the version of the OpenContainer specification with which the bundle complies.
14-
The OpenContainer spec follows semantic versioning and retains forward and backward compatibility within major versions.
13+
* **`ociVersion`** (string, required) MUST be in [SemVer v2.0.0](http://semver.org/spec/v2.0.0.html) format and specifies the version of the Open Container Runtime Specification with which the bundle complies.
14+
The Open Container Runtime Specification follows semantic versioning and retains forward and backward compatibility within major versions.
1515
For example, if an implementation is compliant with version 1.0.1 of the spec, it is compatible with the complete 1.x series.
1616

1717
### Example
@@ -22,7 +22,7 @@ For example, if an implementation is compliant with version 1.0.1 of the spec, i
2222

2323
## Root Configuration
2424

25-
Each container has exactly one *root filesystem*, specified in the *root* object:
25+
**`root`** (object, required) configures the container's root filesystem.
2626

2727
* **`path`** (string, required) Specifies the path to the root filesystem for the container.
2828
A directory MUST exist at the path declared by the field.
@@ -39,7 +39,7 @@ Each container has exactly one *root filesystem*, specified in the *root* object
3939

4040
## Mounts
4141

42-
You MAY add array of mount points inside container as `mounts`.
42+
**`mounts`** (array, optional) configures additional mounts (on top of [`root`](#root-configuration)).
4343
The runtime MUST mount entries in the listed order.
4444
The parameters are similar to the ones in [the Linux mount system call](http://man7.org/linux/man-pages/man2/mount.2.html).
4545

@@ -90,6 +90,8 @@ See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [Se
9090

9191
## Process configuration
9292

93+
**`process`** (object, required) configures the container process.
94+
9395
* **`terminal`** (bool, optional) specifies whether you want a terminal attached to that process, defaults to false.
9496
* **`cwd`** (string, required) is the working directory that will be set for the executable.
9597
This value MUST be an absolute path.
@@ -189,7 +191,7 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
189191

190192
## Hostname
191193

192-
* **`hostname`** (string, optional) as it is accessible to processes running inside.
194+
* **`hostname`** (string, optional) configures the container's hostname as seen by processes running inside the container.
193195
On Linux, you can only set this if your bundle creates a new [UTS namespace][uts-namespace].
194196

195197
### Example
@@ -200,6 +202,8 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
200202

201203
## Platform
202204

205+
**`platform`** specifies the configuration's target platform.
206+
203207
* **`os`** (string, required) specifies the operating system family this image targets.
204208
The runtime MUST generate an error if it does not support the configured **`os`**.
205209
Bundles SHOULD use, and runtimes SHOULD understand, **`os`** entries listed in the Go Language document for [`$GOOS`][go-environment].
@@ -247,6 +251,7 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th
247251

248252
## Hooks
249253

254+
**`hooks`** (object, optional) configures callbacks for container lifecycle events.
250255
Lifecycle hooks allow custom events for different points in a container's runtime.
251256
Presently there are `Prestart`, `Poststart` and `Poststop`.
252257

@@ -317,7 +322,7 @@ The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://g
317322

318323
## Annotations
319324

320-
This OPTIONAL property contains arbitrary metadata for the container.
325+
**`annotations`** (object, optional) contains arbitrary metadata for the container.
321326
This information MAY be structured or unstructured.
322327
Annotations are key-value maps.
323328

runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The value MAY be one of:
2020
* `stopped` : the container has been created and the user-specified code has been executed but is no longer running
2121

2222
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
23-
* **`pid`**: (int) is the ID of the main process within the container, as seen by the host.
23+
* **`pid`**: (int) is the ID of the container process, as seen by the host.
2424
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
2525
This is provided so that consumers can find the container's configuration and root filesystem on the host.
2626
* **`annotations`**: (map) contains the list of annotations associated with the container.

schema/config-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
}
5757
},
5858
"root": {
59-
"description": "The path to the root filesystem for the container.",
59+
"description": "Configures the container's root filesystem.",
6060
"id": "https://opencontainers.org/schema/bundle/root",
6161
"type": "object",
6262
"properties": {

schema/defs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"description": "Definitions used throughout the OpenContainer Specification",
2+
"description": "Definitions used throughout the Open Container Runtime Specification",
33
"definitions": {
44
"int8": {
55
"type": "integer",

specs-go/config.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ import "os"
44

55
// Spec is the base configuration for the container.
66
type Spec struct {
7-
// Version is the version of the specification that is supported.
7+
// Version of the Open Container Runtime Specification with which the bundle complies.
88
Version string `json:"ociVersion"`
9-
// Platform is the host information for OS and Arch.
9+
// Platform specifies the configuration's target platform.
1010
Platform Platform `json:"platform"`
11-
// Process is the container's main process.
11+
// Process configures the container process.
1212
Process Process `json:"process"`
13-
// Root is the root information for the container's filesystem.
13+
// Root configures the container's root filesystem.
1414
Root Root `json:"root"`
15-
// Hostname is the container's host name.
15+
// Hostname configures the container's hostname.
1616
Hostname string `json:"hostname,omitempty"`
17-
// Mounts profile configuration for adding mounts to the container's filesystem.
17+
// Mounts configures additional mounts (on top of Root).
1818
Mounts []Mount `json:"mounts,omitempty"`
19-
// Hooks are the commands run at various lifecycle events of the container.
19+
// Hooks configures callbacks for container lifecycle events.
2020
Hooks Hooks `json:"hooks"`
21-
// Annotations is an unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata.
21+
// Annotations contains arbitrary metadata for the container.
2222
Annotations map[string]string `json:"annotations,omitempty"`
2323

2424
// Linux is platform specific configuration for Linux based containers.
@@ -53,8 +53,8 @@ type Process struct {
5353
SelinuxLabel string `json:"selinuxLabel,omitempty" platform:"linux"`
5454
}
5555

56-
// User specifies Linux/Solaris specific user and group information for the container's
57-
// main process.
56+
// User specifies Linux/Solaris specific user and group information
57+
// for the container process.
5858
type User struct {
5959
// UID is the user id. (this field is platform dependent)
6060
UID uint32 `json:"uid" platform:"linux,solaris"`

specs-go/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type State struct {
88
ID string `json:"id"`
99
// Status is the runtime state of the container.
1010
Status string `json:"status"`
11-
// Pid is the process id for the container's main process.
11+
// Pid is the process ID for the container process.
1212
Pid int `json:"pid"`
1313
// BundlePath is the path to the container's bundle directory.
1414
BundlePath string `json:"bundlePath"`

0 commit comments

Comments
 (0)