From 620144164f2ca167d037144958a6f50d283b9b02 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 25 Jul 2025 12:23:37 -0500 Subject: [PATCH] Switch to Kubernetes.DNS strategy for StatefulSet clustering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DNSPoll strategy was attempting to connect to IPs instead of DNS names. Kubernetes.DNS strategy is specifically designed for StatefulSet deployments and will properly discover pods using their stable DNS names. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- config/runtime.exs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 4748f47..519c7f6 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -141,15 +141,16 @@ if config_env() == :prod do # Configure libcluster topology based on environment if cluster_enabled do - # Use DNS-based strategy with proper configuration + # Use Kubernetes DNS strategy for StatefulSet config :libcluster, topologies: [ k8s: [ - strategy: Cluster.Strategy.DNSPoll, + strategy: Cluster.Strategy.Kubernetes.DNS, config: [ - polling_interval: 5_000, - query: "aprs-headless.aprs.svc.cluster.local", - node_basename: "aprsme" + service: "aprs-headless", + application_name: "aprsme", + namespace: "aprs", + polling_interval: 5_000 ] ] ]