Switch to Kubernetes.DNS strategy for StatefulSet clustering

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 <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-25 12:23:37 -05:00
parent a53b14aab1
commit 620144164f
No known key found for this signature in database

View file

@ -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
]
]
]