Use DNSSRV strategy for StatefulSet clustering

Switch to Kubernetes.DNSSRV strategy which is specifically designed
for StatefulSets and uses DNS SRV records for node discovery.

This strategy:
- Doesn't require Kubernetes API permissions (no RBAC needed)
- Automatically filters out the current node
- Works with StatefulSet stable DNS names
- Uses SRV records from the headless service

🤖 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:37:37 -05:00
parent 93397badbd
commit 777acc2700
No known key found for this signature in database

View file

@ -141,16 +141,15 @@ if config_env() == :prod do
# Configure libcluster topology based on environment
if cluster_enabled do
# Use Kubernetes strategy with hostname mode for StatefulSet
# Use DNSSRV strategy for StatefulSet clustering
config :libcluster,
topologies: [
k8s: [
strategy: Cluster.Strategy.Kubernetes,
strategy: Cluster.Strategy.Kubernetes.DNSSRV,
config: [
mode: :hostname,
kubernetes_node_basename: "aprsme",
kubernetes_selector: "app=aprs",
kubernetes_namespace: "aprs",
service: "aprs-headless",
application_name: "aprsme",
namespace: "aprs",
polling_interval: 5_000
]
]