agent: Create workspace package and dependencies

- Create agent workspace dependencies and packge info
so that the packages in the workspace can use them
- Group the local dependencies together for clarity
(like in #11129)

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman 2025-04-07 13:48:40 +01:00
parent 8df271358e
commit 1bec432ffa

View File

@ -1,23 +1,20 @@
[package] [workspace]
name = "kata-agent" members = ["rustjail", "policy"]
version = "0.1.0"
[workspace.package]
authors = ["The Kata Containers community <kata-dev@lists.katacontainers.io>"] authors = ["The Kata Containers community <kata-dev@lists.katacontainers.io>"]
edition = "2018" edition = "2018"
license = "Apache-2.0" license = "Apache-2.0"
rust-version = "1.80.0"
[dependencies] [workspace.dependencies]
runtime-spec = { path = "../libs/runtime-spec" }
mem-agent = { path = "../mem-agent" }
oci-spec = { version = "0.6.8", features = ["runtime"] } oci-spec = { version = "0.6.8", features = ["runtime"] }
rustjail = { path = "rustjail" }
protocols = { path = "../libs/protocols", features = ["async", "with-serde"] }
lazy_static = "1.3.0" lazy_static = "1.3.0"
ttrpc = { version = "0.8.4", features = ["async"], default-features = false } ttrpc = { version = "0.8.4", features = ["async"], default-features = false }
protobuf = "=3.7.1" protobuf = "=3.7.1"
libc = "0.2.58" libc = "0.2.58"
nix = "0.24.2" nix = "0.24.2"
capctl = "0.2.0" capctl = "0.2.0"
serde_json = "1.0.39"
scan_fmt = "0.2.3" scan_fmt = "0.2.3"
scopeguard = "1.0.0" scopeguard = "1.0.0"
thiserror = "1.0.26" thiserror = "1.0.26"
@ -25,9 +22,6 @@ regex = "1.10.5"
serial_test = "0.5.1" serial_test = "0.5.1"
url = "2.5.0" url = "2.5.0"
derivative = "2.2.0" derivative = "2.2.0"
kata-sys-util = { path = "../libs/kata-sys-util" }
kata-types = { path = "../libs/kata-types" }
safe-path = { path = "../libs/safe-path" }
const_format = "0.2.30" const_format = "0.2.30"
# Async helpers # Async helpers
@ -45,9 +39,7 @@ netlink-packet-route = "0.19.0"
netlink-packet-core = "0.7.0" netlink-packet-core = "0.7.0"
ipnetwork = "0.17.0" ipnetwork = "0.17.0"
# Note: this crate sets the slog 'max_*' features which allows the log level
# to be modified at runtime.
logging = { path = "../libs/logging" }
slog = "2.5.2" slog = "2.5.2"
slog-scope = "4.1.2" slog-scope = "4.1.2"
slog-term = "2.9.0" slog-term = "2.9.0"
@ -69,31 +61,134 @@ tracing = "0.1.26"
tracing-subscriber = "0.2.18" tracing-subscriber = "0.2.18"
tracing-opentelemetry = "0.13.0" tracing-opentelemetry = "0.13.0"
opentelemetry = { version = "0.14.0", features = ["rt-tokio-current-thread"] } opentelemetry = { version = "0.14.0", features = ["rt-tokio-current-thread"] }
vsock-exporter = { path = "vsock-exporter" }
# Configuration # Configuration
serde = { version = "1.0.129", features = ["derive"] } serde = { version = "1.0.129", features = ["derive"] }
serde_json = "1.0.39"
toml = "0.5.8" toml = "0.5.8"
clap = { version = "3.0.1", features = ["derive"] } clap = { version = "3.0.1", features = ["derive"] }
strum = "0.26.2" strum = "0.26.2"
strum_macros = "0.26.2" strum_macros = "0.26.2"
tempfile = "3.1.0"
which = "4.3.0"
rstest = "0.18.0"
async-std = { version = "1.12.0", features = ["attributes"] }
# Local dependencies
kata-agent-policy = { path = "policy" }
rustjail = { path = "rustjail" }
vsock-exporter = { path = "vsock-exporter" }
mem-agent = { path = "../mem-agent" }
kata-sys-util = { path = "../libs/kata-sys-util" }
kata-types = { path = "../libs/kata-types" }
# Note: this crate sets the slog 'max_*' features which allows the log level
# to be modified at runtime.
logging = { path = "../libs/logging" }
protocols = { path = "../libs/protocols" }
runtime-spec = { path = "../libs/runtime-spec" }
safe-path = { path = "../libs/safe-path" }
test-utils = { path = "../libs/test-utils" }
[package]
name = "kata-agent"
version = "0.1.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
[dependencies]
oci-spec.workspace = true
lazy_static.workspace = true
ttrpc.workspace = true
protobuf.workspace = true
libc.workspace = true
nix.workspace = true
capctl.workspace = true
serde_json.workspace = true
scan_fmt.workspace = true
scopeguard.workspace = true
thiserror.workspace = true
regex.workspace = true
serial_test.workspace = true
url.workspace = true
derivative.workspace = true
const_format.workspace = true
# Async helpers
async-trait.workspace = true
async-recursion.workspace = true
futures.workspace = true
# Async runtime
tokio.workspace = true
tokio-vsock.workspace = true
netlink-sys.workspace = true
rtnetlink.workspace = true
netlink-packet-route.workspace = true
netlink-packet-core.workspace = true
ipnetwork.workspace = true
slog.workspace = true
slog-scope.workspace = true
slog-term.workspace = true
# Redirect ttrpc log calls
slog-stdlog.workspace = true
log.workspace = true
cfg-if.workspace = true
prometheus.workspace = true
procfs.workspace = true
anyhow.workspace = true
cgroups.workspace = true
# Tracing
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-opentelemetry.workspace = true
opentelemetry.workspace = true
# Configuration
serde.workspace = true
toml.workspace = true
clap.workspace = true
strum.workspace = true
strum_macros.workspace = true
# Image pull/decrypt # Image pull/decrypt
image-rs = { git = "https://github.com/confidential-containers/guest-components", rev = "1191f8257eb65f42892ab0328cec02e58d40de84", default-features = false, optional = true } image-rs = { git = "https://github.com/confidential-containers/guest-components", rev = "1191f8257eb65f42892ab0328cec02e58d40de84", default-features = false, optional = true }
# Agent Policy # Agent Policy
cdi = { git = "https://github.com/cncf-tags/container-device-interface-rs", rev = "fba5677a8e7cc962fc6e495fcec98d7d765e332a" } cdi = { git = "https://github.com/cncf-tags/container-device-interface-rs", rev = "fba5677a8e7cc962fc6e495fcec98d7d765e332a" }
kata-agent-policy = { path = "policy", optional = true }
# Local dependencies
kata-agent-policy = { workspace = true, optional = true }
mem-agent.workspace = true
rustjail.workspace = true
protocols = { workspace = true, features = ["async", "with-serde"] }
kata-sys-util.workspace = true
kata-types.workspace = true
runtime-spec.workspace = true
safe-path.workspace = true
# Note: this crate sets the slog 'max_*' features which allows the log level
# to be modified at runtime.
logging.workspace = true
vsock-exporter.workspace = true
[dev-dependencies] [dev-dependencies]
tempfile = "3.1.0" tempfile.workspace = true
test-utils = { path = "../libs/test-utils" } which.workspace = true
which = "4.3.0" rstest.workspace = true
rstest = "0.18.0" async-std.workspace = true
async-std = { version = "1.12.0", features = ["attributes"] }
[workspace] test-utils.workspace = true
members = ["rustjail", "policy"]
[profile.release] [profile.release]
lto = true lto = true
@ -103,7 +198,7 @@ lto = true
default-pull = [] default-pull = []
seccomp = ["rustjail/seccomp"] seccomp = ["rustjail/seccomp"]
standard-oci-runtime = ["rustjail/standard-oci-runtime"] standard-oci-runtime = ["rustjail/standard-oci-runtime"]
agent-policy = [ "kata-agent-policy" ] agent-policy = ["kata-agent-policy"]
guest-pull = ["image-rs/kata-cc-rustls-tls"] guest-pull = ["image-rs/kata-cc-rustls-tls"]
[[bin]] [[bin]]