Commit Graph

56 Commits

Author SHA1 Message Date
David Ashpole
64af1adace
Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
arkbriar
42808c8343 Support cancelable SPDY executor stream
Mark remotecommand.Executor as deprecated and related modifications.

Handle crash when streamer.stream panics

Add a test to verify if stream is closed after connection being closed

Remove blank line and update waiting time to 1s to avoid test flakes in CI.

Refine the tests of StreamExecutor according to comments.

Remove the comment of context controlling the negotiation progress and misc.

Signed-off-by: arkbriar <arkbriar@gmail.com>
2022-10-09 15:24:00 +08:00
Kante Yin
e844c12a61
Cleanup: defer to close server in tests (#110367)
* Cleanup: defer to close server in tests

Signed-off-by: kerthcet <kerthcet@gmail.com>

* address comments

Signed-off-by: kerthcet <kerthcet@gmail.com>

* address comments

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-06-21 08:00:38 -07:00
21kyu
3f7dfc9818 fix defer in for loop, maybe resource leak 2022-06-03 02:08:23 +09:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Jordan Liggitt
fcea950405 Deflake port forward tests to avoid hard-coded local ports 2020-09-04 15:33:43 -04:00
Davanum Srinivas
0608e8be25
update bazel BUILD files
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:47 -04:00
Davanum Srinivas
5692926914
Move packages for slightly better UX for consumers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-20 10:57:46 -04:00
wojtekt
ead12b02fe Remove ListWatchUntil 2020-05-11 16:34:18 +02:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Ted Yu
906adbdfcd Require client / server protocols 2020-01-06 08:50:04 -08:00
Jordan Liggitt
5d5b444c4d Remove use of testapi codecs, selflink, resourcepath functions 2019-12-13 11:56:29 -05:00
hwdef
82b9cf1890 pkg/client: fix staticcheck warning 2019-11-14 10:08:16 +08:00
Clayton Coleman
3b780c64b8
Always negotiate a decoder using ClientNegotiator
This commit performs two refactors and fixes a bug.

Refactor 1 changes the signature of Request to take a RESTClient, which
removes the extra copy of everything on RESTClient from Request. A pair
of optional constructors are added for testing. The major functional
change is that Request no longer has the shim HTTPClient interface and
so some test cases change slightly because we are now going through
http.Client code paths instead of direct to our test stubs.

Refactor 2 changes the signature of RESTClient to take a
ClientContentConfig instead of ContentConfig - the primary difference
being that ClientContentConfig uses ClientNegotiator instead of
NegotiatedSerializer and the old Serializers type. We also collapse
some redundancies (like the rate limiter can be created outside the
constructor).

The bug fix is to negotiate the streaming content type on a Watch()
like we do for requests. We stop caching the decoder and simply
resolve it on the request. We also clean up the dynamic client
and remove the extra WatchSpecificVersions() method by providing
a properly wrapped dynamic client.
2019-11-10 21:30:36 -05:00
yue9944882
8f601d3413 prune internal client references from test/* 2019-04-09 21:43:55 +08:00
yue9944882
65ba58a9a5 remove internal client dependency in pkg/* 2019-04-09 21:43:51 +08:00
Tomas Nozicka
603dd254ac Upgrade ListWatchUntil 2019-02-26 16:21:39 +01:00
Jordan Liggitt
0202e269a3 Fix sending oversided data frames to spdy stream 2018-11-13 22:13:09 -05:00
fengzixu
1fbb8b20e2 Modification: revise some errors about golint in some packages
1. pkg/client
2. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing

Related to: https://github.com/kubernetes/kubernetes/issues/68026
2018-08-31 13:22:25 +08:00
Tomas Nozicka
e434f3189e Deprecate ListWatchUntil, fix it and call places 2018-08-15 13:34:31 +02:00
Tomas Nozicka
4d7747a5a3 Update Bazel 2018-08-10 09:55:41 +02:00
Tomas Nozicka
3d4a02abb5 Rename Until to UntilWithoutRetry and move to using context so it's
cancelable
2018-08-10 09:55:41 +02:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
David Eads
94e3d94d67 update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
David Eads
a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Jordan Liggitt
f82b1ba90e
Allow constructing spdy executor from existing transports 2017-11-18 14:41:29 -05:00
Dr. Stefan Schimanski
bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Clayton Coleman
8b571bb63b
Disable default paging in list watches
For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.
2017-09-06 23:10:59 -04:00
Clayton Coleman
500b130ff0
Enable paging for all list watchers 2017-09-01 10:47:01 -04:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Lee Verberne
786e993338 Fix typo in ExecCommandParam 2017-07-14 13:54:51 +00:00
Clayton Coleman
cf026a3314
Move SPDY specific code into its own package 2017-07-09 16:11:05 -04:00
Clayton Coleman
12c7874c0d
Prepare to introduce websockets for exec and portforward
Refactor the code in remotecommand to better represent the structure of
what is common between portforward and exec.
2017-07-07 18:22:51 -04:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Dmitry Shulyak
2612e0c78a Move client/unversioned/remotecommand to client-go
Module remotecommand originally part of kubernetes/pkg/client/unversioned was moved
to client-go/tools, and will be used as authoritative in kubectl, e2e and other places.

Module remotecommand relies on util/exec module which will be copied to client-go/pkg/util
2017-05-15 16:28:56 +03:00
Chao Xu
14045d253d hack/update-bazel.sh 2017-05-11 15:59:04 -07:00
Chao Xu
c354076aa4 remove invocation of k8s.io/client-go/pkg/api/install
change import of client-go/api/helper to kubernetes/api/helper

remove unnecessary use of client-go/api.registry

change use of client-go/pkg/util to kubernetes/pkg/util

remove dependency on client-go/pkg/apis/extensions

remove unnecessary invocation of k8s.io/client-go/extension/intsall

change use of k8s.io/client-go/pkg/apis/authentication to v1
2017-05-11 15:03:46 -07:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Dmitry Shulyak
f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
Jordan Liggitt
7b6ef2cedc
Switch watch prefixes to params 2017-02-22 08:54:08 -05:00
Wojciech Tyczynski
a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00