Skip to content

[ENHANCE] Ability to pause rollout of deployments #837

Open
@tom1299

Description

Is your feature request related to a problem? Please describe.
We have deployments which have several configmaps and secrets which are often updated almost at the same time. This leads to a series of rollouts for each of the update which (because of lengthy init containers) take a long time to complete.

Describe the solution you'd like
I would like to add the ability to pause the rollout of a deployment for a specific period of time using an annotation. For example:

deployment.reloader.stakater.com/pause-interval: 30s

The behviour of that annotation could be described like this:

  • Update of configmap or secret for a deployment is processed
  • If the deployment contains the annotation, pause the deployment
  • Apply the changes to the deployment as usual (not triggering a rollout because of the pause)
  • Add a trigger to resume the deployment after the specified pause interval
  • If a change of a configmap or secret for the same deployment occurs during the pause interval, apply the changes (not triggering a rollout because of the pause)
  • When the trigger fires, resume the deployment resulting in a rollout with all the updates that occurred during the pause interval

That way updates during the pause interval would result into only one rollout containing all the changes.

Additional context
I opened a pull request #838 with a working draft of the code.
Note that the code is more or less just hacked together in order get something working. If the feature is accepted I would refactor to a better quality.

Thanks in advance for any feedback on this.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions