Adds an optional reason cli flag to the suspend command that
accepts a reason for why the resource was suspended. Defines the resource metadata annotation key that stores the reason for the resource suspension. Updates the suspend and resume resource patching to add or remove the annotation holding the suspend reason. Signed-off-by: Travis Mattera <travis@mattera.io>
This commit is contained in:
@@ -48,6 +48,9 @@ func (obj gitRepositoryAdapter) getObservedGeneration() int64 {
|
||||
|
||||
func (obj gitRepositoryAdapter) setUnsuspended() {
|
||||
obj.GitRepository.Spec.Suspend = false
|
||||
if _, ok := obj.GitRepository.Annotations[SuspendReasonAnnotation]; ok {
|
||||
delete(obj.GitRepository.Annotations, SuspendReasonAnnotation)
|
||||
}
|
||||
}
|
||||
|
||||
func (a gitRepositoryListAdapter) resumeItem(i int) resumable {
|
||||
|
||||
Reference in New Issue
Block a user