The current executor structure is too dependent on client.Request
and client.Config. In order to do an attach from the server, it needs
to be possible to create an Executor from crypto/tls#TLSConfig and to
bypassing having a client.Request.
Changes:
* remotecommand.spdyExecutor - handles upgrading a request to SPDY and getting a connection
* remotecommand.NewAttach / New - moved to exec / portforward / attach since they handle requests
* Remove request.Upgrade() - it's too coupled to SPDY, and can live with the spdyExecutor
* Add request.VersionedParams(runtime.Object, runtime.ObjectConvertor) to handle object -> query transform
Correct port-forward data copying logic so that the server closes its
half of the data stream when socat exits, and the client closes its half
of the data stream when it finishes writing.
Modify the client to wait for both copies (client->server,
server->client) to finish before it unblocks.
Fix race condition in the Kubelet's handling of incoming port forward
streams. Have the client generate a connectionID header to be used to
associate the error and data streams for a single connection, instead of
assuming that streams n and n+1 go together. Attempt to generate a
pseudo connectionID in the server in the event the connectionID header
isn't present (older clients); this is a best-effort approach that only
really works with 1 connection at a time, whereas multiple concurrent
connections will only work reliably with a newer client that is
generating connectionID.
Remove unnecessary yaml file.
Define 4 specific pod behaviors.
(sleeping for short periods is going to be flaky during automated
testing. Also, sleep -1 still exits 0)
Don't wait for a certain number of active pods in tests
where the pods terminate after a finite time, since this is racy.
Changed some tests to use pods that run forever, and not wait
for completion.
Added tests with local restarts.
Convert the DeleteOptions to the correct api group.
Without this, the Jobs client used by
kubectl had codec type v1. You would not notice this
on, say, a GET. But when you tried to do an
Update, which did client-side conversion, then
you would get an error.