Describe the bug.
config-haproxy_init.sh resolves each announce Service DNS name once at container start and seds the raw IP into the generated haproxy.cfg (server Rn <addr>:port, tcp-check expect string REPLACE_ANNOUNCEn). On a dual-stack or IPv6-primary cluster:
- The resolved address can be IPv6, and
server <unbracketed-v6>:<port> is invalid HAProxy syntax (requires [addr]:port).
- There is no
resolvers section, so backends never re-resolve at runtime — announce DNS changes (pod/Service recreation) require a haproxy restart.
To Reproduce.
- Dual-stack cluster where announce Service names resolve AAAA (or announce Services converted to IPv6-only).
- Default values (
sentinel.resolveHostnames: false, sentinel.announceHostnames: false).
- Init script writes
server Rn 2600:…:6379 style lines → invalid config.
Expected behavior.
Generated backend config works regardless of address family: at minimum bracket IPv6 literals (JoinHostPort-style); ideally emit FQDN server lines plus a resolvers section pointing at kube-dns so backends re-resolve at runtime.
Additional context.
The sentinel.{resolveHostnames,announceHostnames} path already produces FQDN server lines — recommending it for dual-stack (or making FQDN+resolvers the default posture) would close this. HAProxy itself supports everything needed (bracketed literals; resolvers with AAAA since 1.8). Reproduce details verified against redis-ha 4.38.0 consumed via argo-cd 10.4.2 on GKE dual-stack. I'm willing to open a PR for this.
Describe the bug.
config-haproxy_init.shresolves each announce Service DNS name once at container start and seds the raw IP into the generatedhaproxy.cfg(server Rn <addr>:port,tcp-check expect string REPLACE_ANNOUNCEn). On a dual-stack or IPv6-primary cluster:server <unbracketed-v6>:<port>is invalid HAProxy syntax (requires[addr]:port).resolverssection, so backends never re-resolve at runtime — announce DNS changes (pod/Service recreation) require a haproxy restart.To Reproduce.
sentinel.resolveHostnames: false,sentinel.announceHostnames: false).server Rn 2600:…:6379style lines → invalid config.Expected behavior.
Generated backend config works regardless of address family: at minimum bracket IPv6 literals (JoinHostPort-style); ideally emit FQDN
serverlines plus aresolverssection pointing at kube-dns so backends re-resolve at runtime.Additional context.
The
sentinel.{resolveHostnames,announceHostnames}path already produces FQDN server lines — recommending it for dual-stack (or making FQDN+resolvers the default posture) would close this. HAProxy itself supports everything needed (bracketed literals; resolvers with AAAA since 1.8). Reproduce details verified against redis-ha 4.38.0 consumed via argo-cd 10.4.2 on GKE dual-stack. I'm willing to open a PR for this.