Merge pull request #103177 from arkbriar/support_cancelable_exec_stream

Support cancelable SPDY executor stream

Kubernetes-commit: 3cf75a2f760b8093f7c97f26b4b2b059f3777bec
This commit is contained in:
Kubernetes Publisher 2022-11-02 19:47:36 -07:00
commit c9ff82cf2f
4 changed files with 11 additions and 10 deletions

8
go.mod
View File

@ -32,8 +32,8 @@ require (
k8s.io/api v0.0.0-20221028075226-689257039cfb
k8s.io/apimachinery v0.0.0-20221028155017-b03a432a2a6d
k8s.io/cli-runtime v0.0.0-20221030161243-cf309f8903f6
k8s.io/client-go v0.0.0-20221028155554-0d5739633518
k8s.io/component-base v0.0.0-20221028160413-57523092d0c2
k8s.io/client-go v0.0.0-20221103035556-bc6266d159c3
k8s.io/component-base v0.0.0-20221102201024-c22075132ffc
k8s.io/component-helpers v0.0.0-20221028160522-56bb98a3ab81
k8s.io/klog/v2 v2.80.1
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
@ -94,9 +94,9 @@ replace (
k8s.io/api => k8s.io/api v0.0.0-20221028075226-689257039cfb
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20221028155017-b03a432a2a6d
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20221030161243-cf309f8903f6
k8s.io/client-go => k8s.io/client-go v0.0.0-20221028155554-0d5739633518
k8s.io/client-go => k8s.io/client-go v0.0.0-20221103035556-bc6266d159c3
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20221028154808-081720d0e256
k8s.io/component-base => k8s.io/component-base v0.0.0-20221028160413-57523092d0c2
k8s.io/component-base => k8s.io/component-base v0.0.0-20221102201024-c22075132ffc
k8s.io/component-helpers => k8s.io/component-helpers v0.0.0-20221028160522-56bb98a3ab81
k8s.io/metrics => k8s.io/metrics v0.0.0-20221028162048-b37c1756f70a
)

8
go.sum
View File

@ -546,10 +546,10 @@ k8s.io/apimachinery v0.0.0-20221028155017-b03a432a2a6d h1:fg/DbLqFKxFESf3AnU5iwC
k8s.io/apimachinery v0.0.0-20221028155017-b03a432a2a6d/go.mod h1:zSkBXgO5G/dSQOe256tx5Yo2OJytojpY3bsXu/4/ZJE=
k8s.io/cli-runtime v0.0.0-20221030161243-cf309f8903f6 h1:qt3gwW+JHgYf49iawwhBdRn+C0PVn/ttSFUObjuSRsg=
k8s.io/cli-runtime v0.0.0-20221030161243-cf309f8903f6/go.mod h1:VCK6BtIAZKGm+vtIuPX7Izszv8qB+hRMk7aSQl1ymRU=
k8s.io/client-go v0.0.0-20221028155554-0d5739633518 h1:KlSjZkXeVyocbVpEU157nadMdQIfWXchaItVtjmMVUE=
k8s.io/client-go v0.0.0-20221028155554-0d5739633518/go.mod h1:9OZTm80DH1AI7P4cpx8yehVlTU1xZQCsMtAtlJYLWDw=
k8s.io/component-base v0.0.0-20221028160413-57523092d0c2 h1:lHXBae/IFHPh8Lu9rDRTzt6KyTiBkKvRJWeLTYpXFDA=
k8s.io/component-base v0.0.0-20221028160413-57523092d0c2/go.mod h1:ng9M2gjWKyA3UKzYYImYBFvpk731uuzazqB7Ti2cKmA=
k8s.io/client-go v0.0.0-20221103035556-bc6266d159c3 h1:VF0fWscMp1fHOdvGbrevezXnAtpWgpTPahKaZdXfhwk=
k8s.io/client-go v0.0.0-20221103035556-bc6266d159c3/go.mod h1:9OZTm80DH1AI7P4cpx8yehVlTU1xZQCsMtAtlJYLWDw=
k8s.io/component-base v0.0.0-20221102201024-c22075132ffc h1:guQG2a4VRQzaH2/LBx/9b+yDzcEHhNgfB495DpJby9c=
k8s.io/component-base v0.0.0-20221102201024-c22075132ffc/go.mod h1:6nB7Hvde4zeOk2qvFvfgSiMNhRpXM0Q2Q04zwBZIfPc=
k8s.io/component-helpers v0.0.0-20221028160522-56bb98a3ab81 h1:3CC/oNrmdSptGTCO0NGfo4HsUGjQOfFL8xAret+O6Vc=
k8s.io/component-helpers v0.0.0-20221028160522-56bb98a3ab81/go.mod h1:CWIVMl3HH46Te+rS5pdIrYoJ4Hgpvq3GDjmRojCr7jA=
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=

View File

@ -17,6 +17,7 @@ limitations under the License.
package attach
import (
"context"
"fmt"
"io"
"net/url"
@ -159,7 +160,7 @@ func (*DefaultRemoteAttach) Attach(method string, url *url.URL, config *restclie
if err != nil {
return err
}
return exec.Stream(remotecommand.StreamOptions{
return exec.StreamWithContext(context.Background(), remotecommand.StreamOptions{
Stdin: stdin,
Stdout: stdout,
Stderr: stderr,

View File

@ -122,7 +122,7 @@ func (*DefaultRemoteExecutor) Execute(method string, url *url.URL, config *restc
if err != nil {
return err
}
return exec.Stream(remotecommand.StreamOptions{
return exec.StreamWithContext(context.Background(), remotecommand.StreamOptions{
Stdin: stdin,
Stdout: stdout,
Stderr: stderr,