Skip to content

Commit

Permalink
Merge pull request gocardless#231 from gocardless/dyson-fix-console-d…
Browse files Browse the repository at this point in the history
…etaching

Fix detaching from interactive consoles
  • Loading branch information
dyson authored Mar 17, 2021
2 parents bde9a4e + ff361d5 commit b63d856
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/workloads/console/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,12 @@ func (c *Runner) Attach(ctx context.Context, opts AttachOptions) error {
return fmt.Errorf("failed to attach to console: %w", err)
}

// We have either terminated or detached from a running console so nothing to do
if !csl.Spec.Noninteractive {
return nil
}

// We are attached to a non-interactive console (streaming logs) so keep streaming until the pod completes or errors
return c.waitForSuccess(ctx, csl)
}

Expand Down

0 comments on commit b63d856

Please sign in to comment.