Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

Add HA support in Reloader

Open palmerabollo opened this issue 6 years ago • 5 comments

Is it possible to have two replicas running at the same time? I mean, are they able to coordinate so, when a configmap/secret changes, only one of them takes care of reloading the associated deployment/statefulset/etc?

The use case is being able to deploy reloader with HA guarantees in a K8S cluster.

Thanks. This project is really useful.

palmerabollo avatar Oct 31 '19 11:10 palmerabollo

Hi @palmerabollo, you can run multiple instances of reloader at the same time but there will be no coordination between those instances.

aliartiza75 avatar Nov 06 '19 08:11 aliartiza75

Thanks @aliartiza75. That means that your deployment/statefulset/etc can be reloaded as many times as the number of reloader replicas you have, right?

I think that leveraging kubernetes leader-election capabilities would be a nice improvement.

palmerabollo avatar Nov 06 '19 13:11 palmerabollo

yes, @palmerabollo your resources will be reloaded by each instance of reloader but it can cause concurrent modification error.

Thanks for the suggestion I will look at the requested feature.

aliartiza75 avatar Nov 06 '19 13:11 aliartiza75

We would also appreciate this feature 👍🏻

funkypenguin avatar Aug 01 '21 23:08 funkypenguin

A simple leader election implementation would be great: https://itnext.io/leader-election-in-kubernetes-using-client-go-a19cbe7a9a85

utkuozdemir avatar Feb 14 '22 14:02 utkuozdemir

This should be fixed now. Reloader now supports leader election.

faizanahmad055 avatar Jan 05 '23 21:01 faizanahmad055