Browse code

vendor: opencontainers/runtime-spec v1.0.2

full diff: https://github.com/opencontainers/runtime-spec/compare/29686dbc5559d93fb1ef402eeda3e35c38d75af4...v1.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2020/05/05 22:22:35
Showing 4 changed files
... ...
@@ -84,7 +84,7 @@ google.golang.org/grpc                              f495f5b15ae7ccda3b38c53a1bfc
84 84
 # This commit does not need to match RUNC_COMMIT as it is used for helper
85 85
 # packages but should be newer or equal.
86 86
 github.com/opencontainers/runc                      dc9208a3303feef5b3839f4323d9beb36df0a9dd # v1.0.0-rc10
87
-github.com/opencontainers/runtime-spec              29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db
87
+github.com/opencontainers/runtime-spec              c4ee7d12c742ffe806cd9350b6af3b4b19faed6f # v1.0.2
88 88
 github.com/opencontainers/image-spec                d60099175f88c47cd379c4738d158884749ed235 # v1.0.1
89 89
 github.com/seccomp/libseccomp-golang                689e3c1541a84461afc49c1c87352a6cedf72e9c # v0.9.1
90 90
 
... ...
@@ -12,7 +12,6 @@ Additional documentation about how this group operates:
12 12
 - [Style and Conventions](style.md)
13 13
 - [Implementations](implementations.md)
14 14
 - [Releases](RELEASES.md)
15
-- [project](project.md)
16 15
 - [charter][charter]
17 16
 
18 17
 ## Use Cases
... ...
@@ -54,11 +53,9 @@ When in doubt, start on the [mailing-list](#mailing-list).
54 54
 
55 55
 ### Meetings
56 56
 
57
-The contributors and maintainers of all OCI projects have monthly meetings, which are usually at 2:00 PM (USA Pacific) on the first Wednesday of every month.
58
-There is an [iCalendar][rfc5545] format for the meetings [here](meeting.ics).
59
-Everyone is welcome to participate via [UberConference web][uberconference] or audio-only: +1 415 968 0849 (no PIN needed).
60
-An initial agenda will be posted to the [mailing list](#mailing-list) in the week before each meeting, and everyone is welcome to propose additional topics or suggest other agenda alterations there.
61
-Minutes are posted to the [mailing list](#mailing-list) and minutes from past calls are archived [here][minutes], with minutes from especially old meetings (September 2015 and earlier) archived [here][runtime-wiki].
57
+Please see the [OCI org repository README](https://github.com/opencontainers/org#meetings) for the most up-to-date
58
+information on OCI contributor and maintainer meeting schedules. You can also find links to meeting agendas and
59
+minutes for all prior meetings.
62 60
 
63 61
 ### Mailing List
64 62
 
... ...
@@ -139,7 +136,7 @@ Read more on [How to Write a Git Commit Message][how-to-git-commit] or the Discu
139 139
 
140 140
 
141 141
 [charter]: https://www.opencontainers.org/about/governance
142
-[code-of-conduct]: https://github.com/opencontainers/tob/blob/master/code-of-conduct.md
142
+[code-of-conduct]: https://github.com/opencontainers/org/blob/master/CODE_OF_CONDUCT.md
143 143
 [dev-list]: https://groups.google.com/a/opencontainers.org/forum/#!forum/dev
144 144
 [how-to-git-commit]: http://chris.beams.io/posts/git-commit
145 145
 [irc-logs]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/
... ...
@@ -89,6 +89,8 @@ type User struct {
89 89
 	UID uint32 `json:"uid" platform:"linux,solaris"`
90 90
 	// GID is the group id.
91 91
 	GID uint32 `json:"gid" platform:"linux,solaris"`
92
+	// Umask is the umask for the init process.
93
+	Umask uint32 `json:"umask,omitempty" platform:"linux,solaris"`
92 94
 	// AdditionalGids are additional group ids set for the container's process.
93 95
 	AdditionalGids []uint32 `json:"additionalGids,omitempty" platform:"linux,solaris"`
94 96
 	// Username is the user name.
... ...
@@ -123,13 +125,26 @@ type Hook struct {
123 123
 	Timeout *int     `json:"timeout,omitempty"`
124 124
 }
125 125
 
126
+// Hooks specifies a command that is run in the container at a particular event in the lifecycle of a container
126 127
 // Hooks for container setup and teardown
127 128
 type Hooks struct {
128
-	// Prestart is a list of hooks to be run before the container process is executed.
129
+	// Prestart is Deprecated. Prestart is a list of hooks to be run before the container process is executed.
130
+	// It is called in the Runtime Namespace
129 131
 	Prestart []Hook `json:"prestart,omitempty"`
132
+	// CreateRuntime is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called
133
+	// It is called in the Runtime Namespace
134
+	CreateRuntime []Hook `json:"createRuntime,omitempty"`
135
+	// CreateContainer is a list of hooks to be run after the container has been created but before pivot_root or any equivalent operation has been called
136
+	// It is called in the Container Namespace
137
+	CreateContainer []Hook `json:"createContainer,omitempty"`
138
+	// StartContainer is a list of hooks to be run after the start operation is called but before the container process is started
139
+	// It is called in the Container Namespace
140
+	StartContainer []Hook `json:"startContainer,omitempty"`
130 141
 	// Poststart is a list of hooks to be run after the container process is started.
142
+	// It is called in the Runtime Namespace
131 143
 	Poststart []Hook `json:"poststart,omitempty"`
132 144
 	// Poststop is a list of hooks to be run after the container process exits.
145
+	// It is called in the Runtime Namespace
133 146
 	Poststop []Hook `json:"poststop,omitempty"`
134 147
 }
135 148
 
... ...
@@ -165,6 +180,8 @@ type Linux struct {
165 165
 	// IntelRdt contains Intel Resource Director Technology (RDT) information for
166 166
 	// handling resource constraints (e.g., L3 cache, memory bandwidth) for the container
167 167
 	IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
168
+	// Personality contains configuration for the Linux personality syscall
169
+	Personality *LinuxPersonality `json:"personality,omitempty"`
168 170
 }
169 171
 
170 172
 // LinuxNamespace is the configuration for a Linux namespace
... ...
@@ -183,17 +200,17 @@ const (
183 183
 	// PIDNamespace for isolating process IDs
184 184
 	PIDNamespace LinuxNamespaceType = "pid"
185 185
 	// NetworkNamespace for isolating network devices, stacks, ports, etc
186
-	NetworkNamespace = "network"
186
+	NetworkNamespace LinuxNamespaceType = "network"
187 187
 	// MountNamespace for isolating mount points
188
-	MountNamespace = "mount"
188
+	MountNamespace LinuxNamespaceType = "mount"
189 189
 	// IPCNamespace for isolating System V IPC, POSIX message queues
190
-	IPCNamespace = "ipc"
190
+	IPCNamespace LinuxNamespaceType = "ipc"
191 191
 	// UTSNamespace for isolating hostname and NIS domain name
192
-	UTSNamespace = "uts"
192
+	UTSNamespace LinuxNamespaceType = "uts"
193 193
 	// UserNamespace for isolating user and group IDs
194
-	UserNamespace = "user"
194
+	UserNamespace LinuxNamespaceType = "user"
195 195
 	// CgroupNamespace for isolating cgroup hierarchies
196
-	CgroupNamespace = "cgroup"
196
+	CgroupNamespace LinuxNamespaceType = "cgroup"
197 197
 )
198 198
 
199 199
 // LinuxIDMapping specifies UID/GID mappings
... ...
@@ -219,6 +236,7 @@ type POSIXRlimit struct {
219 219
 // LinuxHugepageLimit structure corresponds to limiting kernel hugepages
220 220
 type LinuxHugepageLimit struct {
221 221
 	// Pagesize is the hugepage size
222
+	// Format: "<size><unit-prefix>B' (e.g. 64KB, 2MB, 1GB, etc.)
222 223
 	Pagesize string `json:"pageSize"`
223 224
 	// Limit is the limit of "hugepagesize" hugetlb usage
224 225
 	Limit uint64 `json:"limit"`
... ...
@@ -290,6 +308,8 @@ type LinuxMemory struct {
290 290
 	Swappiness *uint64 `json:"swappiness,omitempty"`
291 291
 	// DisableOOMKiller disables the OOM killer for out of memory conditions
292 292
 	DisableOOMKiller *bool `json:"disableOOMKiller,omitempty"`
293
+	// Enables hierarchical memory accounting
294
+	UseHierarchy *bool `json:"useHierarchy,omitempty"`
293 295
 }
294 296
 
295 297
 // LinuxCPU for Linux cgroup 'cpu' resource management
... ...
@@ -386,6 +406,28 @@ type LinuxDeviceCgroup struct {
386 386
 	Access string `json:"access,omitempty"`
387 387
 }
388 388
 
389
+// LinuxPersonalityDomain refers to a personality domain.
390
+type LinuxPersonalityDomain string
391
+
392
+// LinuxPersonalityFlag refers to an additional personality flag. None are currently defined.
393
+type LinuxPersonalityFlag string
394
+
395
+// Define domain and flags for Personality
396
+const (
397
+	// PerLinux is the standard Linux personality
398
+	PerLinux LinuxPersonalityDomain = "LINUX"
399
+	// PerLinux32 sets personality to 32 bit
400
+	PerLinux32 LinuxPersonalityDomain = "LINUX32"
401
+)
402
+
403
+// LinuxPersonality represents the Linux personality syscall input
404
+type LinuxPersonality struct {
405
+	// Domain for the personality
406
+	Domain LinuxPersonalityDomain `json:"domain"`
407
+	// Additional flags
408
+	Flags []LinuxPersonalityFlag `json:"flags,omitempty"`
409
+}
410
+
389 411
 // Solaris contains platform-specific configuration for Solaris application containers.
390 412
 type Solaris struct {
391 413
 	// SMF FMRI which should go "online" before we start the container process.
... ...
@@ -555,12 +597,16 @@ type VMImage struct {
555 555
 type LinuxSeccomp struct {
556 556
 	DefaultAction LinuxSeccompAction `json:"defaultAction"`
557 557
 	Architectures []Arch             `json:"architectures,omitempty"`
558
+	Flags         []LinuxSeccompFlag `json:"flags,omitempty"`
558 559
 	Syscalls      []LinuxSyscall     `json:"syscalls,omitempty"`
559 560
 }
560 561
 
561 562
 // Arch used for additional architectures
562 563
 type Arch string
563 564
 
565
+// LinuxSeccompFlag is a flag to pass to seccomp(2).
566
+type LinuxSeccompFlag string
567
+
564 568
 // Additional architectures permitted to be used for system calls
565 569
 // By default only the native architecture of the kernel is permitted
566 570
 const (
... ...
@@ -594,6 +640,7 @@ const (
594 594
 	ActErrno LinuxSeccompAction = "SCMP_ACT_ERRNO"
595 595
 	ActTrace LinuxSeccompAction = "SCMP_ACT_TRACE"
596 596
 	ActAllow LinuxSeccompAction = "SCMP_ACT_ALLOW"
597
+	ActLog   LinuxSeccompAction = "SCMP_ACT_LOG"
597 598
 )
598 599
 
599 600
 // LinuxSeccompOperator used to match syscall arguments in Seccomp
... ...
@@ -8,10 +8,10 @@ const (
8 8
 	// VersionMinor is for functionality in a backwards-compatible manner
9 9
 	VersionMinor = 0
10 10
 	// VersionPatch is for backwards-compatible bug fixes
11
-	VersionPatch = 1
11
+	VersionPatch = 2
12 12
 
13 13
 	// VersionDev indicates development branch. Releases will be empty string.
14
-	VersionDev = "-dev"
14
+	VersionDev = ""
15 15
 )
16 16
 
17 17
 // Version is the specification version that the package types support.