Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 177 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,29 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"

[[package]]
name = "aws-lc-rs"
version = "1.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c953fe1ba023e6b7730c0d4b031d06f267f23a46167dcbd40316644b10a17ba"
dependencies = [
"aws-lc-sys",
"zeroize",
]

[[package]]
name = "aws-lc-sys"
version = "0.30.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbfd150b5dbdb988bcc8fb1fe787eb6b7ee6180ca24da683b61ea5405f3d43ff"
dependencies = [
"bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
]

[[package]]
name = "axum"
version = "0.7.9"
Expand Down Expand Up @@ -208,6 +231,29 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"

[[package]]
name = "bindgen"
version = "0.69.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
dependencies = [
"bitflags",
"cexpr",
"clang-sys",
"itertools 0.12.1",
"lazy_static",
"lazycell",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
"syn",
"which",
]

[[package]]
name = "bitflags"
version = "2.9.1"
Expand Down Expand Up @@ -247,9 +293,20 @@ version = "1.2.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2"
dependencies = [
"jobserver",
"libc",
"shlex",
]

[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom",
]

[[package]]
name = "cfg-if"
version = "1.0.1"
Expand All @@ -269,6 +326,17 @@ dependencies = [
"windows-link",
]

[[package]]
name = "clang-sys"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
"libloading",
]

[[package]]
name = "clap"
version = "4.5.42"
Expand Down Expand Up @@ -307,6 +375,15 @@ version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"

[[package]]
name = "cmake"
version = "0.1.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
dependencies = [
"cc",
]

[[package]]
name = "concurrent-queue"
version = "2.5.0"
Expand Down Expand Up @@ -464,6 +541,12 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6add3b8cff394282be81f3fc1a0605db594ed69890078ca6e2cab1c408bcf04"

[[package]]
name = "dunce"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"

[[package]]
name = "dyn-clone"
version = "1.0.20"
Expand Down Expand Up @@ -587,6 +670,12 @@ dependencies = [
"percent-encoding",
]

[[package]]
name = "fs_extra"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"

[[package]]
name = "futures"
version = "0.3.31"
Expand Down Expand Up @@ -720,6 +809,12 @@ version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"

[[package]]
name = "glob"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"

[[package]]
name = "gloo-timers"
version = "0.3.0"
Expand Down Expand Up @@ -1059,6 +1154,15 @@ dependencies = [
"serde",
]

[[package]]
name = "itertools"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
"either",
]

[[package]]
name = "itertools"
version = "0.14.0"
Expand Down Expand Up @@ -1094,6 +1198,15 @@ dependencies = [
"libc",
]

[[package]]
name = "jobserver"
version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
dependencies = [
"libc",
]

[[package]]
name = "js-sys"
version = "0.3.69"
Expand Down Expand Up @@ -1336,12 +1449,28 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"

[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"

[[package]]
name = "libc"
version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"

[[package]]
name = "libloading"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
"windows-targets",
]

[[package]]
name = "linked-hash-map"
version = "0.5.6"
Expand All @@ -1364,6 +1493,7 @@ dependencies = [
"anyhow",
"jemallocator",
"linkerd-policy-controller-runtime",
"rustls",
"tokio",
]

Expand Down Expand Up @@ -1600,6 +1730,12 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"

[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"

[[package]]
name = "miniz_oxide"
version = "0.8.9"
Expand All @@ -1620,6 +1756,16 @@ dependencies = [
"windows-sys 0.59.0",
]

[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]

[[package]]
name = "nu-ansi-term"
version = "0.46.0"
Expand Down Expand Up @@ -1859,6 +2005,16 @@ dependencies = [
"zerocopy 0.7.35",
]

[[package]]
name = "prettyplease"
version = "0.2.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a"
dependencies = [
"proc-macro2",
"syn",
]

[[package]]
name = "proc-macro2"
version = "1.0.95"
Expand Down Expand Up @@ -1930,7 +2086,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d"
dependencies = [
"anyhow",
"itertools",
"itertools 0.14.0",
"proc-macro2",
"quote",
"syn",
Expand Down Expand Up @@ -2093,6 +2249,12 @@ version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"

[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"

[[package]]
name = "rustix"
version = "0.38.38"
Expand All @@ -2112,6 +2274,7 @@ version = "0.23.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc"
dependencies = [
"aws-lc-rs",
"log",
"once_cell",
"ring",
Expand Down Expand Up @@ -2170,6 +2333,7 @@ version = "0.103.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc"
dependencies = [
"aws-lc-rs",
"ring",
"rustls-pki-types",
"untrusted",
Expand Down Expand Up @@ -2935,6 +3099,18 @@ version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"

[[package]]
name = "which"
version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
"home",
"once_cell",
"rustix",
]

[[package]]
name = "winapi"
version = "0.3.9"
Expand Down
5 changes: 5 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ exceptions = [
"MIT",
"OpenSSL",
], name = "ring", version = "*" },
{ allow = [
"ISC",
"MIT",
"OpenSSL",
], name = "aws-lc-sys", version = "*" },
]

[[licenses.clarify]]
Expand Down
4 changes: 3 additions & 1 deletion policy-controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ license = "Apache-2.0"
publish = false

[features]
default = ["linkerd-policy-controller-runtime/rustls-tls"]
default = ["rustls-tls"]
openssl-tls = ["linkerd-policy-controller-runtime/openssl-tls"]
# Vendor openssl to statically link lib
openssl-vendored = ["linkerd-policy-controller-runtime/openssl-vendored"]
rustls-tls = ["linkerd-policy-controller-runtime/rustls-tls", "dep:rustls", "rustls/aws-lc-rs"]

[dependencies]
anyhow = "1"
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread"] }
rustls = { version = "0.23.29", default-features = false, optional = true }

[dependencies.linkerd-policy-controller-runtime]
workspace = true
Expand Down
6 changes: 6 additions & 0 deletions policy-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ ENV CARGO="cargo auditable"
RUN --mount=type=cache,target=/usr/local/cargo/registry \
just-cargo fetch
ARG TARGETARCH
# Install cross compiler toolchains
RUN case "$TARGETARCH" in \
amd64) true ;; \
arm64) apt-get -y update && apt-get install --no-install-recommends -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu ;; \
esac && rm -rf /var/lib/apt/lists/*
# Enable tokio runtime metrics
ENV RUSTFLAGS="--cfg tokio_unstable"
ENV AWS_LC_SYS_CFLAGS_aarch64_unknown_linux_gnu='-fuse-ld=/usr/aarch64-linux-gnu/bin/ld'
RUN --mount=type=cache,target=target \
--mount=type=cache,target=/usr/local/cargo/registry \
target=$(case "$TARGETARCH" in \
Expand Down
10 changes: 10 additions & 0 deletions policy-controller/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
#[cfg(feature = "rustls-tls")]
{
if rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.is_err()
{
anyhow::bail!("No other crypto provider should be installed yet");
}
}

linkerd_policy_controller_runtime::Args::parse_and_run().await
}
2 changes: 1 addition & 1 deletion policy-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ linkerd-policy-controller-grpc = { path = "../policy-controller/grpc" }
[dependencies.kube]
workspace = true
default-features = false
features = ["client", "openssl-tls", "runtime", "ws"]
features = ["client", "rustls-tls", "aws-lc-rs", "runtime", "ws"]

[dependencies.linkerd2-proxy-api]
workspace = true
Expand Down