AmadeusITGroup / Redis-Operator

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

Redis does not bind to interfaces that are created after initial pod creation. #39

Closed mtomwing closed 5 years ago

mtomwing commented 5 years ago

In our setup, pods will sometimes have extra interfaces added to their network namespaces after creation. Redis is unavailable on these new interfaces because it is bound to a static set of IPs.

https://github.com/AmadeusITGroup/Redis-Operator/blob/master/pkg/redisnode/node.go#L82

Our workaround was to replace that with bind 0.0.0.0.

clamoriniere1A commented 5 years ago

Hi @mtomwing

with the change done in #38 in the file https://github.com/AmadeusITGroup/Redis-Operator/blob/bcb86bf6648f364d7abd884c78ba019e1fe6f948/pkg/utils/network.go#L19 , all IPs seen by the redis-node process at start time should be added in the redis-server config file bind parameter.

But still, it didn't solve the issue that you have with your setup since IPs are added after the start time.

I think that the current restriction (add only IPs available at start time) should be removed by adding only 0.0.0.0 in the bind parameter, as you do in your workaround. Otherwise, it implies to watch network configuration change and send a new configuration command to the redis-server process (that can be done, but much complex).

clamoriniere1A commented 5 years ago

Hi @mtomwing,

40 should allow your specific network setup.

Let me know if it is the case, like this we can close this issue.

Regards.

mtomwing commented 5 years ago

This is working well for us. Thanks @clamoriniere1A!