Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not Trigger RolloutRestart with every secret change #644

Open
koolhandluke opened this issue Mar 7, 2024 · 3 comments
Open

Do not Trigger RolloutRestart with every secret change #644

koolhandluke opened this issue Mar 7, 2024 · 3 comments
Assignees
Labels

Comments

@koolhandluke
Copy link

The RolloutRestart feature is a great feature of the operator.
However, the current implementation can cause outages or service degradation if several secrets are rotated for a given application within a short interval. This would set off a series of "thrashing" restarts.

Could we add a feature to "batch" up restarts for a given target ?
This way it would ensure only 1 rolling restart is executed within that period - eliminating unnecessary pod restarts.

eg the following would do a max of one rolling restart for the " vso-db-demo" deployment per hour.
rolloutRestartTargets:

  • kind: Deployment
    name: vso-db-demo
    deployInterval: "60m"
@koolhandluke koolhandluke added the enhancement New feature or request label Mar 7, 2024
@benashz
Copy link
Collaborator

benashz commented Mar 7, 2024

@koolhandluke - that's a great suggestion. We have had some internal discussion around its implementation, but currently have no concrete commitment to add it.

@koolhandluke
Copy link
Author

koolhandluke commented Mar 8, 2024

HI @benashz - thanks.
I was thinking one approach would be to use some kind of cache.

The cache period would be the batch deploy interval.

it could work like so:

  1. Secret 1 is updated for deployment A. HandleRolloutRestarts() is triggered. Instead of triggering the restart for the target it would put the job in cache .
  2. Secret 2 is updated for deployment A. HandleRolloutRestarts() is triggered. It finds the restart entry for that same target in cache. exit.
  3. When the entry for deployment A expires after set interval execute the RolloutRestart.

Bonus points for doing it within a given deployment window.. ( not true CD but that is the world some folks live in)

@thiago-juro
Copy link

I am also interested in this feature. In our case, we have a couple of micro-services fetching the same secret. Changing the secret triggers the restart of all micro-services which can cause downtime.

@benashz benashz self-assigned this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants