[ENHANCE] improve HA by not syncing after restart if a replica was running that becomes leader
The docs state that if reloadOnCreate is set then when a new leader is elected all pods will be restarted. This could be fixed if you re-define HA to have 2 replicas both watching and maintaining internal state about secrets but with only the leader applying changes to trigger restarts. This way, when replica A (leader) dies, replica B (not leader) is still watching, understanding that the secrets haven't changed, such that when replica B becomes leaders it can rely on its state to know it doesn't need to restart the pod because that pod's secrets didn't change.
I know this is a lot more effort than simple leader election to disable one replica B while replica A is the leader, but it is quite disruptive to have to restart all pods just because the reloader leader changed when we did have 2 replicas running.
Anyway, hopefully this is a useful thought because right now you can't really have proper tracking of secrets changes across leaders even if we have multiple replicas running. :-(
Source: stakater/Reloader