Service Instance Pause #245

Open
opened 2025-10-23 12:49:51 +00:00 by tobru · 1 comment
Owner

Stories

As a user, I want to pause a service instance

Implementation Notes

Pausing a service instance allows the user to stop it from running, instead of directly deleting it. This is a prerequisite for #235 and #236.

This first needs to be implemented on the control-plane, then we know in more detail how to do it in the portal. Internal ref: APPCAT-847. (Done)

It is done by setting the field spec.parameters.instances to 0.

  • Add a button to the service detail view besides the "Edit" button called "Pause" which sets this parameter to 0. We also should track this in the database so that we can show the pause state easily in the list view or in the dashboard. When the service is paused, change the button to "unpause".
  • Add an admin action in the Django admin interface that allows to pause all instances of an organization.

Questions:

  • How do we make sure that settings in the database like this "Pause" are guaranteed to reflect reality? In theory, the service instance could be unpaused in the control-plane circumventing the portal, which would cause a deviation of the reality. Should we poll (reconcile) the control-plane regularly to check if everything is still as it should be?
  • Should we store the previous value of spec.parameters.instances so that we can set the same value again on unpause? Or just set it to 1 and let the user restore the original size?
  • Should we make the pause functionality configurable per service definition? I.e. allow disabling the possibility to pause/unpause? And depending on APPCAT-847 allow to configure the exact field to set to 0 on pause? Maybe we want to make the field configurable anyway: When it's configured, pause is possible, when its not configured then pause isn't available.
## Stories _As a user, I want to pause a service instance_ ## Implementation Notes Pausing a service instance allows the user to stop it from running, instead of directly deleting it. This is a prerequisite for #235 and #236. ~~This first needs to be implemented on the control-plane, then we know in more detail how to do it in the portal. Internal ref: [APPCAT-847](https://vshnticket.atlassian.net/browse/APPCAT-847).~~ (Done) It is done by setting the field `spec.parameters.instances` to 0. - Add a button to the service detail view besides the "Edit" button called "Pause" which sets this parameter to 0. We also should track this in the database so that we can show the pause state easily in the list view or in the dashboard. When the service is paused, change the button to "unpause". - Add an admin action in the Django admin interface that allows to pause all instances of an organization. _Questions_: * How do we make sure that settings in the database like this "Pause" are guaranteed to reflect reality? In theory, the service instance could be unpaused in the control-plane circumventing the portal, which would cause a deviation of the reality. Should we poll (reconcile) the control-plane regularly to check if everything is still as it should be? * Should we store the previous value of `spec.parameters.instances` so that we can set the same value again on unpause? Or just set it to 1 and let the user restore the original size? * Should we make the pause functionality configurable per service definition? I.e. allow disabling the possibility to pause/unpause? And depending on APPCAT-847 allow to configure the exact field to set to 0 on pause? Maybe we want to make the field configurable anyway: When it's configured, pause is possible, when its not configured then pause isn't available.
Author
Owner

FTR: Backend is ready!

FTR: Backend is ready!
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
servala/servala-portal#245
No description provided.