Skip to content

Commit 67063b5

Browse files
author
Mrunal Patel
authored
Merge pull request #574 from wking/config-optional-required
config: Use REQUIRED and OPTIONAL for properties
2 parents 37dbfc3 + d49c29f commit 67063b5

File tree

3 files changed

+90
-90
lines changed

3 files changed

+90
-90
lines changed

config-linux.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For more information, see [the man page](http://man7.org/linux/man-pages/man7/na
2626
Namespaces are specified as an array of entries inside the `namespaces` root field.
2727
The following parameters can be specified to setup namespaces:
2828

29-
* **`type`** *(string, required)* - namespace type. The following namespaces types are supported:
29+
* **`type`** *(string, REQUIRED)* - namespace type. The following namespaces types are supported:
3030
* **`pid`** processes inside the container will only be able to see other processes inside the same container.
3131
* **`network`** the container will have its own network stack.
3232
* **`mount`** the container will have an isolated mount table.
@@ -35,7 +35,7 @@ The following parameters can be specified to setup namespaces:
3535
* **`user`** the container will be able to remap user and group IDs from the host to local users and groups within the container.
3636
* **`cgroup`** the container will have an isolated view of the cgroup hierarchy.
3737

38-
* **`path`** *(string, optional)* - path to namespace file in the [runtime mount namespace](glossary.md#runtime-namespace)
38+
* **`path`** *(string, OPTIONAL)* - path to namespace file in the [runtime mount namespace](glossary.md#runtime-namespace)
3939

4040
If a path is specified, that particular file is used to join that type of namespace.
4141
If a namespace type is not specified in the `namespaces` array, the container MUST inherit the [runtime namespace](glossary.md#runtime-namespace) of that type.
@@ -99,19 +99,19 @@ There is a limit of 5 mappings which is the Linux kernel hard limit.
9999

100100
## Devices
101101

102-
**`devices`** (array, optional) lists devices that MUST be available in the container.
102+
**`devices`** (array, OPTIONAL) lists devices that MUST be available in the container.
103103
The runtime may supply them however it likes (with [mknod][mknod.2], by bind mounting from the runtime mount namespace, etc.).
104104

105105
The following parameters can be specified:
106106

107-
* **`type`** *(string, required)* - type of device: `c`, `b`, `u` or `p`.
107+
* **`type`** *(string, REQUIRED)* - type of device: `c`, `b`, `u` or `p`.
108108
More info in [mknod(1)][mknod.1].
109-
* **`path`** *(string, required)* - full path to device inside container.
110-
* **`major, minor`** *(int64, required unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
111-
* **`fileMode`** *(uint32, optional)* - file mode for the device.
109+
* **`path`** *(string, REQUIRED)* - full path to device inside container.
110+
* **`major, minor`** *(int64, REQUIRED unless **`type`** is `p`)* - [major, minor numbers][devices] for the device.
111+
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
112112
You can also control access to devices [with cgroups](#device-whitelist).
113-
* **`uid`** *(uint32, optional)* - id of device owner.
114-
* **`gid`** *(uint32, optional)* - id of device group.
113+
* **`uid`** *(uint32, OPTIONAL)* - id of device owner.
114+
* **`gid`** *(uint32, OPTIONAL)* - id of device group.
115115

116116
###### Example
117117

@@ -199,17 +199,17 @@ However, a runtime MAY attach the container process to additional cgroup control
199199

200200
#### Device whitelist
201201

202-
**`devices`** (array, optional) configures the [device whitelist][cgroup-v1-devices].
202+
**`devices`** (array, OPTIONAL) configures the [device whitelist][cgroup-v1-devices].
203203
The runtime MUST apply entries in the listed order.
204204

205205
The following parameters can be specified:
206206

207-
* **`allow`** *(boolean, required)* - whether the entry is allowed or denied.
208-
* **`type`** *(string, optional)* - type of device: `a` (all), `c` (char), or `b` (block).
207+
* **`allow`** *(boolean, REQUIRED)* - whether the entry is allowed or denied.
208+
* **`type`** *(string, OPTIONAL)* - type of device: `a` (all), `c` (char), or `b` (block).
209209
`null` or unset values mean "all", mapping to `a`.
210-
* **`major, minor`** *(int64, optional)* - [major, minor numbers][devices] for the device.
210+
* **`major, minor`** *(int64, OPTIONAL)* - [major, minor numbers][devices] for the device.
211211
`null` or unset values mean "all", mapping to [`*` in the filesystem API][cgroup-v1-devices].
212-
* **`access`** *(string, optional)* - cgroup permissions for device.
212+
* **`access`** *(string, OPTIONAL)* - cgroup permissions for device.
213213
A composition of `r` (read), `w` (write), and `m` (mknod).
214214

215215
###### Example
@@ -245,7 +245,7 @@ The OOM killer is enabled by default in every cgroup using the `memory` subsyste
245245
To disable it, specify a value of `true`.
246246
For more information, see [the memory cgroup man page][cgroup-v1-memory].
247247

248-
* **`disableOOMKiller`** *(bool, optional)* - enables or disables the OOM killer
248+
* **`disableOOMKiller`** *(bool, OPTIONAL)* - enables or disables the OOM killer
249249

250250
###### Example
251251

@@ -260,7 +260,7 @@ For more information, see [the proc filesystem documentation section 3.1](https:
260260
This is a kernel/system level setting, where as `disableOOMKiller` is scoped for a memory cgroup.
261261
For more information on how these two settings work together, see [the memory cgroup documentation section 10. OOM Contol][cgroup-v1-memory].
262262

263-
* **`oomScoreAdj`** *(int, optional)* - adjust the oom-killer score
263+
* **`oomScoreAdj`** *(int, OPTIONAL)* - adjust the oom-killer score
264264

265265
###### Example
266266

@@ -275,17 +275,17 @@ For more information, see [the memory cgroup man page][cgroup-v1-memory].
275275

276276
The following parameters can be specified to setup the controller:
277277

278-
* **`limit`** *(uint64, optional)* - sets limit of memory usage in bytes
278+
* **`limit`** *(uint64, OPTIONAL)* - sets limit of memory usage in bytes
279279

280-
* **`reservation`** *(uint64, optional)* - sets soft limit of memory usage in bytes
280+
* **`reservation`** *(uint64, OPTIONAL)* - sets soft limit of memory usage in bytes
281281

282-
* **`swap`** *(uint64, optional)* - sets limit of memory+Swap usage
282+
* **`swap`** *(uint64, OPTIONAL)* - sets limit of memory+Swap usage
283283

284-
* **`kernel`** *(uint64, optional)* - sets hard limit for kernel memory
284+
* **`kernel`** *(uint64, OPTIONAL)* - sets hard limit for kernel memory
285285

286-
* **`kernelTCP`** *(uint64, optional)* - sets hard limit in bytes for kernel TCP buffer memory
286+
* **`kernelTCP`** *(uint64, OPTIONAL)* - sets hard limit in bytes for kernel TCP buffer memory
287287

288-
* **`swappiness`** *(uint64, optional)* - sets swappiness parameter of vmscan (See sysctl's vm.swappiness)
288+
* **`swappiness`** *(uint64, OPTIONAL)* - sets swappiness parameter of vmscan (See sysctl's vm.swappiness)
289289

290290
###### Example
291291

@@ -307,19 +307,19 @@ For more information, see [the cpusets cgroup man page][cgroup-v1-cpusets].
307307

308308
The following parameters can be specified to setup the controller:
309309

310-
* **`shares`** *(uint64, optional)* - specifies a relative share of CPU time available to the tasks in a cgroup
310+
* **`shares`** *(uint64, OPTIONAL)* - specifies a relative share of CPU time available to the tasks in a cgroup
311311

312-
* **`quota`** *(uint64, optional)* - specifies the total amount of time in microseconds for which all tasks in a cgroup can run during one period (as defined by **`period`** below)
312+
* **`quota`** *(uint64, OPTIONAL)* - specifies the total amount of time in microseconds for which all tasks in a cgroup can run during one period (as defined by **`period`** below)
313313

314-
* **`period`** *(uint64, optional)* - specifies a period of time in microseconds for how regularly a cgroup's access to CPU resources should be reallocated (CFS scheduler only)
314+
* **`period`** *(uint64, OPTIONAL)* - specifies a period of time in microseconds for how regularly a cgroup's access to CPU resources should be reallocated (CFS scheduler only)
315315

316-
* **`realtimeRuntime`** *(uint64, optional)* - specifies a period of time in microseconds for the longest continuous period in which the tasks in a cgroup have access to CPU resources
316+
* **`realtimeRuntime`** *(uint64, OPTIONAL)* - specifies a period of time in microseconds for the longest continuous period in which the tasks in a cgroup have access to CPU resources
317317

318-
* **`realtimePeriod`** *(uint64, optional)* - same as **`period`** but applies to realtime scheduler only
318+
* **`realtimePeriod`** *(uint64, OPTIONAL)* - same as **`period`** but applies to realtime scheduler only
319319

320-
* **`cpus`** *(string, optional)* - list of CPUs the container will run in
320+
* **`cpus`** *(string, OPTIONAL)* - list of CPUs the container will run in
321321

322-
* **`mems`** *(string, optional)* - list of Memory Nodes the container will run in
322+
* **`mems`** *(string, OPTIONAL)* - list of Memory Nodes the container will run in
323323

324324
###### Example
325325

@@ -342,20 +342,20 @@ For more information, see [the kernel cgroups documentation about blkio][cgroup-
342342

343343
The following parameters can be specified to setup the controller:
344344

345-
* **`blkioWeight`** *(uint16, optional)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules. The range is from 10 to 1000.
345+
* **`blkioWeight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules. The range is from 10 to 1000.
346346

347-
* **`blkioLeafWeight`** *(uint16, optional)* - equivalents of `blkioWeight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups. The range is from 10 to 1000.
347+
* **`blkioLeafWeight`** *(uint16, OPTIONAL)* - equivalents of `blkioWeight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups. The range is from 10 to 1000.
348348

349-
* **`blkioWeightDevice`** *(array, optional)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
350-
* **`major, minor`** *(int64, required)* - major, minor numbers for device. More info in `man mknod`.
351-
* **`weight`** *(uint16, optional)* - bandwidth rate for the device, range is from 10 to 1000
352-
* **`leafWeight`** *(uint16, optional)* - bandwidth rate for the device while competing with the cgroup's child cgroups, range is from 10 to 1000, CFQ scheduler only
349+
* **`blkioWeightDevice`** *(array, OPTIONAL)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
350+
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in `man mknod`.
351+
* **`weight`** *(uint16, OPTIONAL)* - bandwidth rate for the device, range is from 10 to 1000
352+
* **`leafWeight`** *(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, range is from 10 to 1000, CFQ scheduler only
353353

354354
You must specify at least one of `weight` or `leafWeight` in a given entry, and can specify both.
355355

356-
* **`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`** *(array, optional)* - specify the list of devices which will be IO rate limited. The following parameters can be specified per-device:
357-
* **`major, minor`** *(int64, required)* - major, minor numbers for device. More info in `man mknod`.
358-
* **`rate`** *(uint64, required)* - IO rate limit for the device
356+
* **`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`** *(array, OPTIONAL)* - specify the list of devices which will be IO rate limited. The following parameters can be specified per-device:
357+
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in `man mknod`.
358+
* **`rate`** *(uint64, REQUIRED)* - IO rate limit for the device
359359

360360
###### Example
361361

@@ -401,9 +401,9 @@ For more information, see the [kernel cgroups documentation about HugeTLB][cgrou
401401

402402
`hugepageLimits` is an array of entries, each having the following structure:
403403

404-
* **`pageSize`** *(string, required)* - hugepage size
404+
* **`pageSize`** *(string, REQUIRED)* - hugepage size
405405

406-
* **`limit`** *(uint64, required)* - limit in bytes of *hugepagesize* HugeTLB usage
406+
* **`limit`** *(uint64, REQUIRED)* - limit in bytes of *hugepagesize* HugeTLB usage
407407

408408
###### Example
409409

@@ -423,12 +423,12 @@ For more information, see [the net\_cls cgroup man page][cgroup-v1-net-cls] and
423423

424424
The following parameters can be specified to setup these cgroup controllers:
425425

426-
* **`classID`** *(uint32, optional)* - is the network class identifier the cgroup's network packets will be tagged with
426+
* **`classID`** *(uint32, OPTIONAL)* - is the network class identifier the cgroup's network packets will be tagged with
427427

428-
* **`priorities`** *(array, optional)* - specifies a list of objects of the priorities assigned to traffic originating from
428+
* **`priorities`** *(array, OPTIONAL)* - specifies a list of objects of the priorities assigned to traffic originating from
429429
processes in the group and egressing the system on various interfaces. The following parameters can be specified per-priority:
430-
* **`name`** *(string, required)* - interface name
431-
* **`priority`** *(uint32, required)* - priority applied to the interface
430+
* **`name`** *(string, REQUIRED)* - interface name
431+
* **`priority`** *(uint32, REQUIRED)* - priority applied to the interface
432432

433433
###### Example
434434

@@ -455,7 +455,7 @@ For more information, see [the pids cgroup man page][cgroup-v1-pids].
455455

456456
The following parameters can be specified to setup the controller:
457457

458-
* **`limit`** *(int64, required)* - specifies the maximum number of tasks in the cgroup
458+
* **`limit`** *(int64, REQUIRED)* - specifies the maximum number of tasks in the cgroup
459459

460460
###### Example
461461

config-solaris.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Solaris application containers can be configured using the following properties,
55
## milestone
66
The SMF(Service Management Facility) FMRI which should go to "online" state before we start the desired process within the container.
77

8-
**`milestone`** *(string, optional)*
8+
**`milestone`** *(string, OPTIONAL)*
99

1010
### Example
1111
```json
@@ -16,7 +16,7 @@ The SMF(Service Management Facility) FMRI which should go to "online" state befo
1616
The maximum set of privileges any process in this container can obtain.
1717
The property should consist of a comma-separated privilege set specification as described in priv_str_to_set(3C) man page for the respective release of Solaris.
1818

19-
**`limitpriv`** *(string, optional)*
19+
**`limitpriv`** *(string, OPTIONAL)*
2020

2121
### Example
2222
```json
@@ -28,7 +28,7 @@ The maximum amount of shared memory allowed for this application container.
2828
A scale (K, M, G, T) can be applied to the value for each of these numbers (for example, 1M is one megabyte).
2929
Mapped to max-shm-memory in zonecfg(1M) man page.
3030

31-
**`maxShmMemory`** *(string, optional)*
31+
**`maxShmMemory`** *(string, OPTIONAL)*
3232

3333
### Example
3434
```json
@@ -42,7 +42,7 @@ An ncpu value of 1 means 100% of a CPU, a value of 1.25 means 125%, .75 mean 75%
4242
When projects within a capped container have their own caps, the minimum value takes precedence.
4343
cappedCPU is mapped to capped-cpu in zonecfg(1M) man page.
4444

45-
* **`ncpus`** *(string, optional)*
45+
* **`ncpus`** *(string, OPTIONAL)*
4646

4747
### Example
4848
```json
@@ -56,8 +56,8 @@ The physical and swap caps on the memory that can be used by this application co
5656
A scale (K, M, G, T) can be applied to the value for each of these numbers (for example, 1M is one megabyte).
5757
cappedMemory is mapped to capped-memory in zonecfg(1M) man page.
5858

59-
* **`physical`** *(string, optional)*
60-
* **`swap`** *(string, optional)*
59+
* **`physical`** *(string, OPTIONAL)*
60+
* **`swap`** *(string, OPTIONAL)*
6161

6262
### Example
6363
```json
@@ -80,22 +80,22 @@ The VNIC is deleted when the container is torn down.
8080
The following properties can be used to setup automatic networks.
8181
For additional information on properties check zonecfg(1M) man page for the respective release of Solaris.
8282

83-
* **`linkname`** *(string, optional)* Specify a name for the automatically created VNIC datalink.
84-
* **`lowerLink`** *(string, optional)* Specify the link over which the VNIC will be created.
83+
* **`linkname`** *(string, OPTIONAL)* Specify a name for the automatically created VNIC datalink.
84+
* **`lowerLink`** *(string, OPTIONAL)* Specify the link over which the VNIC will be created.
8585
Mapped to lower-link in the zonecfg(1M) man page.
86-
* **`allowedAddress`** *(string, optional)* The set of IP addresses that the container can use might be constrained by specifying the allowedAddress property.
86+
* **`allowedAddress`** *(string, OPTIONAL)* The set of IP addresses that the container can use might be constrained by specifying the allowedAddress property.
8787
If allowedAddress has not been specified, then they can use any IP address on the associated physical interface for the network resource.
8888
Otherwise, when allowedAddress is specified, the container cannot use IP addresses that are not in the allowedAddress list for the physical address.
8989
Mapped to allowed-address in the zonecfg(1M) man page.
90-
* **`configureAllowedAddress`** *(string, optional)* If configureAllowedAddress is set to true, the addresses specified by allowedAddress are automatically configured on the interface each time the container starts.
90+
* **`configureAllowedAddress`** *(string, OPTIONAL)* If configureAllowedAddress is set to true, the addresses specified by allowedAddress are automatically configured on the interface each time the container starts.
9191
When it is set to false, the allowedAddress will not be configured on container start.
9292
Mapped to configure-allowed-address in the zonecfg(1M) man page.
93-
* **`defrouter`** *(string, optional)* The value for the optional default router.
94-
* **`macAddress`** *(string, optional)* Set the VNIC's MAC addresses based on the specified value or keyword.
93+
* **`defrouter`** *(string, OPTIONAL)* The value for the OPTIONAL default router.
94+
* **`macAddress`** *(string, OPTIONAL)* Set the VNIC's MAC addresses based on the specified value or keyword.
9595
If not a keyword, it is interpreted as a unicast MAC address.
9696
For a list of the supported keywords please refer to the zonecfg(1M) man page of the respective Solaris release.
9797
Mapped to mac-address in the zonecfg(1M) man page.
98-
* **`linkProtection`** *(string, optional)* Enables one or more types of link protection using comma-separated values.
98+
* **`linkProtection`** *(string, OPTIONAL)* Enables one or more types of link protection using comma-separated values.
9999
See the protection property in dladm(8) for supported values in respective release of Solaris.
100100
Mapped to link-protection in the zonecfg(1M) man page.
101101

0 commit comments

Comments
 (0)