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
|
# Configure libcluster topology based on environment
|
||||||
if cluster_enabled do
|
if cluster_enabled do
|
||||||
# Use Kubernetes strategy with hostname mode for StatefulSet
|
# Use DNSSRV strategy for StatefulSet clustering
|
||||||
config :libcluster,
|
config :libcluster,
|
||||||
topologies: [
|
topologies: [
|
||||||
k8s: [
|
k8s: [
|
||||||
strategy: Cluster.Strategy.Kubernetes,
|
strategy: Cluster.Strategy.Kubernetes.DNSSRV,
|
||||||
config: [
|
config: [
|
||||||
mode: :hostname,
|
service: "aprs-headless",
|
||||||
kubernetes_node_basename: "aprsme",
|
application_name: "aprsme",
|
||||||
kubernetes_selector: "app=aprs",
|
namespace: "aprs",
|
||||||
kubernetes_namespace: "aprs",
|
|
||||||
polling_interval: 5_000
|
polling_interval: 5_000
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue