Skip to content

[chart/redis-ha][BUG] Generated haproxy backend config is not IPv6-safe (start-time-only resolution, no resolvers, unbracketed addresses) #420

Description

@aqeelat

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:

  1. The resolved address can be IPv6, and server <unbracketed-v6>:<port> is invalid HAProxy syntax (requires [addr]:port).
  2. There is no resolvers section, so backends never re-resolve at runtime — announce DNS changes (pod/Service recreation) require a haproxy restart.

To Reproduce.

  1. Dual-stack cluster where announce Service names resolve AAAA (or announce Services converted to IPv6-only).
  2. Default values (sentinel.resolveHostnames: false, sentinel.announceHostnames: false).
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions