Switch to Kubernetes strategy with hostname mode for StatefulSet
Based on libcluster documentation, StatefulSets should use the standard Kubernetes strategy with mode: :hostname, not the DNS strategy. This properly discovers pods using their stable hostnames and filters out the current node from connection attempts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
904b555ca2
commit
93397badbd
1 changed files with 6 additions and 5 deletions
|
|
@ -141,15 +141,16 @@ 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 DNS strategy for StatefulSet
|
# Use Kubernetes strategy with hostname mode for StatefulSet
|
||||||
config :libcluster,
|
config :libcluster,
|
||||||
topologies: [
|
topologies: [
|
||||||
k8s: [
|
k8s: [
|
||||||
strategy: Cluster.Strategy.Kubernetes.DNS,
|
strategy: Cluster.Strategy.Kubernetes,
|
||||||
config: [
|
config: [
|
||||||
service: "aprs-headless",
|
mode: :hostname,
|
||||||
application_name: "aprsme",
|
kubernetes_node_basename: "aprsme",
|
||||||
namespace: "aprs",
|
kubernetes_selector: "app=aprs",
|
||||||
|
kubernetes_namespace: "aprs",
|
||||||
polling_interval: 5_000
|
polling_interval: 5_000
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue