kubernetes/pkg/util
Clayton Coleman 363b616908 Expose exec and logs via WebSockets
Not all clients and systems can support SPDY protocols. This commit adds
support for two new websocket protocols, one to handle streaming of pod
logs from a pod, and the other to allow exec to be tunneled over
websocket.

Browser support for chunked encoding is still poor, and web consoles
that wish to show pod logs may need to make compromises to display the
output. The /pods/<name>/log endpoint now supports websocket upgrade to
the 'binary.k8s.io' subprotocol, which sends chunks of logs as binary to
the client. Messages are written as logs are streamed from the container
daemon, so flushing should be unaffected.

Browser support for raw communication over SDPY is not possible, and
some languages lack libraries for it and HTTP/2. The Kubelet supports
upgrade to WebSocket instead of SPDY, and will multiplex STDOUT/IN/ERR
over websockets by prepending each binary message with a single byte
representing the channel (0 for IN, 1 for OUT, and 2 for ERR). Because
framing on WebSockets suffers from head-of-line blocking, clients and
other server code should ensure that no particular stream blocks. An
alternative subprotocol 'base64.channel.k8s.io' base64 encodes the body
and uses '0'-'9' to represent the channel for ease of use in browsers.
2015-10-09 14:33:40 -04:00
..
bandwidth Linux bandwidth test doesn't work on Mac 2015-09-26 11:41:27 -04:00
config Cleanup deprecated Forever function 2015-08-24 10:31:59 +08:00
dbus Add a mockable dbus interface to pkg/util 2015-08-31 18:00:35 -04:00
deployment Adding events to deployment 2015-10-01 16:38:08 -07:00
errors Add utility function for errors that runs multiple functions that errors 2015-10-05 22:43:19 +00:00
exec pkg/util/exec: allow mocking of LookPath 2015-09-12 08:43:45 +11:00
fielderrors Remove glog dependency from fielderrors 2015-10-01 11:02:51 -07:00
flushwriter Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
httpstream Merge pull request #14889 from liggitt/honor-skip-validate 2015-10-02 14:29:55 -07:00
io Move pkg/util.Time to pkg/api/unversioned.Time 2015-09-17 17:51:27 -07:00
iptables Merge pull request #14982 from Huawei-PaaS/fixed_typos_for_proxy 2015-10-05 11:40:03 -07:00
jsonpath Fix struct input test in jsonpath 2015-09-10 11:44:13 -07:00
limitwriter Support extended pod logging options 2015-09-21 15:39:32 -04:00
mount Correct comments in mount.go 2015-09-23 11:40:17 -04:00
node run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
oom Allow usining FakeOOMAdjuster in Kubelet 2015-10-01 10:55:08 +02:00
operationmanager Correcting all go vet errors 2015-08-11 13:55:37 -07:00
procfs Add QoS support on node 2015-08-07 11:18:16 -07:00
proxy Avoid rewriting URLs in the proxy, if the application is proxy-aware. 2015-09-28 17:20:03 -07:00
rand ShuffleStrings uses a seeded rand object 2015-09-09 12:08:57 -07:00
sets pkg/util/sets: add Intersection function 2015-09-17 16:17:11 -04:00
slice Move pkg/util.Time to pkg/api/unversioned.Time 2015-09-17 17:51:27 -07:00
strategicpatch Add method to apply strategic merge patch. 2015-10-07 17:14:11 -07:00
sysctl Kubelet sets kernel overcommit_memory flag 2015-10-06 14:28:46 -04:00
validation Move util/validation files to their own package 2015-09-13 00:46:52 -07:00
wait Fix potential goroutine leaks in pollers 2015-10-06 14:58:21 -04:00
workqueue rewrite go imports 2015-08-05 17:30:03 -07:00
wsstream Expose exec and logs via WebSockets 2015-10-09 14:33:40 -04:00
yaml Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
atomic_value.go change iff to if and only if to improve annotation readability 2015-09-16 08:29:36 +00:00
atomic_value_test.go Increase a bunch of timeouts to reduce flakes 2015-09-23 11:09:03 -07:00
backoff.go back-off image pull on failure 2015-10-07 21:12:42 +11:00
backoff_test.go back-off image pull on failure 2015-10-07 21:12:42 +11:00
bool_flag.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
cache.go Add cache with multiple shards to decrease lock contention 2015-05-11 15:07:50 +02:00
cache_test.go Add cache with multiple shards to decrease lock contention 2015-05-11 15:07:50 +02:00
clock.go back off restarts of crashlooping containers 2015-08-24 21:43:17 +10:00
clock_test.go back off restarts of crashlooping containers 2015-08-24 21:43:17 +10:00
configuration_map.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
crypto.go Use self-signed cert as CA for local-up-cluster.sh 2015-07-24 07:16:07 -07:00
diff.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
doc.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
escape.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
fake_handler.go ServiceAccounts controller 2015-05-11 17:18:05 -04:00
fake_handler_test.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
flags.go Use pflag functions instead of ours. 2015-08-20 15:00:55 -07:00
hash.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
hash_test.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
http.go Add util to set transport defaults 2015-10-02 02:29:46 -04:00
line_delimiter.go Fix up alignment of columns w/ namespaces. 2015-07-09 08:59:32 -07:00
line_delimiter_test.go Fix up alignment of columns w/ namespaces. 2015-07-09 08:59:32 -07:00
logs.go Cleanup deprecated Forever function 2015-08-24 10:31:59 +08:00
port_range.go Add util.PortRange, so that a port range can be a flag. Format: lo-hi 2015-05-16 15:52:57 -04:00
port_range_test.go Add util.PortRange, so that a port range can be a flag. Format: lo-hi 2015-05-16 15:52:57 -04:00
port_split.go Allow specifying scheme when proxying 2015-10-05 22:12:10 -04:00
port_split_test.go Allow specifying scheme when proxying 2015-10-05 22:12:10 -04:00
resource_container_linux.go flag controlled RLIMIT_NOFILE for kubelet. 2015-09-22 15:18:34 -07:00
resource_container_unsupported.go flag controlled RLIMIT_NOFILE for kubelet. 2015-09-22 15:18:34 -07:00
runner.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
runner_test.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
ssh.go Mark realSSHDialer as implementing sshDialer 2015-06-20 18:18:38 -04:00
ssh_test.go Move pkg/util.Time to pkg/api/unversioned.Time 2015-09-17 17:51:27 -07:00
string_flag.go Replace the auth config file with a kubeconfig file when 2015-05-13 01:03:28 -07:00
template.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
template_test.go Make copyright ownership statement generic 2015-05-01 17:49:56 -04:00
throttle.go Switch token bucket rate limiter to github.com/juju/ratelimit 2015-06-30 10:34:41 -04:00
throttle_test.go Switch token bucket rate limiter to github.com/juju/ratelimit 2015-06-30 10:34:41 -04:00
trace.go Add very simple tracing mechanism for easier debugging of slow requests. 2015-05-26 16:17:18 +02:00
umask.go util: Add util.Umask wrapper 2015-08-06 11:39:29 +02:00
umask_windows.go util: Add util.Umask wrapper 2015-08-06 11:39:29 +02:00
util.go Increase a bunch of timeouts to reduce flakes 2015-09-23 11:09:03 -07:00
util_test.go always select non link-local interface, fixes #11961 2015-08-24 14:49:19 -04:00
uuid.go run gofmt on everything we touched 2015-08-05 17:52:56 -07:00