1
0
mirror of synced 2026-03-26 19:56:55 +00:00

Sets the flux cli suspend command --reason flag to an empty string

as default and changes the flux resource suspend behavior to only apply
the suspend reason annotation when a non-empty reason is provided.

Signed-off-by: Travis Mattera <travis@mattera.io>
This commit is contained in:
Travis Mattera
2023-09-13 11:00:51 -07:00
parent 59c759e885
commit 0ba9db560b
12 changed files with 34 additions and 12 deletions

View File

@@ -49,7 +49,9 @@ func (obj imageRepositoryAdapter) isSuspended() bool {
func (obj imageRepositoryAdapter) setSuspended(reason string) {
obj.ImageRepository.Spec.Suspend = true
obj.ImageRepository.Annotations[SuspendReasonAnnotation] = reason
if reason != "" {
obj.ImageRepository.Annotations[SuspendReasonAnnotation] = reason
}
}
func (a imageRepositoryListAdapter) item(i int) suspendable {