Cluster: find peer pods by listing pods, not Endpoints

0d20d9d · Gabe Morell · 2026-10-27 14:00

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

Files changed

modified config/runtime.exs
+6 −0
@@ -85,6 +85,12 @@ if config_env() == :prod do
85 85 strategy: Cluster.Strategy.Kubernetes,
86 86 config: [
87 87 mode: :ip,
88 + # Peers are found by listing *pods* with the selector. The
89 + # default (:endpoints) filters Endpoints objects by it, and
90 + # those carry their Service's labels, not the pods' — so an
91 + # unlabelled headless Service finds nobody, silently. The pods
92 + # carry the label, and the app's Role already lists them.
93 + kubernetes_ip_lookup_mode: :pods,
88 94 # Both keys are required by libcluster 3.5 even in :endpoints
89 95 # lookup mode — it filters endpoints by selector.
90 96 kubernetes_selector: "name=diogramos",

Parents: bebafb9