Commit Graph

1679 Commits (21a6e964188af3e750760e5f64a799311df0d591)

Author SHA1 Message Date
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
Deyuan Deng 019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Clayton Coleman 41f0929384 Merge pull request #2044 from erictune/fix_mux
Allocate mux in master.New()
2014-10-30 20:15:57 -04:00
Daniel Smith 790a88c6ea Merge pull request #1964 from dchen1107/cadvisor
Add /boundPods to Kubelet
2014-10-30 16:46:44 -07:00
Dawn Chen a1e79048a6 Add /podSpecs to Kubelet 2014-10-30 16:38:08 -07:00
Daniel Smith b28234fac6 Fix self linking of objects returned in lists. 2014-10-30 15:04:11 -07:00
Daniel Smith 64574dcc44 Merge pull request #2074 from derekwaynecarr/ns_watch
Fix watch by namespace
2014-10-30 12:56:50 -07:00
Dawn Chen 445ec719c9 PodUpdate only has the delta changes, not full snapshot of all desired
BoundPods on a node. PR #1865 has a wrong assumption, with which any
PodUpdate operation will cause rest of running containers without updates
are killed as an unexpected ones.

Fix #2028
2014-10-30 11:22:59 -07:00
Clayton Coleman 8a2d778248 Merge pull request #2066 from lavalamp/eventing2
Event fixes
2014-10-30 14:19:19 -04:00
derekwaynecarr dda19071e3 Fix watch by namespace 2014-10-30 12:56:50 -04:00
derekwaynecarr 5a7aced7b0 Kubectl namespace support
Add unit test for load namespace info
Different message on display of namespace versus setting namespace
2014-10-30 11:05:30 -04:00
Daniel Smith a7cc25f7ff Add namespaces to event creation path. 2014-10-29 18:03:14 -07:00
Clayton Coleman 2c10dd85c3 Merge pull request #2047 from smarterclayton/make_request_testable
Make client.Request/RESTClient more testable and fakeable
2014-10-29 19:33:36 -04:00
Daniel Smith ab9346d107 Use ID instead of Name in v1beta1 & 2 2014-10-29 15:13:44 -07:00
Eric Tune 9713b58caa Allocate mux in master.New()
Callsites no longer allocate a mux.
Master now exposes method to install handlers
which use the master's auth code.  Not used
but forks (openshift) are expected to use these
methods.  These methods will later be a point
for additional plug-in functionality.
Integration tests now use the master-provided
handler which has auth, rather than using the mux,
which didn't.  Fix TestWhoAmI now that /_whoami
sits behind auth.
2014-10-29 14:31:07 -07:00
Daniel Smith 070c6c0440 Fix missing portalNets in tests once and for all by adding a default. 2014-10-29 12:27:35 -07:00
Daniel Smith 858b557bbb Undemocratically remove unused election code.
@brendandburns: leaving this as a separate commit so you can get it back easily when you're ready to do something with it.
2014-10-29 11:38:45 -07:00
Daniel Smith a036ebc1be Switch models. No master election. 2014-10-29 11:38:45 -07:00
Daniel Smith 7146ec9d49 Implement kubernetes & kubernetes-ro services 2014-10-29 11:29:28 -07:00
Daniel Smith 3045311398 Fix subtle bug when proxy constructs outgoing URL. 2014-10-29 11:29:28 -07:00
Daniel Smith 7209ca1543 Make redirect handle namespaces just like proxy (which is weird and needs to be fixed but at least this will be consistent). 2014-10-29 11:29:28 -07:00
Daniel Smith 4311273294 Expand choices for using election code. 2014-10-29 11:29:28 -07:00
Daniel Smith d05dad6c59 Add runner utility. 2014-10-29 11:29:28 -07:00
Clayton Coleman 71fecef6f6 Add test coverage and fix a few minor problems 2014-10-29 14:08:37 -04:00
Daniel Smith 5ac88dbe2e Merge pull request #2055 from smarterclayton/define_an_interface_for_typing
Make DataVersionAndKind public on runtime.Scheme
2014-10-29 10:29:39 -07:00
Daniel Smith 94e736e286 Merge pull request #2009 from smarterclayton/unify_meta
Unify Accessor for ObjectMeta/TypeMeta/ListMeta
2014-10-29 09:58:46 -07:00
Clayton Coleman 58715527aa Make DataVersionAndKind public on runtime.Scheme
Add a new ObjectTyper interface that clients can depend on for
converting between data and object to version and kind.
2014-10-29 12:10:55 -04:00
Clayton Coleman eac933eb44 Make client.Request more testable, break coupling with RESTClient
Moves polling to a function provided by the RESTClient, not innate
to Request. Moves doRequest from RESTClient to Request for clarity.
2014-10-28 23:00:24 -04:00
Daniel Smith dca7363459 Serve API version list, test with an integration test. 2014-10-28 17:35:56 -07:00
Clayton Coleman 1da5c444e8 Merge pull request #2034 from deads2k/expose-parseWatchResourceVersion
expose ParseWatchResourceVersion for downstream use
2014-10-28 19:26:46 -04:00
Dawn Chen f6db096741 Merge pull request #2022 from brendandburns/gc
Add container garbage collection.
2014-10-28 13:37:16 -07:00
Daniel Smith 55c9c06b81 Merge pull request #2001 from VojtechVitek/fix_scheme_panic
Fix reflect panic in runtime/conversion
2014-10-28 13:30:40 -07:00
deads2k 613bf93eaf expose ParseWatchResourceVersion for downstream use 2014-10-28 16:29:33 -04:00
Brendan Burns 51bf451932 Add container garbage collection. 2014-10-28 12:52:06 -07:00
Daniel Smith 66b43a5e87 fix build 2014-10-28 12:44:24 -07:00
Clayton Coleman 5cb3c10289 Merge pull request #1782 from smarterclayton/allow_put_to_set_create
Allow clients to determine the difference between create or update on PUT
2014-10-28 13:40:41 -04:00
Clayton Coleman 88cd3988f7 Merge pull request #2016 from erictune/whoami
Added /whoami and integration test for authorization.
2014-10-28 13:21:24 -04:00
Eric Tune f7ebc7d0d5 Added /_whoami and integration test for auth(z|n)
Added new endpoint /_whoami for debugging authentication.
Added integration test which checks that a user is authenticated
using token authentication.
Rearranged initialization of authenticator to support preceeding.
2014-10-28 09:33:45 -07:00
Vojtech Vitek (V-Teq) 90809c270d Use conversion.EnforcePtr() where appropriate
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:09 +01:00
Vojtech Vitek (V-Teq) 8969f0df7e Handle nil values in conversion.EnforcePtr()
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:04 +01:00
Tim Hockin 9a617344bf Merge pull request #1945 from brendandburns/tests
Add support for git volumes.
2014-10-27 16:55:37 -07:00
Brendan Burns b59e49fa13 Add support for git volumes. 2014-10-27 16:35:52 -07:00
bgrant0607 854af6b926 Merge pull request #1966 from ddysher/Stop-test-server
Stop test server in endpoint unittest.
2014-10-27 16:35:18 -07:00
bgrant0607 f28b840060 Merge pull request #1982 from thockin/dns
Respect a requested PortalIP if possible
2014-10-27 16:24:37 -07:00
Brendan Burns 455471d77d Further fixes. 2014-10-27 14:48:42 -07:00
Tim Hockin bb5ca0f91b Respect a requested PortalIP if possible 2014-10-27 14:03:52 -07:00
Joe Beda fca05982fc Merge pull request #2010 from brendandburns/fix
Fix the e2e tests and kubecfg given recent additional validation.
2014-10-27 13:43:13 -07:00
Brendan Burns df3dd288f2 Fix the e2e tests and kubecfg given recent additional validation. 2014-10-27 13:39:21 -07:00
Clayton Coleman 66ace4c270 Begin to unify ResourceVersioner and SelfLinker
Create a new MetadataAccessor interface that combines both
and use it where previously latest.ResourceVersioner and SelfLinker
were being used.

Adds Namespace to the get/set interface. Adds TODO about future
fast path for metadata (as per thockin's comment)
2014-10-27 16:00:55 -04:00
Eric Tune 245585f364 Move handler setup: cmd/apiserver -> pkg/master
Moved CORS handler setup and authorizer setup.
Will allow for integration test of authorization.
2014-10-27 11:43:12 -07:00
Clayton Coleman 126d4dcf96 Merge pull request #1978 from erictune/master_int_test
Integration test on master, not just apiserver.
2014-10-27 13:12:13 -04:00
Tim Hockin 37ffb41b81 Merge pull request #1830 from markturansky/label_validation
add RFC952 validation to labels
2014-10-27 09:54:18 -07:00
Eric Tune 40a5ca034d Integration test on master, not just apiserver.
Moved code from cmd/apiserver to pkg/master.

test/integration/client_test made to use a master object,
instead of an apiserver.Handle.

Subsequent PRs will move more handler-installation into
pkg/master, with the goal that every http.Handler of a
standalone apiserver process can also be tested
in a "testing"-style go test.

In particular, a subsequent PR will test
authorization.
2014-10-27 09:14:58 -07:00
Vojtech Vitek (V-Teq) 6a6f24b126 Fix reflect panic in runtime/conversion
Fixes `panic: reflect: call of reflect.Value.Type on zero Value`
when calling conversion.EnforcePtr() or
runtime.Scheme.ObjectVersionAndKind() from default type switch.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-27 06:01:14 +01:00
Clayton Coleman 52b582271b Typo in conversion Godoc 2014-10-26 22:21:11 -04:00
Brendan Burns 5d4d60783d Add requirements based scheduling. 2014-10-25 22:08:00 -07:00
Brendan Burns 87c77e5ba7 Start adding git volumes. 2014-10-24 20:44:08 -07:00
Daniel Smith dc7e3d6601 Merge pull request #1937 from derekwaynecarr/update_client_interface
Rework client.Interface
2014-10-24 16:26:16 -07:00
markturansky e2365b1f96 add RFC952 label validation 2014-10-24 16:01:52 -04:00
Clayton Coleman d5ee171410 Allow clients to determine the difference between create or update on PUT
PUT allows an object to be created (http 201).  This allows REST code to
indicate an object has been created and clients to react to it.

APIServer now deals with <-chan RESTResult instead of <-chan runtime.Object,
allowing more data to be passed through.
2014-10-24 14:41:15 -04:00
Tim Hockin d6effe3c6d Rename api ErrorList for clarity 2014-10-24 09:43:14 -07:00
derekwaynecarr b7be298f54 Fix client structs to be package private 2014-10-24 11:49:04 -04:00
derekwaynecarr c6eb371c93 Fixup unit tests 2014-10-24 11:49:04 -04:00
derekwaynecarr 341e404290 Fix sync service endpoints typo 2014-10-24 11:47:30 -04:00
derekwaynecarr a18567f759 Update fake.go for client interface changes 2014-10-24 11:47:30 -04:00
derekwaynecarr 580cb5ea4f Rework client.Interface 2014-10-24 11:47:30 -04:00
Tim Hockin 2bbd11eda6 Merge pull request #1975 from smarterclayton/split_type_meta
Split TypeMeta into ObjectMeta/ListMeta
2014-10-24 08:43:00 -07:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 7550c146dc Replace struct initializers for TypeMeta with ObjectMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bc748fadfa Whitespace and old comment removal 2014-10-24 11:22:21 -04:00
Clayton Coleman 1ffc82dfe6 createPod should copy the labels, not edit them in place 2014-10-24 11:22:21 -04:00
Clayton Coleman 2475eb06cb Remove use of embedded TypeMeta accessor 2014-10-24 11:22:20 -04:00
Clayton Coleman 0f011a055f Implement conversions for v1beta1/2 to internal ObjectMeta 2014-10-24 11:22:20 -04:00
Clayton Coleman 09800643e2 Change validation now that namespace is on ObjectMeta 2014-10-24 11:22:20 -04:00
Clayton Coleman 55163a7df1 Split TypeMeta into ObjectMeta and TypeMeta 2014-10-24 11:22:20 -04:00
Tim Hockin 0a202354b9 Fix race between syncPod and syncPods 2014-10-23 15:53:26 -07:00
Tim Hockin 099934d49f Cleanups in syncPod 2014-10-23 15:53:26 -07:00
Tim Hockin 76c33a88b6 Remove redundancy in SyncPods 2014-10-23 15:53:26 -07:00
Tim Hockin 36a05ee871 Improve kubelet logging 2014-10-23 15:53:26 -07:00
Tim Hockin 487867bd01 Extract cadvisor code to cadvisor.go 2014-10-23 15:53:26 -07:00
Tim Hockin de3060e4eb Rename httpGetInterface to httpGetter 2014-10-23 15:53:26 -07:00
Daniel Smith e46af6e37f Merge pull request #1969 from smarterclayton/new_typemeta
Allow Meta lookup to work across ObjectType and ListMeta
2014-10-23 15:29:57 -07:00
Clayton Coleman 3df1c2f29d Use meta.Interface and meta.Accessor 2014-10-23 18:01:25 -04:00
Clayton Coleman 3a89883223 EtcdHelper.decodeList was not properly returning errors 2014-10-23 16:48:16 -04:00
Clayton Coleman e5c924585c Add support for ObjectMeta and ListMeta lookup 2014-10-22 23:56:49 -04:00
Clayton Coleman 35eaf90255 Add UID to MetaAccessor and Ref 2014-10-22 22:59:15 -04:00
Clayton Coleman 1ccb86c760 Rename methods in api/meta to be cleaner 2014-10-22 22:59:12 -04:00
Clayton Coleman 64d98cba73 Move typemeta.go to api/meta/meta.go
Prepares for the meta object to front multiple underlying types
when TypeMeta and ObjectMeta is split in internal and v1beta3, but
combined in v1beta1 and v1beta2
2014-10-22 22:28:06 -04:00
Deyuan Deng f14eebf6bf Stop test server in endpoint unittest. 2014-10-22 20:14:39 -04:00
Clayton Coleman dd8c49fc47 Merge pull request #1746 from hmrm/refactor-kubelet-access
Refactor kubelet access and add SSL
2014-10-22 19:44:43 -04:00
Daniel Smith 6ef6ff5bc5 Merge pull request #1893 from crhym3/fix-1149-req-body
Replace custom ProxyServer (kubecfg/kubectl -proxy) with httputil.ReverseProxy
2014-10-22 15:29:59 -07:00
Haney Maxwell 3160500940 Refactor kubelet access and add SSL 2014-10-22 14:53:59 -07:00
Clayton Coleman 91d9a90e4e Replace use of "id" in strings with "name" 2014-10-22 15:59:12 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Dawn Chen bdebff5b28 Merge pull request #1955 from lavalamp/fix3
Add client time to events
2014-10-22 11:25:01 -07:00
Daniel Smith ad1212b9af Add client time to events 2014-10-22 11:12:17 -07:00
Deyuan Deng 1a8016fd1f Add create/delete minion to client interface. 2014-10-21 22:06:07 -04:00
Daniel Smith 91efe51770 Merge pull request #1829 from jhadvig/proxy_flush
Flush data periodically instead of their buffering
2014-10-21 17:01:15 -07:00
Joe Beda 2a30ce65c5 Merge pull request #1932 from derekwaynecarr/fix_typo_kubectl
Fix typo in kubectl
2014-10-21 14:55:20 -07:00
Dawn Chen b16a4c0c88 Merge pull request #1933 from deads2k/dev/deads/add-namespace-unit-tests
add unit tests for rejection of conflicting namespaces
2014-10-21 14:49:54 -07:00
Dawn Chen 9cac86c473 Merge pull request #1707 from proppy/kubelet-runonce-check
runonce: better container state detection
2014-10-21 14:22:41 -07:00
Daniel Smith 48196d6291 Merge pull request #1935 from ironcladlou/reflector-tests
Fix line-jumping bug in FIFO implementation
2014-10-21 13:47:07 -07:00
Johan Euphrosine 14c3b9d900 runonce: handle inspect error 2014-10-21 13:38:11 -07:00
Dan Mace 51ec53e2af Fix line-jumping bug in FIFO implementation
Keep the FIFO's internal set in sync with the queue during Add/Update
operations to prevent a queue line-jumping scenario (described in a
new unit test).
2014-10-21 16:37:32 -04:00
deads2k 34b5861b60 add unit tests for rejection of conflicting namespaces 2014-10-21 15:57:02 -04:00
derekwaynecarr bce1c12e01 Fix typo in kubectl 2014-10-21 15:30:43 -04:00
Johan Euphrosine 6cd0c261b3 runonce: better container state detection 2014-10-21 12:00:51 -07:00
Clayton Coleman fa4e186e54 Merge pull request #1911 from erictune/token_client
Handle auth files with BearerToken sections.
2014-10-21 14:08:42 -04:00
alex fb2b15a797 Replace custom proxy with httputil.ReverseProxy for kubecfg/kubectl.
Fixes #1149 - kubecfg proxy "411 Length Required" error on POST/PUT.
2014-10-21 18:52:18 +01:00
Dawn Chen d7bd6d5177 Merge pull request #1927 from VojtechVitek/typos
Fix typos
2014-10-21 10:23:17 -07:00
Vojtech Vitek (V-Teq) 755d4d441a Fix typos 2014-10-21 18:57:20 +02:00
Brendan Burns b47486abe7 Merge pull request #1771 from vishh/native_exec
Use native exec support in docker instead of exec'ing nsinit in kubelet.
2014-10-21 07:32:07 -07:00
Brendan Burns b74854895e Merge pull request #1921 from smarterclayton/http_listen_err_is_fatal
ListenAndServe on Kubelet server should be a fatal error
2014-10-21 07:23:59 -07:00
jhadvig f759bfdf71 Implementing Flush method to httplog 2014-10-21 09:33:00 +02:00
Clayton Coleman d0ef3f0596 ListenAndServe on Kubelet server should be a fatal error 2014-10-21 00:10:35 -04:00
Eric Tune 21dae01005 Handle auth files with BearerToken sections. 2014-10-20 17:02:03 -07:00
Tim Hockin e8686429c4 Merge pull request #1916 from lavalamp/fix
Add read-only, rate limited endpoint
2014-10-20 16:42:46 -07:00
jhadvig 69c7228006 Flush data periodically instead of their buffering 2014-10-21 01:39:01 +02:00
Daniel Smith 9356ed7fe7 Add read-only, rate limited endpoint 2014-10-20 16:32:52 -07:00
Clayton Coleman 3f8d30881c Sort of pods in test case was incorrect 2014-10-20 17:45:01 -04:00
derekwaynecarr 51aeb6bcd1 Add unit test for namespace aware proxy 2014-10-20 16:26:51 -04:00
bgrant0607 71c6f8ee5c Merge pull request #1875 from lavalamp/fix3
fix typo
2014-10-20 12:13:43 -07:00
Dawn Chen dd74c2e986 Merge pull request #1895 from thockin/klet_logs
Better config-file logging in kubelet
2014-10-20 12:08:59 -07:00
Tim Hockin c5388e9a30 Merge pull request #1884 from lavalamp/fix4
Get rid of old minion proxy code in favor of new, better proxy code
2014-10-20 11:50:52 -07:00
Daniel Smith bf942e859f remove old proxy code. 2014-10-20 11:28:12 -07:00
Daniel Smith f748e2d2c5 Implement redirection & proxying for minions 2014-10-20 11:28:12 -07:00
Daniel Smith 82bbcee8d9 Move port definitions to their own package 2014-10-20 11:28:12 -07:00
Daniel Smith 082a9d8af9 fix typo 2014-10-20 10:28:38 -07:00
Tim Hockin 87b0b3ad67 Better config-file logging in kubelet 2014-10-20 08:49:55 -07:00
derekwaynecarr 5e01c804fd Fixup apiserver proxy to be namespace aware 2014-10-20 10:39:16 -04:00
Michal Fojtik 0bccce4520 Move error about connecting to healthz server to V(1) 2014-10-20 15:31:01 +02:00
Tim Hockin 783c0d7532 Merge pull request #1865 from brendandburns/kubelet
Support updates in the kubelet.
2014-10-17 17:21:16 -07:00
Tim Hockin 8d37319982 Fix borrow and carry in IPAllocator 2014-10-17 17:13:22 -07:00
Dawn Chen 8858c5f897 Merge pull request #1871 from derekwaynecarr/handle_container_logs_on_alternate_namespace
handleContainerLogs needs a namespace to address a pod
2014-10-17 15:42:11 -07:00
Joe Beda ee1d426a42 Merge pull request #1882 from lavalamp/fix
fix broken test
2014-10-17 15:38:48 -07:00
Dawn Chen 7611c839e9 Merge pull request #1873 from derekwaynecarr/kubelet_handleRun_namespace_aware
Make kubelet handleRun work for pods in non-default namespace
2014-10-17 15:23:40 -07:00
Daniel Smith f1e0290605 fix broken test 2014-10-17 15:21:03 -07:00
Eric Tune 12fa0f0e30 Merge pull request #1864 from lavalamp/fix
Error instead of crash on GetRef of nil object
2014-10-17 14:23:43 -07:00
Eric Tune 1c4e9300f2 Merge pull request #1867 from derekwaynecarr/pod_cache_kubelet_update
Fixup kubelet handlePodInfo to be namespace aware
2014-10-17 14:18:43 -07:00
Eric Tune 67fec22576 Merge pull request #1874 from derekwaynecarr/fix_typo_etcd
Fix typo etcd registry
2014-10-17 14:02:25 -07:00