Commit Graph

30 Commits

Author SHA1 Message Date
Maksym Pavlenko
1918ee4d11 Respect default snapshotter label
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2019-07-10 12:16:43 -07:00
Michael Crosby
41e1bb8328 Fix snapshotter getter in client code
Fixes #3312

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-06-17 16:57:48 +00:00
Derek McGowan
a274dbe822
Fix run with specified platform
Adds the platform flag to the run command and resolves
the image based on that platform.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-05-23 11:59:33 -07:00
Michael Crosby
67b45aef49 Add WithoutRefreshed metadata
Closes #2566

This provides faster lookups and lists for ctr commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-05-10 15:16:14 +00:00
Derek McGowan
2f60e389a0
Merge pull request #2626 from krsoninikhil/defaults3
Uses namespace labels for default options
2019-04-02 11:46:35 -07:00
Eric Hotinger
34f3772956 Allow WithNewSnapshot and WithNewSnapshotView to take in snapshotter options.
Signed-off-by: Eric Hotinger <ehotinger@gmail.com>
2019-03-06 13:22:37 -08:00
Nikhil Soni
6a21728fb6 Use defaults package for listing namespace labels
Labels that are used for configuring defaults are moved to defaults package

Signed-off-by: Nikhil Soni <krsoninikhil@gmail.com>
2019-02-12 01:24:31 +05:30
Nikhil Soni
34323985a1 Use labels only when default namespace is provided and prefer given
options.

Implements same approach of setting defaults for `NewWithConn`.

Signed-off-by: Nikhil Soni <krsoninikhil@gmail.com>
2019-01-30 23:21:24 +05:30
Nikhil Soni
59432aaecf Take default runtime and snapshotter from namespace labels
Signed-off-by: Nikhil Soni <krsoninikhil@gmail.com>
2019-01-30 23:21:24 +05:30
Samuel Karp
607888ce29 ctr: make kill use stop-signal by default
The OCI image specification includes a `StopSignal` field in the image
configuration, denoting the system call signal to be sent to the
container to exit.  This commit adds a new `WithImageStopSignal` container
option that can be used for storing the `StopSignal` field as a label on
the container.  This commit also adjusts `ctr run` to call
`WithImageStopSignal` and `ctr tasks kill` to send the signal stored in
that label by default.

Signed-off-by: Samuel Karp <skarp@amazon.com>
2018-09-27 15:53:38 -07:00
Stephen Day
2a1bd7414b
oci: introduce WithSpecFromFile combinator
We introduce a WithSpecFromFile option combinator to allow creation
simpler creation of OCI specs from a file name. Often used as the first
option in a `SpecOpts` slice, it simplifies choosing between a local
file and the built-in default.

The code in `ctr run` has been updated to use the new option, with out
changing the order of operations or functionality present there.

Signed-off-by: Stephen Day <stephen.day@getcruise.com>
2018-07-27 14:25:42 -07:00
Michael Crosby
62e22a9fe7 Type alias spec in oci package
This allows Go to build third party packages correctly without vendoring
issues what want to create their own SpecOpts.

Fixes #2289

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-05-17 09:18:46 -04:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Daniel Nephin
081f8c7ce0 oci package passing tests
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-27 16:14:43 -05:00
Derek McGowan
dce27d8c62
Remove client use of gc root label
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-11-07 12:54:22 -08:00
Brian Goff
0847ae6cdf Improve error message for WithContainerExtension
The previous error messages are not very descriptive in how to fix the
issue, especially since they come from container create and not when
calling `WithContainerExtensions`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-10-13 13:41:52 -04:00
Derek McGowan
7884707c2f
Add reference labels to snapshots and content
Ensure all snapshots and content are referenced on commit and
protected from cleanup.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-10-11 10:42:47 -07:00
Akim Demaille
8ceeeed4ae style: move definition for consistency
Signed-off-by: Akim Demaille <akim.demaille@docker.com>
2017-10-04 17:02:51 +02:00
Michael Crosby
9e85035f15 Add container update method
This adds an update method to the container interface for the client
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-03 16:59:52 -04:00
Phil Estes
ef5f2025aa Merge pull request #1533 from stevvooe/specifier-default
platforms: provide simpler function for common use
2017-09-20 15:15:12 -04:00
Stephen J Day
9163377123
platforms: provide simpler function for common use
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-20 11:56:59 -07:00
Michael Crosby
d22160c28e Vendor typeurl package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-19 09:43:55 -04:00
Kenfe-Mickaël Laventure
e517952bc7 Merge pull request #1378 from cpuguy83/container_store_extra_data
Add `Container` field to store client-defined data
2017-09-18 07:32:07 -07:00
Derek McGowan
46ded63f2d
Support for multi-arch image unpacking
Resolves the platform on multi-arch manifests during unpack and config resolving.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-09-14 09:32:37 -07:00
Stephen J Day
f7d31e2be4
api, metadata: use map type for Container.Extensions
To allow for updating extensions without collisions, we have moved to
using a map type that can be explicitly selected via the field path for
updates. This ensures that multiple parties can operate on their
extensions without stepping on each other's toes or incurring an
inordinate number of round trips.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-08 19:34:26 -07:00
Brian Goff
3552ce5688 Add field to Container for client-defined data
This field allows a client to store specialized information in the
container metadata rather than having to store this itself and keep
the data in sync with containerd.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-09-07 16:54:47 -04:00
Akihiro Suda
e30e0c8b75
api: RootFS -> SnapshotKey
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-06 15:22:19 -07:00
Kenfe-Mickael Laventure
42b131c1f3
Allow setting runtime options when using WithRuntime()
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-29 10:03:51 -07:00
Stephen J Day
677257f032
service/snapshotter: move default to client
In order to enforce strict handling of snapshotter values on the
container object, the defaults have been moved to the client side. This
ensures that we correctly qualify the snapshotter under use when from
the container at the time it was created, rather than possibly losing
the metadata on a change of default.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-18 14:43:12 -07:00
Kenfe-Mickael Laventure
56b18c1d1f
Move client's options to separate files
This should help in discovering the available options for a given object.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-08-04 13:56:16 -07:00