Commit Graph

53 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski
10cbaf7ce0 Store RequestInfo in Context
... in order to replace the manual RequestInfoResolver dependency injection
through out the code.
2016-09-28 18:51:34 +02:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
zhouhaibing089
bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
goltermann
34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
deads2k
ab03317d96 support CIDRs in NO_PROXY 2016-03-16 16:22:54 -04:00
David Oppenheimer
8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Chao Xu
32f2ec71a8 Based on @tiran's patch: copy the request ContentLength and TransferEncoding field in proxy
@liggitt: Update proxy content-length tests; Copy content-length in generic rest proxy.
2015-11-20 09:57:47 -08:00
deads2k
bf983e942c use GroupVersion in APIGroupVersion for api installer 2015-11-16 07:42:00 -05:00
David Eads
486103d887 Revert "use GroupVersion in APIGroupVersion for api installer" 2015-11-13 12:55:08 -05:00
deads2k
3c725f17ea use GroupVersion in APIGroupVersion for api installer 2015-11-13 09:00:04 -05:00
Jordan Liggitt
1043126135 Refactor SSH tunneling, fix proxy transport TLS/Dial extraction 2015-10-12 11:17:01 -04:00
Jordan Liggitt
36a721e8b7 Honor InsecureSkipVerify flag 2015-10-02 02:26:04 -04: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
Jordan Liggitt
a341b8f44f Remove ?namespace= param handling/defaulting 2015-06-16 22:40:01 -04: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
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
Daniel Smith
d137e7b62d Merge pull request #6048 from nikhiljindal/proxy
Updating proxy to return 301 to add a "/" at the end for #4958
2015-03-27 15:49:10 -07:00
nikhiljindal
2fff606a6f Updating proxy to return 301 to add a / at the end 2015-03-27 14:29:18 -07:00
Clayton Coleman
870da687d0 Add more extensive tests to apiserver for variations in version
Formalize v1beta1 and v1beta3 style APIs in our test cases.
2015-03-27 15:03:58 -04: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
Clayton Coleman
4b16a87096 Simplify api_installer and setup methods 2015-03-09 14:39:31 -04: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
Jordan Liggitt
083ce268e0 Put user in context, map requests to context above resthandler layer 2015-02-12 20:58:04 -05:00
Clayton Coleman
06656efe62 Merge pull request #4283 from ncdc/allow-proxy-to-resource-root-path
Allow proxying to a resource at /
2015-02-10 17:45:31 -05:00
Andy Goldstein
4f89ed9d6a Allow proxying to a resource at /
Add a route for /proxy/<kind>/<name>/ without requiring additional path
information. This allows for e.g. /proxy/service/myservice/, which will
proxy to the service at /, instead of always requiring something in the
path.
2015-02-10 10:04:40 -05:00
derekwaynecarr
0bd0e12bbc Add support for Namespace as Kind
Add example for using namespaces
2015-02-10 09:50:50 -05:00
Brendan Burns
65e4964bc2 Merge pull request #4087 from enisoc/apiserver-proxy-redirect
Rewrite "Location" header in apiserver proxy.
2015-02-04 09:33:34 -08:00
nikhiljindal
18609e1706 Moving /watch, /proxy and /redirect registration to go-restful 2015-02-03 15:47:48 -08: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
derekwaynecarr
4c33e36a88 Plumb restmapper properly through apiserver and tests 2015-02-02 10:26:19 -05: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
derekwaynecarr
1e2b995a79 Fix admission control in tests 2015-01-07 14:42:31 -05:00
derekwaynecarr
520ae3ef27 Implement basic admission control framework 2015-01-07 14:42:31 -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
Brian Grant
7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Deyuan Deng
acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
derekwaynecarr
51aeb6bcd1 Add unit test for namespace aware proxy 2014-10-20 16:26:51 -04:00