AmadeusITGroup / Redis-Operator

Redis Operator creates/configures/manages Redis clusters atop Kubernetes
MIT License
167 stars 62 forks source link

GetMyIP returns incorrect IP when multiple interfaces are present. #37

Closed mtomwing closed 5 years ago

mtomwing commented 5 years ago

In our setup, Pods might have more than one non-loopback interface. If the interfaces are ordered such that the interface containing the Pod IP is not first, then GetMyIP will not return the Pod IP address.

clamoriniere1A commented 5 years ago

Hi @mtomwing,

thanks for reporting this issue, I will investigate it.

A possible solution is to introduce a new redisnode parameter '--ip" and the Pod Downward API, in order to set the pod ip properly

mtomwing commented 5 years ago

Seems like a reasonable solution :)