forked from kata-containers/kata-containers
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libs/types: add kata-types crate under src/libs
Add kata-types crate to host constants and data types shared by multiple Kata Containers components. Fixes: kata-containers#3305 Signed-off-by: Liu Jiang <gerry@linux.alibaba.com> Signed-off-by: Fupan Li <lifupan@gmail.com> Signed-off-by: Huamin Tang <huamin.thm@alibaba-inc.com> Signed-off-by: Lei Wang <wllenyj@linux.alibaba.com> Signed-off-by: yanlei <yl.on.the.way@gmail.com>
- Loading branch information
Showing
13 changed files
with
593 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[workspace] | ||
members = [ | ||
"logging", | ||
"kata-types", | ||
] | ||
resolver = "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "kata-types" | ||
version = "0.1.0" | ||
description = "Constants and data types shared by Kata Containers components" | ||
keywords = ["kata", "container", "runtime"] | ||
authors = ["The Kata Containers community <kata-dev@lists.katacontainers.io>"] | ||
repository = "https://github.com/kata-containers/kata-containers.git" | ||
homepage = "https://katacontainers.io/" | ||
readme = "README.md" | ||
license = "Apache-2.0" | ||
edition = "2018" | ||
|
||
[dependencies] | ||
serde = { version = "1.0.100", features = ["derive"] } | ||
thiserror = "1.0" | ||
|
||
oci = { path = "../../agent/oci" } | ||
|
||
[dev-dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# kata-types | ||
|
||
This crate is a collection of constants and data types shared by multiple | ||
[Kata Containers](https://github.com/kata-containers/kata-containers/) components. | ||
|
||
It defines constants and data types used by multiple Kata Containers components. Those constants | ||
and data types may be defined by Kata Containers or by other projects/specifications, such as: | ||
- [Containerd](https://github.com/containerd/containerd) | ||
- [Kubelet](https://github.com/kubernetes/kubelet) | ||
|
||
## Support | ||
|
||
**Operating Systems**: | ||
- Linux | ||
|
||
## License | ||
|
||
This code is licensed under [Apache-2.0](../../../LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2019 Alibaba Cloud | ||
// Copyright (c) 2019 Ant Group | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#![allow(missing_docs)] | ||
|
||
pub const CONTAINER_TYPE_LABEL_KEY: &str = "io.kubernetes.cri.container-type"; | ||
pub const SANDBOX: &str = "sandbox"; | ||
pub const CONTAINER: &str = "container"; | ||
|
||
pub const SANDBOX_ID_LABEL_KEY: &str = "io.kubernetes.cri.sandbox-id"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2019 Alibaba Cloud | ||
// Copyright (c) 2019 Ant Group | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#![allow(missing_docs)] | ||
|
||
pub const CONTAINER_TYPE_LABEL_KEY: &str = "io.kubernetes.cri.container-type"; | ||
pub const SANDBOX: &str = "sandbox"; | ||
pub const CONTAINER: &str = "container"; | ||
|
||
pub const SANDBOX_ID_LABEL_KEY: &str = "io.kubernetes.cri-o.SandboxID"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2019 Alibaba Cloud | ||
// Copyright (c) 2019 Ant Group | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#![allow(missing_docs)] | ||
|
||
pub const CONTAINER_TYPE_LABEL_KEY: &str = "io.kubernetes.docker.type"; | ||
pub const SANDBOX: &str = "podsandbox"; | ||
pub const CONTAINER: &str = "container"; | ||
|
||
pub const SANDBOX_ID_LABEL_KEY: &str = "io.kubernetes.sandbox.id"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) 2019 Alibaba Cloud | ||
// Copyright (c) 2019 Ant Group | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
/// CRI-containerd specific annotations. | ||
pub mod cri_containerd; | ||
|
||
/// CRI-O specific annotations. | ||
pub mod crio; | ||
|
||
/// Dockershim specific annotations. | ||
pub mod dockershim; |
Oops, something went wrong.