Commit Graph

23868 Commits

Author SHA1 Message Date
Clayton Coleman
437f90dac4 Merge pull request #2154 from smarterclayton/namespace_on_create
Check namespace on create of objects like update
2014-11-04 15:23:04 -05:00
Daniel Smith
9177458ad8 Merge pull request #2151 from claire921/r_health_http.go
Refactor formatURL in health/http.go
2014-11-04 11:50:09 -08:00
markturansky
bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Clayton Coleman
192541824f Check namespace on create of objects like update
A user should be allowed to create an object in a non-default namespace
if non is specified in the passed file.
2014-11-04 13:59:23 -05:00
Clayton Coleman
76648ffafb Like update, allow CLI create to clear resourceVersion 2014-11-04 10:44:56 -05:00
Clayton Coleman
dbf28cbe51 Lock the output format version based on user input 2014-11-04 10:44:56 -05:00
Clayton Coleman
a8ccb0f99f Display an external version of the object for --output
Use the version of the API the RESTMapper prefers (currently)
2014-11-04 10:44:56 -05:00
Clayton Coleman
70aa9cc62c Add --template and --templatefile options for more flexibility
Allow directly entered templates for scripting flexibility.
Changes --output=template to mean "string" and --output=templatefile
to mean "from file"
2014-11-04 10:44:56 -05:00
Clayton Coleman
e46adc4cd0 kubectl should error when namespace doesn't match file for update
A user who runs `kubectl update -f foo.json` where foo.json is a
resource in a namespace that does not match $(kubectl namespace)
may not intend to update the resource in that other namespace.

For now, return an error when the user does not explicitly set
the namespace via the CLI:

    # foo.json in 'one', current is 'two'
    $ kubectl update -f foo.json # FAILS

    $ kubectl update --namespace=one -f foo.json # SUCCEEDS
2014-11-04 10:44:56 -05:00
Clayton Coleman
09cfa364c5 Refactor Get and Describe to allow extension of types
Get should use ResourceMapper, allow Printer to be abstracted,
and extract Describe as *Describer types.
2014-11-04 10:44:56 -05:00
Clayton Coleman
39882a3555 Allow Create/Update/Delete kubectl commands to handle arbitrary objects
* Ensure kubectl uses abstractions from other parts of Kube
* Begin adding abstractions that allow arbitrary objects
* Refactor "update" to more closely match allowed behavior
2014-11-04 10:44:56 -05:00
Clayton Coleman
f0c23d68f7 Add runtime.ObjectConvertor to RESTMapper 2014-11-04 10:38:00 -05:00
Clayton Coleman
dc862ae463 Return the Kind of the object with the RESTMapper 2014-11-04 10:34:47 -05:00
Clayton Coleman
778a50d00b Introduce ObjectConvertor for conversion to known API versions
Will allow clients to transform internal objects to a version
suitable for external output.
2014-11-04 10:34:15 -05:00
Michal Fojtik
581de15905 Fixed wrong godoc for pkg/config methods 2014-11-04 15:51:47 +01:00
Michal Fojtik
c8f88a3ae8 Add support for creating a bulk of resources via kubectl apply 2014-11-04 14:52:29 +01:00
Claire Li
51a55d3146 Refactor formatURL in health/http.go 2014-11-03 22:19:25 -08:00
Claire Li
d9a6cfd169 Fix health_test.go 2014-11-03 22:03:34 -08:00
Claire Li
5e3193afd1 Refactor Status.String() in health pkg 2014-11-03 21:57:01 -08:00
Daniel Smith
724db61c1d Add a placeholder to boundPod's SelfLink, and test that one can make references to them. 2014-11-03 17:46:33 -08:00
Eric Tune
1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Eric Tune
3045035512 Get user from request and put in authz attribs.
Added integration tests for user-based auth.
2014-11-03 16:38:56 -08:00
Dawn Chen
6c2212b37a Merge pull request #2142 from erictune/fix_crash
Require a KubeletClient in master.New()
2014-11-03 16:21:00 -08:00
Eric Tune
795bc7f976 Require a KubeletClient in master.New().
Without this, tests which create a master
will panic with a nil pointer when the periodic
podCache update runs.

Deleted unused FakePodInfoGetter.
Added FakeKubeletClient.
Passed to master.New.
Required a KubeletClient in master.New.
2014-11-03 16:09:41 -08:00
Dawn Chen
c4aa4d28a6 Merge pull request #2120 from brendandburns/uuid
Add some blocking so that we don't generate identical UUIDs for API objects.
2014-11-03 15:32:56 -08:00
Justin SB
9a053a4b59 Initial ipv6 / iptables work 2014-11-03 15:23:04 -08:00
Daniel Smith
7c2b7b55e7 Merge pull request #2059 from smarterclayton/rest_mapping
Define a mapping between REST resource name and kind/apiVersion
2014-11-03 15:08:21 -08:00
Clayton Coleman
191c1b975c Define a mapping between REST resource name and kind/apiVersion
Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md
2014-11-03 17:09:06 -05:00
Brendan Burns
f556f2f82f Add some validation for externalized service ports. 2014-11-03 13:36:34 -08:00
Brendan Burns
a624630112 Add some blocking so that we don't generate identical UUIDs for API objects. 2014-11-03 13:27:59 -08:00
Dawn Chen
078bc364b4 Merge pull request #2135 from brendandburns/cleanup
Change a spammy log to V(3)
2014-11-03 12:53:27 -08:00
Dawn Chen
6cc5b7d848 Merge pull request #2125 from brendandburns/flake
Deflake the TestCreate test, by adding an explicit wait.
2014-11-03 08:53:29 -08:00
Dawn Chen
e99eac0e78 Merge pull request #2128 from brendandburns/kubelet
Add support for a 'log' command to kubectl.
2014-11-03 08:50:36 -08:00
Dawn Chen
81785d8cde Merge pull request #2124 from brendandburns/fix
Make endpoints return 400 instead of 500
2014-11-03 08:38:34 -08:00
Brendan Burns
4ae3e99177 Change a spammy log to V(3) 2014-11-03 08:38:02 -08:00
Brendan Burns
6de9d9bfe1 Merge pull request #2130 from claire921/refactor_healthz_test
Fix healthz test error handling
2014-11-03 08:24:37 -08:00
markturansky
2260b241dc Removed 'Metadata' from all types 2014-11-03 08:47:22 -05:00
Claire Li
eafd142dfa Fix healthz test error handling 2014-11-02 22:26:45 -08:00
Brendan Burns
32a04e48fd Make endpoints return 400 instead of 500 2014-11-02 20:08:06 -08:00
Brendan Burns
b0c5d3b022 Add support for a 'log' command to kubectl. 2014-11-02 19:54:19 -08:00
Brendan Burns
f02fe2da1b Deflake the TestCreate test, by adding an explicit wait. 2014-11-02 12:38:31 -08:00
Clayton Coleman
10de0d1933 Merge pull request #2108 from brendandburns/fix
Fix a missing lock in the fake etcd client.
2014-11-01 11:36:21 -04:00
Brendan Burns
cf4fd8753f Fix a missing lock in the fake etcd client. 2014-10-31 21:36:03 -07:00
Eric Tune
55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Brendan Burns
893291d81d Merge pull request #1997 from ddysher/split-master
Separate minion controller from master.
2014-10-31 11:23:58 -07:00
Brendan Burns
69ca97a41c Fix a flaky test by draining the worker pool after syncing. 2014-10-31 09:52:01 -07:00
Brendan Burns
69ad5c9bff Merge pull request #2077 from dchen1107/cleanup
PodUpdate only has the delta changes, not full snapshot of all desired
2014-10-30 21:46:26 -07:00
Brendan Burns
563311071d Merge pull request #2090 from ddysher/stop-httptest-server
Stop httptest server.
2014-10-30 21:44:53 -07:00
Brendan Burns
c6df93d76e Merge pull request #2082 from lavalamp/fix
Fix self linking of objects returned in lists.
2014-10-30 21:43:31 -07:00
Deyuan Deng
acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00