Commit 04fd079d authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #27597 from dchen1107/kubectl

Automatic merge from submit-queue No timeout for kubectl logs Fix #27588 cc/ @smarterclayton
parents d03a5fab 8f5cadea
...@@ -336,12 +336,8 @@ func (d *kubeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemov ...@@ -336,12 +336,8 @@ func (d *kubeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemov
} }
func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error {
ctx, cancel := getDefaultContext() // Don't set timeout for log calls
defer cancel() resp, err := d.client.ContainerLogs(context.Background(), id, opts)
resp, err := d.client.ContainerLogs(ctx, id, opts)
if ctxErr := contextError(ctx); ctxErr != nil {
return ctxErr
}
if err != nil { if err != nil {
return err return err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment