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:
parent
93397badbd
commit
777acc2700
1 changed files with 5 additions and 6 deletions
|
|
@ -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
|
||||
]
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue