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:
@@ -47,8 +47,9 @@ func (obj helmRepositoryAdapter) isSuspended() bool {
|
||||
return obj.HelmRepository.Spec.Suspend
|
||||
}
|
||||
|
||||
func (obj helmRepositoryAdapter) setSuspended() {
|
||||
func (obj helmRepositoryAdapter) setSuspended(reason string) {
|
||||
obj.HelmRepository.Spec.Suspend = true
|
||||
obj.HelmRepository.Annotations[SuspendReasonAnnotation] = reason
|
||||
}
|
||||
|
||||
func (a helmRepositoryListAdapter) item(i int) suspendable {
|
||||
|
||||
Reference in New Issue
Block a user