hashicorp / consul-k8s

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

incorrect IP Address of serverConfigJSON in federation secret #2263

Open judab5ericom opened 1 year ago

judab5ericom commented 1 year ago

Community Note


Overview of the Issue

When setting up Federation in between two kubernetes getting the following error message atacenter" 2023-06-01T10:16:23.455Z [WARN] agent: (WAN) couldn't join: number_of_nodes=0 error= 1 error occurred: * Failed to join 192.0.2.2:8302: dial tcp ->158.101.35.180:443: i/o timeout

2023-06-01T10:16:23.455Z [WARN] agent: Join cluster failed, will retry: cluster=WAN retry_interval=30s

When evaluate the ip address of the peers in the generated secret object the IP address is incorrect,

kubectl get secret -n management federation-consul-federation -o yaml | grep -i serverConfigJson | awk '{ print $2 }' | base64 -d

this is happend only when deploying the helm to an existing namespace , when deploying the helm to new namespace it works fine.

Reproduction Steps

In order to reproduce try deploy the helm chart into a namespace that is allready existing kubectl delete secret -n management federation-consul-federation helm install dc1 hashicorp/consul -f ~/git/Kube-XXX/federation/dev-config-cluster1.yaml -n management kubectl logs -n management federation-consul-server-0 -f

Helm Values: `global: name: federation-consul datacenter: dc1

tls: enabled: true

federation: enabled: true createFederationSecret: true

acls: manageSystemACLs: false createReplicationToken: false

gossipEncryption: autoGenerate: false

connectInject: enabled: true

meshGateway: enabled: true `

Logs

Expected behavior

Expecting to have the IP set properly .

Environment details

Additional Context

david-yu commented 1 year ago

@judab5ericom Which version of Consul K8s are you using? Could you test. with the latest version of patch releases to see if there is an issue?