Commit Graph

8 Commits (d51e131726b925e7088b90915e99042459b628e0)

Author SHA1 Message Date
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman 60c014334f Split TLS loading to allow 3rd parties to load keys easily
The LoadTLSFiles method is useful for configuration code that needs
to read the current client config and get values out for creating
other config files.
2015-02-19 20:54:21 -05:00
Clayton Coleman 0307d7ba98 Set a default user agent on all client.Client calls
Form:
  kube-controller-manager/v0.10.0 (linux/amd64) kubernetes/550b98e

  <basename(os.Argv)>/<gitVersion> (<GOOS>/<GOARCH>) kubernetes/<shortGitCommit>

Can be set by other clients
2015-02-04 17:45:53 -05:00
Clayton Coleman d072232d4a Allow client.Config to be used for HTTP2 and WebSocket connections
client.Config describes how to make a client connection to a server
for HTTP traffic, but for connection upgrade scenarios cannot be
used because the underlying http.Transport object can't allow the
connection to be hijacked. Reorganize the TLS and connection wrapper
methods so that a sophisticated client can do:

    cfg := &client.Config{...} // from somewhere
    tlsConfig, _ := client.TLSConfigFor(cfg)
    _ := conn.Dial(...)
    rt := MyRoundTripper() // some func that implements grabbing requests
    wrapper, _ := client.HTTPWrappersFor(cfg)
    req := &http.Request{}
    req.Header.Set("Connection-Upgrade", ...)
    _, := wrapper.RoundTrip(req)
    // rt has been invoked with a fully formed Req with auth
    rt.Req.Write(conn)
    // read response for upgrade

It would be good to have utility function that does more of this,
but mostly enabling the HTTP2/SPDY client exec function right now.
2015-01-29 17:43:09 -05:00
Jordan Liggitt 1ebe885827 Allow client and kubelet configs to hold cert/key/ca data directly 2015-01-16 12:18:20 -05:00
Jordan Liggitt 1f8a74626f Use CAFile even if client certificate is not specified 2015-01-12 16:38:48 -05:00
Jordan Liggitt 2475123d3c Bump minimum TLS version from SSLv3 to TLSv1.0 2014-12-10 09:13:15 -05:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00