flux2
flux2 copied to clipboard
Add Message to Suspend
User Story
Often there is a purpose behind suspending a resource with the flux
cli, whether it be during incident response, source repository refactoring, and various other scenarios. The flux diff
command provides a great UX for determining what will change if a suspended resource is resumed, but it doesn't help explain why something is paused or when it would be ok to resume reconciliation. On distributed teams this can become a point of friction as it needs to be communicated among group stakeholders.
Flux users should have a way to succinctly signal to other users why a resource is suspended on the resource itself.
Other use cases include, but is not limited to, adding general context such as who suspended the object, the associated work ticket, and consequences of prematurely resuming a object reconciliation.
Changes
This PR adds support for an optional --message
flag to the flux suspend
command that adds an annotation to the suspended resource. The annotation is removed when the resource is targeted by the flux resume
command.
Detailed List of Changes
-
Adds an optional
message
cli flag to thesuspend
command that accepts a reason for why the resource was suspended. -
Defines the resource metadata annotation key that stores the message for the resource suspension.
-
Updates the suspend and resume resource patching to add or remove the annotation holding the suspend message.