Skip to content

Commit 9d42711

Browse files
committed
Use aws-lc-rs feature in rusttls
Signed-off-by: Erick Bourgeois <erick@jeb.ca>
1 parent c720dde commit 9d42711

3 files changed

Lines changed: 94 additions & 2 deletions

File tree

.claude/CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,36 @@ The format is based on the regulated environment requirements:
99

1010
---
1111

12+
## [2026-06-26 10:00] - Switch rustls crypto provider ring -> aws-lc-rs (fixes mTLS to k0smotron-hosted control planes)
13+
14+
**Author:** Erick Bourgeois
15+
16+
### Changed
17+
- `Cargo.toml`: `kube` now uses `default-features = false` + `["…, "rustls-tls", "aws-lc-rs"]`
18+
instead of the default that pulls the `ring` crypto provider. `ring` leaves the lock; the
19+
rustls TLS stack now runs on aws-lc-rs (BoringSSL-derived). 682 lib tests pass, fmt/clippy clean.
20+
21+
### Why
22+
5-Spot's child client could not complete the mTLS TLS-1.3 handshake against a k0smotron-hosted
23+
control plane — it stalled after the client-certificate step and timed out
24+
(`client error (Connect) -> deadline has elapsed`), so node taints/drains never happened on the
25+
hosted-CP tier. Proven on a live cluster that `curl --cert/--key` (OpenSSL) and `client-go`
26+
(kubelet/kubectl) complete the *identical* handshake to the *same* endpoint in ~13ms, while
27+
kube-rs/rustls-with-`ring` hangs (captured via `rustls=trace`). aws-lc-rs shares OpenSSL/BoringSSL's
28+
crypto lineage, so it behaves like the clients that work.
29+
30+
### Build note
31+
CI builds **natively per arch** (`ubuntu-24.04` + `ubuntu-24.04-arm`, plain `cargo build --release`),
32+
so aws-lc-rs compiles natively (cmake + cc, present on GitHub runners) — no cross-toolchain and no
33+
OpenSSL runtime lib in the distroless image, i.e. it avoids the cross-compile problem that motivated
34+
`ring` in the first place.
35+
36+
### Impact
37+
- [ ] Breaking change
38+
- [x] Requires cluster rollout
39+
- [ ] Config change only
40+
- [ ] Documentation only
41+
1242
## [2026-06-24 11:30] - Name the HTTP status codes used in API-error matching (no magic 404/409/429)
1343

1444
**Author:** Erick Bourgeois

Cargo.lock

Lines changed: 57 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ path = "src/bin/spot_schedule_capital_markets.rs"
4545
# Controller. The feature is "unstable" in the SemVer sense (the API
4646
# may change between minor kube-runtime versions) but is the canonical
4747
# way to push external triggers into the controller loop.
48-
kube = { version = "3.1", features = ["runtime", "derive", "client", "ws", "unstable-runtime"] }
48+
# TLS: use rustls with the aws-lc-rs crypto provider (BoringSSL-derived) instead of the
49+
# `ring` provider kube pulls by default. `ring` cannot complete the mTLS TLS-1.3 handshake
50+
# against a k0smotron-hosted control plane (it stalls after the client cert step), whereas
51+
# aws-lc-rs — same crypto lineage as OpenSSL/BoringSSL, which client-go and curl use
52+
# successfully against that exact endpoint — does. default-features=false drops the default
53+
# `ring`; we re-add `client` + `rustls-tls` explicitly alongside `aws-lc-rs`.
54+
kube = { version = "3.1", default-features = false, features = ["runtime", "derive", "client", "ws", "unstable-runtime", "rustls-tls", "aws-lc-rs"] }
4955
kube-lease-manager = "0.11"
5056
k8s-openapi = { version = "0.27", features = ["latest", "schemars"] }
5157
tokio = { version = "1", features = ["full"] }

0 commit comments

Comments
 (0)