Commit Graph

50 Commits

Author SHA1 Message Date
Jordan Liggitt
36a721e8b7 Honor InsecureSkipVerify flag 2015-10-02 02:26:04 -04:00
Mike Danese
fe6b15ba2f rewrite all links to issues to k8s links 2015-08-05 21:11:11 -07:00
Mike Danese
17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Daniel Smith
ddbe4c914f Fix proxy rewriting 2015-06-24 13:54:14 -07:00
Wojciech Tyczynski
23d405ad86 Expose /resetMetrics handle in apiserver 2015-06-23 11:12:45 +02:00
Brendan Burns
b68ddbaf75 Don't pretty-print by default. Saves an allocation (or more) and a copy. 2015-06-08 21:31:58 -07:00
Brendan Burns
7ea533d871 Add the SSHTunnel transport to the kubelet client. 2015-06-05 14:55:15 -07:00
Brendan Burns
30a89968a4 Initial proxy tunnelling. 2015-06-05 14:54:20 -07:00
Brendan Burns
631cf34d40 Add tunnelling to the proxy API handler. 2015-06-05 14:54:20 -07:00
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
Filip Grzadkowski
8b755c805b Break request metrics in apiserver by client. 2015-04-24 13:16:14 +02:00
Clayton Coleman
b3f03b934d Merge pull request #6869 from csrwng/pod_connect
Pod proxy, portforward and exec subresources
2015-04-17 09:49:12 -04:00
Cesar Wong
e09b8c99dc Add URL parameters to proxy redirect Location header
When a URL that doesn't end in "/" is sent to the API proxy,
the proxy responds with a redirect to the URL with a "/" at the
end. The problem is that this redirect path does not include
query parameters that were passed in the original request. This
is a fix to that issue.
2015-04-16 17:57:45 -04:00
Cesar Wong
a3f5dfd0e2 Move proxy html transport to utility package
Moves the proxy html transport that translates html links
from the proxy in apiserver to its own package under util.
2015-04-16 10:20:17 -04:00
nikhiljindal
4c4a084a92 Updating proxy to return 301 to add a / at the end 2015-03-30 12:12:49 -07:00
Daniel Smith
93a82c30d9 Revert "Updating proxy to return 301 to add a "/" at the end for #4958" 2015-03-27 15:59:40 -07:00
nikhiljindal
2fff606a6f Updating proxy to return 301 to add a / at the end 2015-03-27 14:29:18 -07:00
Jordan Liggitt
a75b501821 Improve ResourceLocation API, allow proxy to use authenticated transport 2015-03-24 11:11:34 -04:00
Clayton Coleman
d46087db50 Move REST* interfaces into pkg/api/rest
Dependency chain is now api -> api/rest -> apiserver.  Makes the
interfaces much cleaner to read, and cleans up some inconsistenties
that crept in along the way.
2015-03-23 16:52:21 -04:00
Di Xu
3fac253536 Redirector.ResourceLocation shouldn't return "", nil 2015-03-13 08:26:46 +08:00
Alex Robinson
60f0e9d673 Fix the broken calls to the monitor() by having it take arguments as pointers.
This is needed for the changes to various labels from later in the function
to be picked up.
2015-03-06 23:16:44 +00:00
Daniel Smith
ec58e6d78e use correct path for proxy replacements 2015-02-24 10:10:06 -08:00
Daniel Smith
2d56547524 refactor proxy upgrade path 2015-02-24 10:10:02 -08:00
Andy Goldstein
44d41a0f1b Move golang code to third_party 2015-02-20 20:00:31 -05:00
Andy Goldstein
5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
Daniel Smith
ca5a73ac6b remove redundant func() 2015-02-17 15:58:18 -08:00
Jordan Liggitt
083ce268e0 Put user in context, map requests to context above resthandler layer 2015-02-12 20:58:04 -05:00
Alex Robinson
ab62b689a5 Add monitoring instrumentation for the remaining HTTP handlers in the apiserver. 2015-02-10 23:19:49 +00:00
deads2k
1c9216a45e clarify api request information 2015-02-04 13:36:01 -05:00
Anthony Yeh
6a0dec0e99 Rewrite "Location" header in apiserver proxy.
So that redirects work correctly.
2015-02-03 15:14:28 -08:00
Anthony Yeh
695b08885b Fix apiserver proxy path rewriting.
1) Absolute paths without a hostname were being rewritten relative to
   the current page, rather than relative to the current host.
   e.g. When viewing /some/page.html, it would rewrite:
       /other/page.html => proxyPrepend/some/other/page.html
   Instead, it should rewrite:
       /other/page.html => proxyPrepend/other/page.html

2) Trailing slashes were being stripped from all rewritten URLs.
   This is because path.Join() always calls path.Clean() as well:
   http://golang.org/pkg/path/#Join
2015-02-02 13:01:46 -08:00
Anthony Yeh
8c900187b6 Add reverse proxy headers in apiserver proxy.
Fixes #3484
2015-01-19 13:15:41 -08:00
Nikhil Jindal
e6c5d59a55 Merge pull request #3509 from enisoc/apiserver-proxy-trailing-slash
Preserve trailing slash in apiserver proxy.
2015-01-15 15:13:49 -08:00
Anthony Yeh
895c23e2d2 Allow Content-Type with charset in apiserver proxy.
Fixes #3456
2015-01-14 23:01:49 -08:00
Anthony Yeh
6f641744ff Preserve trailing slash in apiserver proxy.
Some servers are sensitive to the presence of a trailing slash.
For example, http://etcd/v2/keys returns 404 while
http://etcd/v2/keys/ returns the key named "/".
2015-01-14 21:42:34 -08:00
Clayton Coleman
22c99c98e2 Split RESTStorage into separate interfaces
Omit unimplemented interfaces from Swagger
2015-01-12 12:19:45 -05:00
Daniel Smith
4ab8f238ce Fix proxy bug where it is confused by gzip encoding 2014-12-22 11:35:47 -08:00
derekwaynecarr
6694a45542 Add doc for {namespace} path param, fixup and verify proxy paths 2014-12-16 15:55:48 -05:00
derekwaynecarr
7cf664439f Move namespace from query param to path part 2014-12-16 15:55:47 -05:00
Eric Paris
4e95104953 update code.goole.com/p/go.net to golang.org/x/net
https://groups.google.com/forum/#!topic/golang-nuts/eD8dh3T9yyA
2014-11-16 22:10:24 -05:00
Daniel Smith
3045311398 Fix subtle bug when proxy constructs outgoing URL. 2014-10-29 11:29:28 -07:00
jhadvig
69c7228006 Flush data periodically instead of their buffering 2014-10-21 01:39:01 +02:00
derekwaynecarr
5e01c804fd Fixup apiserver proxy to be namespace aware 2014-10-20 10:39:16 -04:00
derekwaynecarr
3e685674e7 Add context object to interfaces 2014-09-26 11:50:34 -04:00
Jessica Forrester
d82cf7dd48 Rebased and fixed test cases 2014-09-09 17:50:18 -04:00
Daniel Smith
9345da0bfd Fix build 2014-09-08 13:05:38 -07:00
Daniel Smith
b6f1f84875 Extend proxy test to test all URL rewriting cases. 2014-09-05 13:33:31 -07:00
Daniel Smith
6554ee96f7 Rewrite proxy code for clarity and correctness. 2014-09-05 13:33:30 -07:00
Daniel Smith
e2b645ec15 Add a generic proxier
To proxy traffic to anything that implements ResourceLocation.
Currently, this is only services. This is easily extensible to minions
(would supercede existing mechanism) and pods.
2014-09-05 13:33:30 -07:00