Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

[Feature Suggestion] Add delay for reloading

Open xzycn opened this issue 3 years ago • 7 comments

Hi, thank you for your great project. I have a scenario:we will update configmap many times in a short time,this leads to that we will see many rolling updates going on one by one. So, can we set a delay time for a reloading? like what receiving many notifications from apiserver in a period of time, but only restart once. Thx in advance :)

xzycn avatar Dec 27 '21 02:12 xzycn

We faced the same issue when doing the initial deployment. If we deploy reloader first, other deployments will be restarted two or more times. If we deploy reloader after all other services got deployed, all services will restart.

I think we should have some delay before the reloader trigger restart.

strainovic avatar Jan 10 '22 13:01 strainovic

Same problem. Initial deployment of apps (with reloader already running in the cluster) causes immediate update of the deployment, causing a new replicaSet. Meanwhile the deployment controller continues to try to rollout the first replicaSet, causing uncomfortable delays in short-lived ephemeral environments.

snarlysodboxer avatar Feb 27 '22 20:02 snarlysodboxer

Same problem. Initial deployment of apps (with reloader already running in the cluster) causes immediate update of the deployment, causing a new replicaSet. Meanwhile the deployment controller continues to try to rollout the first replicaSet, causing uncomfortable delays in short-lived ephemeral environments.

@snarlysodboxer this should be fixed now with the latest version. Please try and update if you still see the issue.

faizanahmad055 avatar Feb 28 '22 08:02 faizanahmad055

Hi @faizanahmad055,

Is it related to reloadOnCreate new variable? Should we set it to true as it is false by default?

strainovic avatar Feb 28 '22 21:02 strainovic

It is set to false by default. You don't have to set it unless you want to reload if there is a new secret/configmap is added. There is a known issue at the moment where if reload on a create event or reload on the new resource is enabled then reloader also tries to reload when the deployment is first time create/deployed. This is because currently there is no way of distinguishing which new resource creation should be taken into account and which should be ignored. But suggestions and contributions are of course welcome :) Please retry with the default properties and let us know if you still face the issue.

faizanahmad055 avatar Feb 28 '22 22:02 faizanahmad055

I'd love such a feature (i remember it being called debounce) to delay execution for X seconds after the last event was detected

nazarewk avatar Apr 01 '22 12:04 nazarewk

@snarlysodboxer this should be fixed now with the latest version. Please try and update if you still see the issue.

@faizanahmad055 You're right, the problem of immediate update of deployments upon initial apply of them is fixed in v0.0.110. Thanks!

snarlysodboxer avatar May 10 '22 18:05 snarlysodboxer