1
0
mirror of synced 2026-03-23 02:26:56 +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 helmRepositoryAdapter) isSuspended() bool {
func (obj helmRepositoryAdapter) setSuspended(reason string) {
obj.HelmRepository.Spec.Suspend = true
obj.HelmRepository.Annotations[SuspendReasonAnnotation] = reason
if reason != "" {
obj.HelmRepository.Annotations[SuspendReasonAnnotation] = reason
}
}
func (a helmRepositoryListAdapter) item(i int) suspendable {