Skip to content

Commit

Permalink
revert(k8s): Revert go-vela/pkg-runtime#151
Browse files Browse the repository at this point in the history
This was ineffective and causes a lot of logged errors:

```
{"build":...,"executor":"linux","host":"...",
"level":"error",
"msg":"previous terminated container \"...\" in pod \"...\" not found",
"repo":"...","runtime":"kubernetes","time":"2022-04-14T18:58:36Z","user":"...","version":"v0.13.0-podTracker4"}
```
  • Loading branch information
cognifloyd committed Apr 14, 2022
1 parent c091a57 commit ee1f575
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions runtime/kubernetes/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,8 @@ func (c *client) TailContainer(ctx context.Context, ctn *pipeline.Container) (io
//
// https://pkg.go.dev/k8s.io/api/core/v1?tab=doc#PodLogOptions
opts := &v1.PodLogOptions{
Container: ctn.ID,
Follow: true,
// steps can exit quickly, and might be gone before
// log tailing has started, so we need to request
// logs for previously exited containers as well.
// Pods get deleted after job completion, and names for
// pod+container don't get reused. So, previous
// should only retrieve logs for the current build step.
Previous: true,
Container: ctn.ID,
Follow: true,
Timestamps: false,
}

Expand Down

0 comments on commit ee1f575

Please sign in to comment.