Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(ingestion-consumer): install rustls CryptoProvider for kube discovery (#65743)

José Sequeirac3eb0b56dda8
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index 7941e7b92ea4..21650847e6bb 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -4991,6 +4991,7 @@ dependencies = [
"rand 0.8.5",
"rdkafka",
"reqwest 0.12.28",
+ "rustls 0.23.37",
"serde",
"serde_json",
"thiserror 2.0.18",
diff --git a/rust/ingestion-consumer/Cargo.toml b/rust/ingestion-consumer/Cargo.toml
index fc3118f71c62..a008e7c0490b 100644
--- a/rust/ingestion-consumer/Cargo.toml
+++ b/rust/ingestion-consumer/Cargo.toml
@@ -19,6 +19,10 @@ metrics-exporter-prometheus = { workspace = true }
rand = { workspace = true }
rdkafka = { workspace = true }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
+# Direct dep only to install a process-wide rustls CryptoProvider at startup (see
+# main.rs): kube's HTTPS client uses rustls 0.23, which can't auto-pick a provider
+# with both aws-lc-rs and ring in the tree. Matches personhog-router/cymbal.
+rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
serde = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
diff --git a/rust/ingestion-consumer/src/main.rs b/rust/ingestion-consumer/src/main.rs
index b91062d9bf41..23bbfdc28544 100644
--- a/rust/ingestion-consumer/src/main.rs
+++ b/rust/ingestion-consumer/src/main.rs
@@ -29,6 +29,14 @@ use ingestion_consumer::worker_registry::{WorkerRegistry, WorkerRegistryConfig};
common_alloc::used!();
fn main() -> Result<()> {
+ // Install a process-wide rustls CryptoProvider before any TLS use. kube's
+ // HTTPS client (EndpointSlice discovery) uses rustls 0.23, which can't
+ // auto-pick a provider with both aws-lc-rs and ring compiled in — it panics.
+ // Matches personhog-router / cymbal / kafka-assigner.
+ rustls::crypto::ring::default_provider()
+ .install_default()
+ .expect("failed to install rustls ring CryptoProvider");
+
let config = Config::init_from_env()
.context("Failed to load configuration from environment variables")?;