Reloader
Reloader copied to clipboard
Changes during Leader Election
HI, I'm currently testing Reloader and I have a question regarding HA setup and changes during leader election. Right now, my setup is the following:
- A deployment with annotation
secret.reloader.stakater.com/reload: test-secret - A secret named
test-secret - Reloader with following config enabled:
- HA with 3 replicas
ReloadOnCreate: TruesyncAfterRestart: True
This is working normally. I got the pod to restart when updating the secret and on the creation of secret. However, when I delete a reloader leader pod to trigger leader election, and made a change to the secret / add the secret, my deployment pod did not get restarted during or after leader election took place.
However, after leader election, if I make any changes to test-secret, then it is working as normal.
From the README, this is in the ReloadOnCreate section:
If reloadOnCreate is set to true: If you are running Reloader in HA mode all workloads will have a rolling update performed when a new leader is elected.
If ReloadOnCreate is set to false: Updates to configMaps/Secrets that occur while there is no leader will not be picked up by the new leader until a subsequent update of the configmap/secret occurs. In the worst case the window in which there can be no leader is 15s as this is the LeaseDuration.
From my testing, changes during leader election does not get pick up. Is it a bug or am I doing something wrong?
Reloader version is v1.0.28
You need to enable: syncAfterRestart
You need to enable: syncAfterRestart
syncAfterRestart is enabled