Commit Graph

384 Commits

Author SHA1 Message Date
Akihiro Suda
66aab638da
Merge pull request #8989 from dmcgowan/add-image-delete-target
Add image delete target
2023-10-05 10:53:57 -07:00
Bryant Biggs
42eee8bf05 fix: Add containerd to the message type reference
Signed-off-by: Bryant Biggs <bryantbiggs@gmail.com>
2023-09-20 16:32:05 -04:00
Derek McGowan
f8fb2dad39
api: update image service to support target in delete request
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-19 17:17:16 -07:00
Sebastiaan van Stijn
e916d77c81
platforms: move ToProto, FromProto to api/types
These utilities resulted in the platforms package to have the containerd
API as dependency. As this package is used in many parts of the code, as
well as external consumers, we should try to keep it light on dependencies,
with the potential to make it a standalone module.

These utilities were added in f3b7436b61,
which has not yet been included in a release, so skipping deprecation
and aliases for these.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-13 16:44:52 +02:00
Danny Canter
939ccbed42 Sandbox: Add annotations to CreateSandbox surface
An oft employed scheme for a lot of our APIs is to include an
annotations field which is just a map of string to string. This
usually allows folks using the API to send over metadata or auxiliary
information without needing to get a new field added (especially where
the field might not make sense for it to be a standalone field). I think
having annotations for CreateSandbox make sense for this same use case.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-08-12 01:39:29 -07:00
Akihiro Suda
5dedb6d0d2
archive: use 1970-01-01 as the whiteout timestamp
The whiteout timestamps are no longer set to the source date epoch.
The source date epoch still applies to non-whiteout files.

Discussion happened in moby/buildkit PR 3560.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-06-30 11:30:01 +09:00
Danny Canter
d278d37caa Sandbox: Add Metrics rpc for controller
As a follow up change to adding a SandboxMetrics rpc to the core
sandbox service, the controller needed a corresponding rpc for CRI
and others to eventually implement.

This leaves the CRI (non-shim mode) controller unimplemented just to
have a change with the API addition to start.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-13 00:24:09 -07:00
Danny Canter
d56722ef2a Sandbox: Add SandboxMetrics rpc
To gather metrics/stats about a specific sandbox instance, it'd be nice to
have a dedicated rpc for this. Due to the same "what kind of stats are going
to be returned" dilemma exists for sandboxes as well, I've re-used the metrics
type we have as the data field is just an `any`, leaving the metrics returned
entirely up to the shim author. For CRI usecases this will just be cgroup and
windows stats as that's all that's supported right now.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-06-12 03:30:48 -07:00
Maksym Pavlenko
65906335bf Add sandbox events protos
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-30 13:54:35 -07:00
Iceber Gu
0bbca7f1bc Cleanup protobuild config
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-22 13:28:41 +08:00
Maksym Pavlenko
48a1350658
Merge pull request #8149 from Burning1020/sb-netns
sandbox: create sandbox with network namespace path
2023-03-08 14:22:00 -08:00
Zhang Tianyang
5144ba9c49 sandbox: create sandbox with network namespace path
Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
2023-03-08 18:54:14 +08:00
Derek McGowan
e2283edefb
[transfer] update export API types
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-03-02 09:04:29 -08:00
Jian Zeng
b9d7eae1ad
feat(api): add fields to ImageExportStream
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2023-03-02 09:01:53 -08:00
Akihiro Suda
4e2eb8ba4e
Merge pull request #7964 from dmcgowan/transfer-image-store-references
[transfer] update imagestore interface to support multiple references
2023-02-14 11:22:27 +09:00
Derek McGowan
081601f521
Update imagestore interface to support multiple references
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-02-13 13:58:33 -08:00
Akihiro Suda
b61988670c
go.mod: github.com/containerd/typeurl/v2 v2.1.0
Changes: https://github.com/containerd/typeurl/compare/7f6e6d160d67...v2.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-02-11 23:39:52 +09:00
Derek McGowan
2717685dad
Refactor sandbox controller interface
Update the sandbox controller interface to use local types rather than
using the API types.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-02-06 21:39:30 -08:00
Maksym Pavlenko
d1cd9757eb Generate GRPC for runtime task service
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-02 09:58:43 -08:00
Maksym Pavlenko
86c238c873 Generate GRPC for runtime sandbox API
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-02-02 09:58:43 -08:00
Maksym Pavlenko
1c1d8fb057 Update OCI spec tests for generic platform
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Maksym Pavlenko
f318e5630b Update sandbox API to return target platform
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-01-11 13:03:59 -08:00
Fu Wei
12f30e6524
Merge pull request #7792 from mxpv/sb-shutdown 2022-12-15 13:37:35 +08:00
Akihiro Suda
75b09ac4a7
images: support specifying SourceDateEpoch via ctx
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-12-12 09:02:35 +09:00
Maksym Pavlenko
d65269fda0 Add sandbox shutdown API
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-12-09 09:41:42 -08:00
Derek McGowan
51195ad099
Merge pull request #7731 from mxpv/cri
[Sandbox API] CRI status cleanup
2022-12-01 13:43:13 -08:00
Derek McGowan
fc2754204f
Cleanup code comments and lint fixes
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 16:02:09 -08:00
Derek McGowan
52341a2343
Update export API types
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:57 -08:00
Derek McGowan
66dc4d1069
Update API for import types
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:56 -08:00
Derek McGowan
28ea754565
Regenerated protobuf files with updated version
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:55 -08:00
Derek McGowan
2a8d7a744b
Update transfer API
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:53 -08:00
Derek McGowan
d1627e3c71
Add basic import and export handlers
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:53 -08:00
Derek McGowan
adfaeeff0d
Add binary stream functionality and helpers
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:53 -08:00
Derek McGowan
f61ed7e943
Transfer API types
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:00 -08:00
Derek McGowan
a24ea31c2d
Add transfer API
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:56:00 -08:00
Derek McGowan
dcf5687cab
Add streaming service
Adds a service capable of streaming Any objects bi-directionally.
This can be used by services to send data, received data, or to
initiate requests from server to client.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-11-30 12:55:56 -08:00
Maksym Pavlenko
a6d1d53cc2 [sandbox] Update Controller.Status protos
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-11-28 10:13:37 -08:00
Akihiro Suda
661aaae3bb
introspection: expose the daemon's PID and PIDNS
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-18 17:14:26 +09:00
Maksym Pavlenko
b7d0d12715 Cleanup sandbox interfaces
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-10-25 12:31:32 -04:00
Akihiro Suda
70fbedc217
archive: add WithSourceDateEpoch() for whiteouts
This makes diff archives to be reproducible.

The value is expected to be passed from CLI applications via the $SOUCE_DATE_EPOCH env var.

See https://reproducible-builds.org/docs/source-date-epoch/
for the $SOURCE_DATE_EPOCH specification.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-10-08 08:45:03 +09:00
Maksym Pavlenko
68bae258a3 Update protobuf definitions
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 19:28:58 -07:00
Maksym Pavlenko
ea66130295 Switch to Go 1.19
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 18:05:44 -07:00
Maksym Pavlenko
aa3303b697 Update sandbox protobuf to match CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-29 16:08:07 -07:00
Maksym Pavlenko
8823224174 Update controller's start response to incldue pid and labels
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-29 16:08:07 -07:00
Brian Goff
f5fb2c32d2 Regenerate protos with updated protoc-gen-go
This fixes CI issues

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-07-28 16:59:30 +00:00
Derek McGowan
4ac1031e0c
Add snapshotter key to snapshot events
Consumers of snapshot events require the snapshotter
field to refer to the related snapshot.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-06-20 18:25:53 -07:00
Kazuyoshi Kato
29b9379560 make protos
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-27 21:31:16 +00:00
Kazuyoshi Kato
fcba486366 Remove gogo from .proto files
While gogo isn't actually used, it is still referenced from .proto files
and its corresponding Go package is imported from the auto-generated
files.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-27 20:27:55 +00:00
Kazuyoshi Kato
9dbe000a38 make protos
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:31:53 +00:00
Kazuyoshi Kato
fd37cc75be Use protoc-gen-go instead of protoc-gen-gogoctrd
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:31:53 +00:00