Closed promzeus closed 2 years ago
https://github.com/spotahome/redis-operator/pull/419 This should ideally fix it, if you have a service looking up the right label. But you would need to take this with a pinch of salt, and these labels are reconcile on a delta time from the actual failover. If you would want some consistent mechanism, you would to subscribe to sentinel failover events, and make appropriate decisions.
You could also look at https://github.com/redis/redis/blob/bed6d759bcb1ddcdab76da1b46a120e2e610036b/sentinel.conf#L270-L278
This issue is stale because it has been open for 45 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I recommend adding the following logic to your code: In case of changing the ip master, we change this ip in the endpoint. I made a working solution on sh, but still, if this functionality was in your operator, it would be much more convenient.
The very idea and logic of work you can see in my helm chart. https://github.com/promzeus/RedisOperator-haproxy-failover The chart also has a haproxy failover that has worked for us for almost a year. But the loads are growing and haproxy is no longer enough, there is no point in discussing its bugs and problems with closing connections, caching, etc.