diff --git a/cli/pkg/kctrl/cmd/package/installed/create_or_update.go b/cli/pkg/kctrl/cmd/package/installed/create_or_update.go index 4eeabdf6b..e2eab1d7f 100644 --- a/cli/pkg/kctrl/cmd/package/installed/create_or_update.go +++ b/cli/pkg/kctrl/cmd/package/installed/create_or_update.go @@ -388,9 +388,12 @@ func (o CreateOrUpdateOptions) update(client kubernetes.Interface, kcClient kccl if err != nil { return err } - err = o.waitForAppPause(kcClient) - if err != nil { - return err + + if o.WaitFlags.Enabled { + err = o.waitForAppPause(kcClient) + if err != nil { + return err + } } reconciliationPaused = true diff --git a/cli/pkg/kctrl/cmd/package/installed/pause_or_kick.go b/cli/pkg/kctrl/cmd/package/installed/pause_or_kick.go index f42c83303..60f6ca174 100644 --- a/cli/pkg/kctrl/cmd/package/installed/pause_or_kick.go +++ b/cli/pkg/kctrl/cmd/package/installed/pause_or_kick.go @@ -65,6 +65,12 @@ func NewPauseCmd(o *PauseOrKickOptions, flagsFactory cmdcore.FlagsFactory) *cobr cmd.Use = "pause INSTALLED_PACKAGE_NAME" } + o.WaitFlags.Set(cmd, flagsFactory, &cmdcore.WaitFlagsOpts{ + AllowDisableWait: true, + DefaultInterval: 2 * time.Second, + DefaultTimeout: 5 * time.Minute, + }) + return cmd } @@ -165,9 +171,11 @@ func (o *PauseOrKickOptions) Kick(args []string) error { return err } - err = o.waitForAppPause(client) - if err != nil { - return err + if o.WaitFlags.Enabled { + err = o.waitForAppPause(client) + if err != nil { + return err + } } err = o.unpause(client)