hashicorp / consul-k8s

First-class support for Consul Service Mesh on Kubernetes
https://www.consul.io/docs/k8s
Mozilla Public License 2.0
668 stars 321 forks source link

helm:Federation failed in IPv6-only Kubernetes cluster #646

Open OpenetCK opened 3 years ago

OpenetCK commented 3 years ago

Community Note


Overview of the Issue

In the IPv6-only cluster, the HOST_IP is resolved to for example fc00:f853:ccd:e793::2.

Components such as mesh-gateway, connect-injector-webhook are not working because the environment variable of the containers mapped to the following:

          env:
            - name: CONSUL_HTTP_ADDR
              value: https://$(HOST_IP):8501

This leads to the error during the Consul startup:

Invalid Consul HTTP address: address fc00:f853:ccd:e793::2:8501: too many colons in address

Should it render to https://[$(HOST_IP)]:8501 with the bracket on the HOST_IP if it is installed in the IPv6 only cluster

Reproduction Steps

Install via Consul Helm chart in a IPv6 only cluster with federation enabled. For example the values file below are used

global:
  tls:
    enabled: true

  federation:
    enabled: true
    createFederationSecret: true

  acls:
    manageSystemACLs: true
    createReplicationToken: true

  gossipEncryption:
    secretName: consul-gossip-encryption-key
    secretKey: key

connectInject:
  enabled: true

meshGateway:
  enabled: true
  replicas: 1

Logs

Invalid Consul HTTP address: address fc00:f853:ccd:e793::2:8501: too many colons in address

Expected behavior

Able to install Consul in IPv6-only cluster

Environment details

thisisnotashwin commented 3 years ago

Hey @OpenetCK, thanks for opening this issue. We are aware of the issue as it has been raised previously here: https://github.com/hashicorp/consul-helm/issues/798

We are currently working on prioritizing this and should have a fix for it in the near future. We appreciate your patience.