Cluster: find peer pods by listing pods, not Endpoints

8cfafe0 · Gabriel Morell · 2026-10-27 13:48

2 files +7 -0
Message
{commit_body(@commit)}

Files changed

modified config/runtime.exs
+7 −0
@@ -330,6 +330,13 @@ if config_env() == :prod do
330 330 strategy: Cluster.Strategy.Kubernetes,
331 331 config: [
332 332 mode: :ip,
333 + # Peers are found by listing *pods* with the selector. The
334 + # default (:endpoints) filters Endpoints objects by it, and
335 + # those carry their Service's labels, not the pods' — so
336 + # with an unlabelled headless Service it found nobody, and
337 + # every replica ran alone (PubSub, the L2 cache) without a
338 + # word in the log. The pods carry the label; RBAC lists them.
339 + kubernetes_ip_lookup_mode: :pods,
333 340 kubernetes_selector: selector,
334 341 kubernetes_service_name: service,
335 342 kubernetes_node_basename: basename,

Parents: 5f79844