Cluster: find peer pods by listing pods, not Endpoints

0be2d60 · Gabriel Morell · 2026-10-27 13:52

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

Files changed

modified config/runtime.exs
+7 −0
@@ -159,6 +159,13 @@ if System.get_env("CLUSTER_STRATEGY") == "kubernetes" do
159 159 strategy: Cluster.Strategy.Kubernetes,
160 160 config: [
161 161 mode: :ip,
162 + # Peers are found by listing *pods* with the selector. The
163 + # default (:endpoints) filters Endpoints objects by it, and
164 + # those carry their Service's labels, not the pods' — so with
165 + # an unlabelled headless Service it found nobody and every
166 + # replica ran alone, without a word in the log. The pods
167 + # carry the label; the ircd-cluster Role lists them.
168 + kubernetes_ip_lookup_mode: :pods,
162 169 kubernetes_node_basename: System.get_env("CLUSTER_K8S_APP_NAME", "ircd"),
163 170 kubernetes_selector:
164 171 System.get_env("CLUSTER_K8S_SELECTOR", "app=ircd"),

Parents: c963adb