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

feat: Pause/Resume Deployments #2954

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thorbenbelow
Copy link
Contributor

This PR adds a new feature requested in #2792.

Deployments can be paused and resumed.

Description

There is now a new column in the deployments view that shows if a deployment is paused.
paused-column

Deployments can be paused or resumed using the z shortcut. The action depends on the current status of the deployment.
Screenshot 2024-11-10 at 17 38 23
Screenshot 2024-11-10 at 17 38 45

When there are multiple deployments selected the user has to choose between pausing or resuming them. The default is Pause.
Screenshot 2024-11-10 at 17 39 23

Signed-off-by: Thorben Below <[email protected]>
Copy link
Owner

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thorbenbelow Thank you for this update!

@@ -123,6 +123,30 @@ func (d *Deployment) Restart(ctx context.Context, path string) error {
return err
}

// Pause a Deployment
func (d *Deployment) Pause(ctx context.Context, path string) error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given pause/resume are used in tandem, I think we could dry this up and use TogglePause(...) instead.
This will be inline with cronjobs and other resources where we offer toggling behavior
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants