Commit Graph

6617 Commits

Author SHA1 Message Date
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
derekwaynecarr
e2c888795c Fix typo etcd registry 2014-10-17 16:22:57 -04:00
derekwaynecarr
1f094d973d make kubelet handleRun work for pods in non-default namespace 2014-10-17 16:12:26 -04:00
derekwaynecarr
897f1b3ab5 handleContainerLogs needs a namespace to address a pod 2014-10-17 16:00:50 -04:00
Eric Paris
3cd74bb8a8 Fix typo "replicationContollers" 2014-10-17 15:44:31 -04:00
derekwaynecarr
d590af2ce5 Fixup kubelet handlePodInfo to be namespace aware 2014-10-17 14:42:46 -04:00
Daniel Smith
99e1e2fd25 Merge pull request #1861 from derekwaynecarr/fix_watch_endpoints
Error when watching service endpoints across all namespaces
2014-10-17 11:06:59 -07:00
Brendan Burns
aa55e87ac2 Support updates in the kubelet. 2014-10-17 11:02:21 -07:00
Daniel Smith
0c58ee98c8 Error instead of crash on GetRef of nil object 2014-10-17 10:49:43 -07:00
derekwaynecarr
1d6c937183 Wrong method call to watch service endpoints key 2014-10-17 13:34:42 -04:00
deads2k
2c35c06727 report originating error for GetReference failure 2014-10-17 12:52:41 -04:00
Vishnu Kannan
7b3db4d41b Use native exec support in docker instead of execing nsinit in kubelet. 2014-10-17 10:04:46 +00:00
Tim Hockin
a1dc200fd4 Merge pull request #1840 from eparis/bind_pods
Bind pods
2014-10-16 16:58:03 -07:00
Clayton Coleman
26cff8b9bf Rename the etcd path for pods to be /registry/nodes/<>/boundpods 2014-10-16 19:29:08 -04:00
Clayton Coleman
6ae611aedd Write BoundPods to etcd instead of ContainerManifestList
Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
2014-10-16 19:29:08 -04:00
Clayton Coleman
892942af8f Read BoundPods from etcd instead of ContainerManifestList
There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
2014-10-16 19:29:08 -04:00
derekwaynecarr
d4e1076306 Fix etcd in proxy for namespace awareness 2014-10-16 16:28:06 -07:00
Tim Hockin
332a03b085 Merge pull request #1844 from lavalamp/fix
Don't accept empty input in DecodeInto
2014-10-16 16:27:49 -07:00
Dawn Chen
792bd214db Merge pull request #1848 from lavalamp/fix2
Fix dangerous Sprintf
2014-10-16 15:00:56 -07:00
Daniel Smith
1f9a4750b5 Fix dangerous Sprintf 2014-10-16 14:36:36 -07:00
Dawn Chen
b6057adb41 Merge pull request #1822 from lavalamp/eventing3
Add lock to fake handler to avoid races.
2014-10-16 14:00:04 -07:00
bgrant0607
9edd8a104c Merge pull request #1833 from erictune/authz
Add forbidden error.
2014-10-16 13:39:17 -07:00
Daniel Smith
71126e79d1 Don't accept empty input in DecodeInto 2014-10-16 13:38:18 -07:00
bgrant0607
641f72096f Merge pull request #1824 from ghodss/no_headers_kubectl
Add --no-headers to kubectl get
2014-10-16 13:37:25 -07:00
derekwaynecarr
085ca40291 Enforce unique constraint at namespace boundary in etcd, make client and server namespace aware 2014-10-16 13:02:52 -04:00
derekwaynecarr
b63974bd21 Extract list must flatten nodes across directories 2014-10-16 13:02:52 -04:00
Eric Tune
26a2bab797 Add forbidden error.
Will be used in subsequent PRs that add authorization.
2014-10-16 09:25:54 -07:00
Tim Hockin
e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -07:00
Sam Ghods
a9a8c016f7 Add --no-headers to kubectl get 2014-10-15 19:05:36 -07:00
Daniel Smith
15c5012933 Add lock to fake handler to avoid races. 2014-10-15 17:46:28 -07:00
Eric Tune
6f577aa321 Merge pull request #1789 from lavalamp/eventing4
Add event creation library and implement in scheduler.
2014-10-15 15:55:26 -07:00
Sam Ghods
4b220f8b0a kubectl: kubecfg rewrite for better modularity and improved UX 2014-10-15 15:29:54 -07:00
Daniel Smith
595d4b4abd Merge pull request #1676 from anguslees/openstack-provider
Add OpenStack cloud provider
2014-10-15 12:05:33 -07:00
Daniel Smith
1dcb25e26e Merge pull request #1754 from brendandburns/valid
Add a predicate for persistent disk scheduling.
2014-10-15 12:03:05 -07:00
Daniel Smith
2987747a0f Merge pull request #1794 from brendandburns/e2e
Add a pod update e2e test in go. Also adjust validation logic a little.
2014-10-15 11:59:30 -07:00
Daniel Smith
d4c750a878 Fix vet-go.sh and some things it complained about 2014-10-15 11:56:19 -07:00
Daniel Smith
68a784439b Add event listing and printing to kubecfg 2014-10-15 11:42:06 -07:00
Daniel Smith
10214457b7 Make scheduler emit events 2014-10-15 11:42:05 -07:00
Daniel Smith
95b855b8e6 Add event client and easy creation library 2014-10-15 11:42:05 -07:00
Clayton Coleman
fc08836ff6 Merge pull request #1791 from erictune/new_validation_err
Use Forbidden valdiation error when no capability
2014-10-15 12:07:51 -04:00
Eric Tune
a7e0ecdd0e Merge pull request #1715 from ddysher/cloud-minion
Add external loop to sync minions from cloudprovider.
2014-10-15 09:03:49 -07:00
Angus Lees
fffa0527d4 Implement Instances interface for OpenStack cloud provider 2014-10-15 14:09:27 +11:00
Angus Lees
a90d503fce Read user/pass from config and authenticate to OpenStack 2014-10-15 14:09:27 +11:00
Angus Lees
a8ab55b413 Add skeleton for new OpenStack cloud provider 2014-10-15 13:52:12 +11:00
Joe Beda
3f52a97052 Merge pull request #1786 from dchen1107/release
Release 0.4
2014-10-14 16:59:01 -07:00
Dawn Chen
3f854498fd Add 0.4-dev commit 2014-10-14 16:46:22 -07:00
Dawn Chen
4452163ffd Rev the version to 0.4 2014-10-14 16:46:22 -07:00
Brendan Burns
8d38f8890e Add an e2e test in go. Also adjust validation logic a little to make it more reasonable.
Not integrated into existing e2e yet.
2014-10-14 16:43:00 -07:00
Dawn Chen
33ef0ca159 Make watching error logging message less severe since it is expected.
Fix #1653
2014-10-14 16:42:28 -07:00
Eric Tune
bb5a17488f Use Forbidden valdiation error when no capability 2014-10-14 16:14:28 -07:00
Deyuan Deng
2bd88d4544 Remove OnceAndForever util, create a Run() method on MinionController. 2014-10-14 18:47:42 -04:00
Deyuan Deng
ec46e94dc2 Create MinionController to sync minions from cloudprovider (pkg cloudprovider/controller). 2014-10-14 18:45:25 -04:00
Daniel Smith
c135f8a83e Merge pull request #1777 from dchen1107/status
After all containers in a pod started, If any one container is still run...
2014-10-14 10:55:46 -07:00
Dawn Chen
f01fd8ff38 After all containers in a pod started. If any one container is still running,
or in the process of restarting, mark pod status running.

Fix #1758.
2014-10-14 10:26:31 -07:00
Clayton Coleman
73dba3a613 Move FindTypeMeta into the proper file 2014-10-13 23:29:40 -04:00
Clayton Coleman
485106e270 Remove unused code 2014-10-13 23:29:39 -04:00
Clayton Coleman
13992837ea Use one copy of EnforcePtr 2014-10-13 23:29:39 -04:00
Clayton Coleman
d488e238dd Genericize MetaInsertionFactory into a simpler interface
The common path code for MIF goes through a conversion cycle - it
can also be done through reflection. This simplifies the Create/Update
methods into Interpret (return version) and Update (through reflection).

In addition it uses only one MetaFactory implementation across all of
our packages which reduces a bit of duplication.
2014-10-13 23:29:39 -04:00
Daniel Smith
841e9e87ff Merge pull request #1713 from brendandburns/update
Add update to the pod etcd handler.
2014-10-13 17:42:30 -07:00
Brendan Burns
4380637be7 Add update to the pod etcd handler. 2014-10-13 17:27:31 -07:00
Brendan Burns
dcef90f487 Merge pull request #1752 from ddysher/scheduler-race
Use DesiredState.Host in scheduler predicate
2014-10-13 16:16:42 -07:00
Tim Hockin
6820e068f1 Merge pull request #1700 from lavalamp/eventing2
Add Event Registry/REST types
2014-10-13 16:16:29 -07:00
Daniel Smith
8007614085 Remove untested and unused code 2014-10-13 16:06:44 -07:00
Brendan Burns
47c4b8fc98 Add a predicate for persistent disk scheduling. 2014-10-13 15:38:25 -07:00
Daniel Smith
38bf2f30fb fix missing error type in watch decode 2014-10-13 15:03:17 -07:00
Daniel Smith
d34914517f Shorten 'CodecForVersionOrDie' name, add 'ResourceVersioner' to testapi 2014-10-13 14:58:06 -07:00
Deyuan Deng
19c62d719c Use DesiredState.Host in scheduler predicate 2014-10-12 17:03:23 -04:00
Brendan Burns
695fbee343 Merge pull request #1742 from dchen1107/termination
Set EmptyDir when VolumeSource is absent.
2014-10-10 16:27:26 -07:00
Daniel Smith
b1a6b3eee8 Split generic; add test, address other review comments 2014-10-10 15:47:34 -07:00
Daniel Smith
d3d9f7ac8b ObjectDiff moved after rebase 2014-10-10 15:47:34 -07:00
Daniel Smith
15680731f7 Add event endpoint to apiserver 2014-10-10 15:47:34 -07:00
Daniel Smith
3e076e12fe Add event registry and type 2014-10-10 15:46:49 -07:00
Daniel Smith
9a9362e896 Add generic registry object so we can stop rewriting this code 2014-10-10 15:46:49 -07:00
Daniel Smith
1c75d7646e Shorten 'CodecForVersionOrDie' name, add 'ResourceVersioner' to testapi 2014-10-10 15:46:49 -07:00
Dawn Chen
c511b7a0ce Fix #1683 2014-10-10 15:34:48 -07:00
Dawn Chen
135d187942 Merge pull request #1736 from brendandburns/scheduler
Switch away from the static node info
2014-10-10 15:01:09 -07:00
Brendan Burns
e6fa568ad4 Switch away from the static node info 2014-10-10 14:08:09 -07:00
Daniel Smith
a292d8c416 Merge pull request #1667 from hmrm/add-kubelet-disable-flags
Allow disabling non-necessary kubelet and apiserver endpoints
2014-10-10 13:38:11 -07:00
Dawn Chen
5f97413dd5 Merge pull request #1663 from smarterclayton/separate_pod_state_for_health_check
Refactor HealthCheck to take podUUID as its own argument
2014-10-10 09:11:59 -07:00
Brendan Burns
9ffa69ce15 Merge pull request #1696 from derekwaynecarr/pod_cache_needs_namespace
Pod cache needs to be namespace-aware
2014-10-10 08:28:32 -07:00
derekwaynecarr
9e60bf1e43 Pod cache needs to be namespace-aware 2014-10-10 09:35:31 -04:00
bgrant0607
a567c2c27f Merge pull request #1692 from smarterclayton/support_name_type_mappings
Allow multiple names to resolve to a type in a Scheme
2014-10-09 21:02:10 -07:00
Tim Hockin
d84816aaec Merge pull request #1709 from erictune/move_line
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -07:00
Daniel Smith
7bb1bdd693 Merge pull request #1711 from erictune/vets
Use pointer for struct holding lock.
2014-10-09 17:25:54 -07:00
Eric Tune
42f6324183 Use pointer for struct holding lock. 2014-10-09 17:16:21 -07:00
Eric Tune
800284164a Fix format specifiers in Printf-type functions. 2014-10-09 17:06:32 -07:00
Daniel Smith
9b42f62da3 Merge pull request #1705 from erictune/dead
Delete unused function.
2014-10-09 17:05:34 -07:00
Haney Maxwell
c0bf974871 Allow disabling non-necessary kubelet and apiserver endpoints 2014-10-09 16:49:27 -07:00
Eric Tune
8296f038ac Delete unused function. 2014-10-09 16:40:11 -07:00
Clayton Coleman
5382627e6a Move Codec functions to their own file 2014-10-09 17:25:23 -04:00
Clayton Coleman
935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
Clayton Coleman
96f0c37a31 Allow multiple names to resolve to a type in a Scheme
Allows decoding multiple names into a single type, necessary for
v1beta3 (rename of Minion -> Node)
2014-10-09 17:14:55 -04:00
Dawn Chen
0f1455ac71 Merge pull request #1687 from erictune/fix_dockercfg
Handle and log errors when reading .dockercfg
2014-10-09 14:00:24 -07:00
Clayton Coleman
95cb2e3eb3 Refactor HealthCheck to take podUUID arguments
PodState is going away (won't have podUUID anymore)
2014-10-09 16:42:55 -04:00
Clayton Coleman
eea77a1449 Backport the BoundPods type to v1beta1/2/internal 2014-10-09 16:39:55 -04:00
Eric Tune
4e0a72734e Handle and log errors when reading .dockercfg 2014-10-09 13:22:14 -07:00
Dawn Chen
e91f9087e9 Merge pull request #1682 from hmrm/add-mutual-ssl-support
Add ssl flags to default client flags
2014-10-09 11:59:23 -07:00
Brendan Burns
b5ec8a747b Switch on the resource requested prioritization. 2014-10-09 11:29:45 -07:00
Haney Maxwell
e0a80dda30 Add ssl flags to default client flags
This adds support for mutual ssl between the proxy, controller-manager,
scheduler, and the apiserver
2014-10-09 10:57:15 -07:00
Dawn Chen
b3292e947f Merge pull request #1674 from ddysher/minion-api
Change ContainsMinion to GetMinion
2014-10-09 10:46:38 -07:00
Dawn Chen
ed4167a938 Merge pull request #1670 from proppy/fix-kubelet-runonce
kubelet: only check for container listed in the manifest
2014-10-09 09:31:12 -07:00
erictune
aa30423dc9 Merge pull request #1337 from brendandburns/Sarsate-pd-support
Taking over PD support from sarsate
2014-10-09 09:16:04 -07:00
Johan Euphrosine
0fc5e68207 runonce: isPodRunning returns no error 2014-10-08 22:34:40 -07:00
Johan Euphrosine
8f010c3ec0 dockertools: add todo for container lookup 2014-10-08 22:31:59 -07:00
Johan Euphrosine
dbb2342688 runonce: list kubelet container between each iteration 2014-10-08 22:28:41 -07:00
Deyuan Deng
15e5b876b8 Change ContainsMinion to GetMinion 2014-10-08 23:41:15 -04:00
Brendan Burns
7fe71c68b7 Update the ux. 2014-10-08 20:16:59 -07:00
Danny Jones
4ec25f3b81 Adds support for attaching GCEPersitentDisks
Adds GCEPersistentDisk volume struct
Adds gce-utils to attach disk to kubelet's VM.
Updates config to give compute-rw to every minion.
Adds GCEPersistentDisk to API
Adds ability to mount attached disks
Generalizes PD and adds tests.
PD now uses an pluggable API interface.
Unit Tests more cleanly separates TearDown and SetUp
Modify boilerplate hook to omit build tags
Adds Mounter interface; mount is now built by OS
TearDown() for PD now detaches disk on final refcount
Un-generalized PD; GCE calls moved to cloudprovider

Address comments.
2014-10-08 20:03:59 -07:00
Johan Euphrosine
14c5fd405d kubelet: only check for container listed in the manifest
also wait 1 retryDelay before polling state after syncing.
2014-10-08 17:49:21 -07:00
Daniel Smith
1a1b0699bc Merge pull request #1604 from brendandburns/resource
Add a least-requested priority function
2014-10-08 17:26:57 -07:00
Daniel Smith
1fc92bef53 Load cadvisor connection in background. 2014-10-08 17:06:41 -07:00
Daniel Smith
5d24820dd5 Merge pull request #1464 from hmrm/add-etcd-config
Allow etcd config file to be passed to apiserver, kubelet, and proxy
2014-10-08 16:29:46 -07:00
Brendan Burns
4230a8ca61 Add a least-requested priority function 2014-10-08 15:31:38 -07:00
Daniel Smith
af5714da12 Fix v1beta2 types having been copied incorrectly. 2014-10-08 14:15:50 -07:00
Daniel Smith
e1cb72f1ae Merge pull request #1643 from smarterclayton/make_resource_version_a_string
Make ResourceVersion internally a string instead of uint64
2014-10-08 14:00:37 -07:00
Clayton Coleman
094bc3796a Update ObjectReference to use ResourceVersion string everywhere
Breaks backwards compat for anyone using older versions
2014-10-08 15:57:38 -04:00
Daniel Smith
9ffe821bfd Merge pull request #1657 from brendandburns/nginx
Add a css file I forgot.
2014-10-08 12:34:33 -07:00
Brendan Burns
06a4593f25 Add a css file I forgot. 2014-10-08 12:28:31 -07:00
deads2k
e348b939bf make api match intent with less specific type 2014-10-08 10:01:55 -04:00
Tim Hockin
45f9f39b51 Merge pull request #1597 from thockin/iptables
Add a pkg for iptables support
2014-10-07 17:31:34 -07:00
Tim Hockin
2f2ef05fa8 Merge pull request #1646 from dchen1107/termination
Fix an issue on GetContainerInfo.
2014-10-07 17:27:56 -07:00
Dawn Chen
300c2c5f6f Fix an issue on GetContainerInfo.
I believe the issue was first introduced when we append namespace to docker
container's name. This is a temporary fix for #160.
2014-10-07 17:21:24 -07:00
Clayton Coleman
a5462c0678 Change test cases to verify the client sends the received resourceVersion 2014-10-07 19:00:26 -04:00
Clayton Coleman
82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Deyuan Deng
9047baa111 Add codec to restlient test. 2014-10-07 18:26:26 -04:00
Haney Maxwell
4d87159eda Allow etcd config file to be passed to apiserver, kubelet, and proxy 2014-10-07 14:25:54 -07:00
Tim Hockin
48a9ed3147 Merge pull request #1637 from lavalamp/fix
Fix 'go vet' issues
2014-10-07 14:25:41 -07:00
Daniel Smith
ee107d3fad fix extra un-cosmetic extraneous code. 2014-10-07 14:08:18 -07:00
Daniel Smith
4dd3094035 Fix mismatched arg and formatter in Errorf 2014-10-07 14:03:06 -07:00
Daniel Smith
9c0fafee39 Merge pull request #1636 from dchen1107/termination
Add the missing arg in Errorf.
2014-10-07 14:01:55 -07:00
Daniel Smith
2dde76bd03 Fix struct tag in apparently untested config struct 2014-10-07 14:01:45 -07:00
Daniel Smith
2d048bc0f2 fix captured loop variable 2014-10-07 13:57:30 -07:00
Daniel Smith
7ffe791486 fix error message in validation test 2014-10-07 13:54:41 -07:00
Dawn Chen
73c8f41737 Add the missing arg in Errorf. 2014-10-07 13:53:25 -07:00
Daniel Smith
3a62089790 Fix malformed namespace json tag 2014-10-07 13:52:51 -07:00
Daniel Smith
386caae675 Merge pull request #1478 from ddysher/minion-etcd
Use etcd as backend for minion registry.
2014-10-07 13:36:09 -07:00
Brendan Burns
5bdb061f14 Fix the exec test, on os x false and true have different paths, but they're in $PATH on all. 2014-10-07 13:26:25 -07:00
Deyuan Deng
4de810efb4 Rebase to master, change JSONBase to TypeMeta. 2014-10-07 16:22:36 -04:00
Deyuan Deng
c3d9197a4b Rename InsertMinion to CreateMinion. 2014-10-07 16:22:35 -04:00
Deyuan Deng
4a35325f29 Use etcd as backend for minion registry. 2014-10-07 16:22:35 -04:00
Tim Hockin
4bbe6a10ff Add a pkg for iptables support
This makes iptables an injectable dependency.  The test for this started off
simple, but got a bit out of hand.  It's starting to become a mocking
framework.
2014-10-07 11:36:46 -07:00
Daniel Smith
3cc2aa8f76 Merge pull request #1622 from smarterclayton/types_fixup
Add new metadata to internal/v1beta(1|2) for v1beta3
2014-10-07 11:35:23 -07:00
Daniel Smith
051d50e98d Merge pull request #1592 from thockin/utilexec
Add a util/exec interface for testing execs.
2014-10-07 11:26:27 -07:00
erictune
5503e95c1d Merge pull request #1529 from smarterclayton/add_auth_interfaces
Add simple Bearer authenticator filter for Kube
2014-10-07 11:23:41 -07:00
Clayton Coleman
338ee1e458 Add additional debugging output on mistyped conversion 2014-10-07 14:09:01 -04:00
Clayton Coleman
0a4d4b43f6 Move IsAnAPIObject() declarations to register.go
* Add Namespace, UID, Annotations to internal/v1beta1/v1beta2
* Update v1beta3 with minor consistency tweaks
2014-10-07 14:09:01 -04:00
Clayton Coleman
897c59a713 Merge pull request #1598 from brendandburns/nginx
Add UX documentation, link into the apiserver, add a missing file.
2014-10-07 14:06:20 -04:00
Daniel Smith
0212c9b29a Merge pull request #1623 from smarterclayton/rename_jsonbase
Rename JSONBase -> TypeMeta in preparation for v1beta3
2014-10-07 10:50:28 -07:00
Clayton Coleman
c8ef4b8230 Add simple Bearer authenticator filter for Kube
* Default file based implementation
* Define some simple interfaces
* Add -token_auth_file to apiserver that will start the apiserver
  with a request filter for tokens
2014-10-07 13:25:12 -04:00
Daniel Smith
11c2b1ea93 Merge pull request #1621 from smarterclayton/move_helpers
Move Policy test helpers into their own file
2014-10-07 09:58:31 -07:00
Brendan Burns
414473607a Update the UX, add documentation. 2014-10-07 09:49:49 -07:00
Joe Beda
c7e88427dc Merge pull request #1619 from VojtechVitek/typo
Fix typo
2014-10-07 09:04:04 -07:00
Clayton Coleman
d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Clayton Coleman
363d6554ae Move Policy test helpers into their own file
Since types.go should always be equal to latest API types.go, this
makes future cut and paste refactors easier.
2014-10-07 10:24:40 -04:00
Vojtech Vitek (V-Teq)
0ffb1d7fec Fix typo 2014-10-07 14:14:00 +02:00
Brendan Burns
e294cef9d4 Merge pull request #1611 from thockin/netipnet
Add a flag-compatible wrapper for net.IPNet
2014-10-06 21:34:45 -07:00
Brendan Burns
b2dd4acc43 Merge pull request #1616 from brendandburns/kubelet
Fix a problem with for loops, copy semantics and async routines.
2014-10-06 21:26:49 -07:00
Brendan Burns
7ecd8d7207 Fix a problem with for loops, copy semantics and async routines. 2014-10-06 21:20:00 -07:00
bgrant0607
3e2ace5f54 Merge pull request #951 from meirf/selector-string-form
extend selector with EXISTS, new tests/some old tests use table-driven style
2014-10-06 21:15:46 -07:00
Tim Hockin
0d74fe74cd Add a flag-compatible wrapper for net.IPNet 2014-10-06 18:28:49 -07:00
Meir Fischer
89a9e5e672 extend selector with EXISTS, new tests/some old tests use table-driven style; add Has to Labels interface; enforce Requirement restrictions in constructor 2014-10-06 21:10:11 -04:00
Deyuan Deng
1454d5d174 Improve replication controller errro handling. 2014-10-06 21:02:51 -04:00
Daniel Smith
6449b30ca4 Merge pull request #1593 from thockin/utilerrlist
Move ErrorList to util
2014-10-06 16:59:34 -07:00
Brendan Burns
fca26ccc65 Merge pull request #1569 from dchen1107/termination
Initial support to propagating the termination reasons and image failures
2014-10-06 16:56:23 -07:00
Brendan Burns
130784bfdf Merge pull request #1594 from thockin/ipallocator
Add an IPAllocator type
2014-10-06 16:56:00 -07:00
Tim Hockin
20a1829dad Add a util/exec interface for testing execs. 2014-10-06 16:52:25 -07:00
Daniel Smith
e26bdd0721 Merge pull request #1591 from smarterclayton/simple_test
Add a Log method on Scheme for better debugging
2014-10-06 15:39:51 -07:00
Dawn Chen
4fdfeaa30e Addressed comments. 2014-10-06 14:41:20 -07:00
Dawn Chen
a86d496f9a Fix e2e tests. 2014-10-06 13:37:24 -07:00
Dawn Chen
39f648bda2 Fix rebase issues. 2014-10-06 13:37:23 -07:00
Dawn Chen
8d0ed93aa1 Clean unittests 2014-10-06 13:37:22 -07:00
Dawn Chen
9861eb7c8e Initial support of propogating the termination reasons and image failure
to apiserver. Deprecated docker.Container from API completely.

Conflicts:
	pkg/api/types.go
	pkg/kubelet/kubelet.go
2014-10-06 13:37:22 -07:00
Brendan Burns
ab6065944c Merge pull request #1584 from thockin/net
Flag-compatible IP type
2014-10-06 13:35:48 -07:00
Brendan Burns
7c694d2cad Merge pull request #1596 from thockin/unbound
Better handling of unbound pods.
2014-10-06 13:31:41 -07:00
Daniel Smith
cc086908aa Merge pull request #1578 from brendandburns/controller
Extract the service controller from the apiserver.
2014-10-06 12:44:41 -07:00
Tim Hockin
372aa07b58 Better handling of unbound pods.
A small collection of tweaks to better handle pods when they are not currently
bound to a host.
2014-10-06 12:27:18 -07:00
Tim Hockin
7e83211840 Move ErrorList to util 2014-10-06 12:12:35 -07:00
Tim Hockin
0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
Daniel Smith
98f9a4b05b Merge pull request #1590 from ddysher/fix-registry
Fix bug in minion registrytest.
2014-10-06 10:02:10 -07:00
Tim Hockin
8131a5ca6a Add an IPAllocator type 2014-10-06 09:02:04 -07:00
Clayton Coleman
305db35422 Add a Log method on Scheme for better debugging 2014-10-05 17:17:25 -04:00
Deyuan Deng
7bae027604 Fix bug in minion registrytest. 2014-10-05 15:55:26 -04:00
Meir Fischer
073940e66f minor comment change for grammar/consistency across v1beta* packages 2014-10-05 01:22:05 -04:00
bgrant0607
a0bb739609 Merge pull request #1534 from proppy/kubelet-noonce
kubelet: add --runonce flag
2014-10-04 15:48:44 -07:00
Tim Hockin
594e7db28f Merge pull request #1583 from ddysher/fix-#1550
Ignore empty pod port spec.
2014-10-03 20:19:07 -07:00
Sam Ghods
3de1317c15 Remove JSONBase reference from v1beta3/types.go 2014-10-03 19:01:26 -07:00
Deyuan Deng
7640280284 Ignore empty pod port spec. 2014-10-03 21:38:29 -04:00
Johan Euphrosine
fa1dcd0a8b kubelet: add basic test for runonce 2014-10-03 18:02:30 -07:00
Johan Euphrosine
f91162cf78 kubelet: add --runonce flag, exits after starting pod from the manifest 2014-10-03 18:02:30 -07:00
Deyuan Deng
a9e7cf8e40 Fix integration test read volume dir error. 2014-10-03 19:51:07 -04:00
erictune
08ac126336 Merge pull request #1577 from brendandburns/fix
Use formal error checking to validate a not found err.
2014-10-03 16:31:49 -07:00
Brendan Burns
e6991d0a66 Extract the service controller from the apiserver, put it in the controller manager for now. 2014-10-03 15:27:22 -07:00
Brendan Burns
1551b48347 Add a resource fit scheduler predicate. Set sensible defaults. 2014-10-03 15:09:59 -07:00
Brendan Burns
e6d823da71 Use formal error checking to validate a not found err. 2014-10-03 15:08:16 -07:00
Tim Hockin
bd7b4192bc Merge pull request #1559 from brendandburns/fix
Add an integration test for services.
2014-10-03 09:29:22 -07:00
bgrant0607
f23a8ef5b2 Merge pull request #1560 from brendandburns/scheduler
Add a caching layer, so we don't pound cloud providers for ip addresses.
2014-10-03 09:06:52 -07:00
Brendan Burns
a115840e4f Add a caching layer, so we don't pound cloud providers for ip addresses. 2014-10-02 21:51:09 -07:00
Brendan Burns
f00fd8d2e3 Add an integration test for services. 2014-10-02 21:07:06 -07:00
Tim Hockin
f9e5477e2b Merge pull request #1558 from smarterclayton/incorrect_validation_field_names
Some field names in validation.go not consistent
2014-10-02 21:05:00 -07:00
Clayton Coleman
0ff77ffcb3 Some field names in validation.go not consistent
Fields are (for now) JavaScript style field accessors
2014-10-02 23:43:30 -04:00
Clayton Coleman
756f4afb2c Allow Client to define arbitrary (non-default) prefix in config 2014-10-02 23:30:27 -04:00
Tim Hockin
f7db0bc674 Merge pull request #1546 from smarterclayton/allow_configurable_net_image
Allow configurable Kubelet net image for isolated networks
2014-10-02 17:11:32 -07:00
Brendan Burns
189f3dc6af Merge pull request #1552 from thockin/bugs
Actually fix services bug
2014-10-02 15:25:13 -07:00
Tim Hockin
2bac0fb2c6 Actually fix services bug 2014-10-02 15:21:28 -07:00
bgrant0607
41daef6a00 Merge pull request #1524 from brendandburns/ux
Add an initial UX prototype for Kubernetes
2014-10-02 15:05:43 -07:00
Tim Hockin
446bcd468e Merge pull request #1551 from brendandburns/fix
Fix error detection.  (a better fix is coming)
2014-10-02 14:58:11 -07:00
Brendan Burns
c260c7d0eb Fix error detection. (a better fix is coming) 2014-10-02 14:52:48 -07:00
Clayton Coleman
6881db64a9 Allow configurable Kubelet net image for isolated networks
Public access to the DockerHub is not guaranteed in all environments,
add a flag to the kubelet that allows it to use a different image (like
one on a private registry) as well as only pull the first time the
image is needed.

Fixes #1545
2014-10-02 15:56:03 -04:00
erictune
0a2e208e8f Merge pull request #1538 from smarterclayton/allow_skip_tls_verify
Allow clients to skip TLS verification
2014-10-02 11:49:40 -07:00
erictune
40f9201610 Merge pull request #1540 from derekwaynecarr/add_context_to_client_interfaces
Add context to client interfaces
2014-10-02 11:48:31 -07:00
Tim Hockin
1dda3072a4 Merge pull request #1525 from erictune/rename_dir
Directory renamed to Dir to match json property
2014-10-02 11:28:27 -07:00
derekwaynecarr
d5ec260db8 Fixup tests 2014-10-02 12:52:01 -04:00
derekwaynecarr
fc67d822c6 Add context as parameter to client interface functions 2014-10-02 12:51:36 -04:00
Clayton Coleman
c5fa765926 Merge pull request #1533 from jhadvig/upstream_k8_stream_new
Support for streaming
2014-10-02 12:49:57 -04:00
Clayton Coleman
7af3c7d75e Allow clients to skip TLS verification
Adds -skip_tls_verify to any API server client. Also store in auth
2014-10-02 12:08:58 -04:00
jhadvig
d6b1fa8e02 Support for streaming 2014-10-02 14:45:16 +02:00
Brendan Burns
c3d2517371 Re-add the ability to load certs from the config file. 2014-10-01 17:10:07 -07:00
Brendan Burns
77196403dc Add support for fields. 2014-10-01 16:49:50 -07:00
Clayton Coleman
a81dc44fc6 Revert "Stream support for k8s client request"
This reverts commit 755b598a7d.
2014-10-01 19:39:08 -04:00
Clayton Coleman
67ef24b410 Merge pull request #1506 from jhadvig/upstream_k8_stream
Stream support for client request
2014-10-01 19:32:27 -04:00
jhadvig
755b598a7d Stream support for k8s client request 2014-10-02 01:07:43 +02:00
erictune
883bb60b3a Merge pull request #1500 from smarterclayton/refactor_client_again
Refactor the client (again) to better support auth
2014-10-01 14:04:57 -07:00
Eric Tune
9c0769422d Directory renamed to Dir to match json property 2014-10-01 13:35:21 -07:00
Tim Hockin
710832b8b6 Merge pull request #1474 from brendandburns/resource
Add a resource fit predicate.
2014-10-01 13:12:28 -07:00
Tim Hockin
db49dc0012 Merge pull request #1458 from brendandburns/dontpull
Add the ability to turn off image pulling.
2014-10-01 12:40:47 -07:00
Brendan Burns
39d03948e7 Add resource fit predicates. 2014-10-01 12:38:09 -07:00
Brendan Burns
4c456015b6 Add the ability to turn off image pulling. 2014-10-01 12:34:22 -07: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
derekwaynecarr
016d394705 Remove redundant code in validation 2014-10-01 14:29:47 -04:00
derekwaynecarr
6625e58a20 Updates to review comments 2014-10-01 10:57:50 -04:00
derekwaynecarr
0312d80ffa Update test cases to use default context 2014-10-01 10:57:50 -04:00
derekwaynecarr
e4ec49ee6b Require namespace on controller, pod, service objects 2014-10-01 10:57:50 -04:00
Tim Hockin
88bf01b008 Merge pull request #1225 from smarterclayton/v1beta3_proposals
Proposal: v1beta3 API overhaul
2014-09-30 16:12:13 -07:00
Tim Hockin
ef384944bd Merge pull request #1516 from derekwaynecarr/kubecfg_ns_updates
Add ctx object to kubecfg and client
2014-09-30 15:52:00 -07:00
Dawn Chen
6f66dd71f1 Merge pull request #1497 from jhadvig/k8s_all_containers
ListContainer filter
2014-09-30 15:48:44 -07:00
jhadvig
9b21053188 ListContainer filter 2014-09-30 23:30:32 +02:00
Joe Beda
9ef1e13630 Merge pull request #1508 from brendandburns/ux
Update the proxy server so that it passes labels along too.
2014-09-30 11:48:03 -07:00
derekwaynecarr
02e1a2e79d Update unit tests to pass a context on client create 2014-09-30 14:27:56 -04:00
derekwaynecarr
b7b1193919 Add context object to kubecfg/client 2014-09-30 14:27:19 -04:00
Brendan Burns
f630104538 Update the proxy server so that it passes labels along too. 2014-09-30 09:27:20 -07:00
Dawn Chen
e284e14222 Merge pull request #1475 from lavalamp/eventing3
Add GetReference()
2014-09-29 09:18:51 -07:00
Clayton Coleman
c0247d92ce Proposal for v1beta3 API
* Separate metadata from objects
* Treat lists differently from resources
* Add UID and Annotations on Metadata
* Introduce BoundPod(s) as distinct from Pod to represent pods
  scheduled onto a host
* Use "spec" instead of "state" and "status" instead of "currentState"
  * Identify current status of objects consistently
  * Use "condition" as the string label for substatus
* All string constants should be PublicGoCapitalized
* Rename Minion -> Node
* Rename ServerOp -> Operation
* Remove ContainerManifest
* Add api-conventions.md document
* Replace PodTemplateSpec in ReplCtrl with ObjectReference
2014-09-29 12:10:36 -04:00
Tim Hockin
f2cf958540 Caps for CauseType 2014-09-27 21:48:35 -07:00
Tim Hockin
e73de49f81 Caps on StatusReason* 2014-09-27 21:38:51 -07:00
Tim Hockin
523731c509 Capitalize Status.Status 2014-09-27 21:23:51 -07:00
Tim Hockin
1c02af3d16 Kill LivenessProbe.Type 2014-09-27 21:16:30 -07:00
Tim Hockin
04cdf286a4 Make and use api.Protocol type 2014-09-27 20:31:37 -07:00
Daniel Smith
6ac7578699 Add GetReference() 2014-09-26 17:40:07 -07:00
Brendan Burns
621df0da32 Merge pull request #1455 from lavalamp/selfLink
Start setting SelfLink
2014-09-26 17:34:18 -07:00
Brendan Burns
17c82606eb Second step in decoupling the service controller, use the apiserver for writes too. 2014-09-26 16:44:25 -07:00
Daniel Smith
37e505601e add self linking to apiserver 2014-09-26 15:08:02 -07:00
Daniel Smith
b972f72248 convert multiple return values into a struct, add SelfLinker 2014-09-26 14:52:16 -07:00
Daniel Smith
75b93cf7e9 Add SelfLinker 2014-09-26 14:51:13 -07:00
Tim Hockin
de3799d605 Merge pull request #1463 from derekwaynecarr/introduce_context_obj
Add ctx object to registry interface
2014-09-26 13:04:18 -07:00
Tim Hockin
badeaef95f Merge pull request #1457 from brendandburns/pull
Add a rate limiter, use it to rate limit docker pulls.
2014-09-26 12:39:25 -07:00
derekwaynecarr
b7fcc7d3ec Add ctx to registry test cases 2014-09-26 15:19:22 -04:00
Tim Hockin
a7a46f71aa Merge pull request #1449 from brendandburns/scheduler
Refactor scheduler, use generic scheduler everywhere, delete old code.
2014-09-26 12:18:52 -07:00
derekwaynecarr
09365fed8d Add ctx to registry interfaces 2014-09-26 15:18:42 -04:00
Brendan Burns
3ac706a32e Add a rate limiter, use it to rate limit docker pulls. 2014-09-26 11:55:21 -07:00
Brendan Burns
1bb962961c Refactor schedulers, remove schedulers, use generic scheduler. 2014-09-26 10:26:25 -07:00
Tim Hockin
f377d3eba8 Merge pull request #1441 from dchen1107/cleanup
Cleanup: Remove unnecessary dash escape when building docker container name
2014-09-26 10:17:11 -07:00
Dawn Chen
01c9015ed3 use _ as the separator for docker container name. 2014-09-26 09:21:21 -07:00
derekwaynecarr
ee19ba186d Update to use api.Context 2014-09-26 11:50:34 -04:00
derekwaynecarr
be85ad7a3d Add context object in test cases flows 2014-09-26 11:50:34 -04:00
derekwaynecarr
3e685674e7 Add context object to interfaces 2014-09-26 11:50:34 -04:00
Brendan Burns
377a9ac3d7 Merge pull request #1438 from lavalamp/eventing3
Event impl supporting changes
2014-09-25 22:01:09 -07:00
Tim Hockin
7a96ed38b3 Merge pull request #1439 from jhadvig/err_handler
Handle invalid pod name
2014-09-25 15:00:47 -07:00
jhadvig
e5d8ee3811 Handle invalid pod name 2014-09-25 22:57:05 +02:00
Clayton Coleman
4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04:00
Clayton Coleman
74db9a1b20 Log apiserver errors that are not of an expected type
Currently HttpLog only expected status range - this logs errors
that come back from a REST storage object without being first
converted to something in pkg/api/errors.  This usually indicates
unexpected error conditions that a programmer didn't explicitly
check for - the kinds of problems that may need debugging by
an operator later.  Set to V(1) because they don't impair normal
operation.
2014-09-25 16:21:48 -04:00
Clayton Coleman
a5ed10235e Merge pull request #1354 from lavalamp/eventing
Add Event to api types
2014-09-25 16:20:49 -04:00
Daniel Smith
4d4ebcd38e Add ttl parameter to CreateObj 2014-09-25 12:08:14 -07:00
Daniel Smith
3ea383d073 Make ExtractToList, deprecate ExtractList. 2014-09-25 12:07:16 -07:00
Daniel Smith
957b16053a restore test that somehow vanished + add SetList 2014-09-25 12:07:07 -07:00
Tim Hockin
eea0265598 Merge pull request #1447 from lavalamp/fix
Fix type cast problems now that watch can pass errors
2014-09-25 12:06:17 -07:00
Daniel Smith
212f5305a8 Fix type cast problems now that watch can pass errors 2014-09-25 11:42:58 -07:00
Brendan Burns
44703efe2e Simplify schedulers. 2014-09-25 11:36:22 -07:00
Daniel Smith
283eaf3931 Add new Event type
* replaces previous Event type, which is too limited.
* Remove writing of old event type.
* Fix serialiazation test to automatically test all types.
2014-09-25 11:31:35 -07:00
Daniel Smith
da92a016f5 Merge pull request #1420 from brendandburns/scheduler
Initial cut of a spreading and generic scheduler.
2014-09-25 11:10:53 -07:00
Brendan Burns
0cf8f28112 Refactor the code to make it more readable. 2014-09-25 10:49:36 -07:00
Brendan Burns
431caa93df Merge pull request #1335 from dchen1107/exit1
Convert existing kubernetes system to use ContainerStatus, instead of
2014-09-24 21:37:24 -07:00
Brendan Burns
a981ae5480 Merge pull request #1433 from lavalamp/fixVerifyFmt
Fix verify gofmt
2014-09-24 15:44:38 -07:00
Brendan Burns
9ed8486fd7 Add a generic scheduler. 2014-09-24 15:38:52 -07:00
Brendan Burns
25b4939ffa Initial cut of a spreading scheduler. 2014-09-24 15:38:52 -07:00
Tim Hockin
65c14a1b09 Merge pull request #1421 from brendandburns/resource
Generalize the fit scheduler.
2014-09-24 15:37:24 -07:00
Daniel Smith
bb0cd95a83 fix non-gofmt'd things 2014-09-24 14:27:10 -07:00
Brendan Burns
89547cfd79 Merge pull request #1431 from thockin/svcenv
Fix docker-links-style env vars for services
2014-09-24 14:24:02 -07:00
Brendan Burns
d900fbf6fc Generalize the fit scheduler.
Extract the "fit predicate" from random fit to make it extensible/plugable
2014-09-24 13:56:40 -07:00
Tim Hockin
b2472d8bec Fix docker-links-style env vars for services
This includes 3 changes:

1) Use the Service.Protocol field, rather than hardcoding TCP.
2) Use Service.Port rather than ContainerPort - ContainerPort can be a string
   and has absolutely no meaning to consumers.
3) Beef up tests for these env vars.
2014-09-24 12:29:06 -07:00
Tim Hockin
f1f54ac72e Merge pull request #1415 from thockin/svcenv
Add per-service env vars for *_SERVICE_HOST
2014-09-24 12:27:27 -07:00
Dawn Chen
66eadb514a fix rebase issue. 2014-09-24 11:16:47 -07:00
Dawn Chen
0e6ec3cbfc Convert existing kubernetes system to use ContainerStatus, instead of
docker.Container directly.

Conflicts:
	pkg/kubelet/dockertools/docker.go
	pkg/registry/pod/rest.go
2014-09-24 11:16:46 -07:00
Joe Beda
e1a07c0c02 Merge pull request #1424 from dchen1107/cleanup
Fix e2e testing issue
2014-09-24 10:25:06 -07:00
Dawn Chen
bdfd5045f3 Refactory a little bit. 2014-09-24 09:41:30 -07:00
Tim Hockin
089c5602fd Add per-service env vars for *_SERVICE_HOST
As a replacement of a single SERVICE_HOST variable, offer a FOO_SERVICE_HOST
variable.  This will help ease the transition to ip-per-service, where there
is no longer a single service host.

# *** ERROR: *** Some files are missing the required boilerplate
# header from hooks/boilerplate.txt:
#   examples/guestbook/redis-slave/run.sh
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_BOILERPLATE
2014-09-24 09:07:21 -07:00
Dawn Chen
4796120f70 Debugging to fix e2e testing issue 2014-09-23 17:35:50 -07:00
jhadvig
d2709ab9c1 Typo fix 2014-09-24 01:33:39 +02:00
Brendan Burns
253bce42fe Extract the minion registry from the etcd implementation into the pod registry where it belongs. 2014-09-23 15:42:59 -07:00
Clayton Coleman
b0b7f13ade Merge pull request #1404 from lavalamp/scheduler
Add error type to watch.
2014-09-23 11:28:29 -04:00
Abhishek Gupta
002a5c6c29 Added test case 2014-09-22 17:40:18 -07:00
Abhishek Gupta
7c662ff065 Adding GetEndpoints method to the client EndpointsInterface 2014-09-22 17:40:18 -07:00
Daniel Smith
f211e46f20 handle watch errors everywhere 2014-09-22 17:37:12 -07:00
Joe Beda
d65f8e3b90 Merge pull request #1397 from thockin/kubecfg
Make "kubecfg -s <port> run ..." select correctly
2014-09-22 17:21:45 -07:00
Daniel Smith
8fd1fb4337 update pkg/api documentation 2014-09-22 17:08:57 -07:00
Daniel Smith
265f889260 convert etcd errors to watch errors 2014-09-22 17:06:03 -07:00
Daniel Smith
05eff2e910 add new watch event type 2014-09-22 17:06:03 -07:00
Tim Hockin
0f9cd4301d Merge pull request #1401 from jhadvig/k8s_log_retrieval_update
stdout/stderr writer container log stream
2014-09-22 16:38:11 -07:00
Tim Hockin
cf86d66076 rename labels in kubcfg logic 2014-09-22 15:34:13 -07:00
Tim Hockin
bb3900f447 Make "kubecfg -s <port> run ..." select correctly
kubecfg run creates a replication controller which sets all pods with a
replicationController= label, but then sets up a service selecting on name=
instead.  This fixes that.  kubecfg -s <port> run ... can now actually work.
2014-09-22 15:17:47 -07:00
jhadvig
9ba71528e4 stdout/stderr container log stream 2014-09-23 00:15:36 +02:00
Daniel Smith
248f49fb7c Merge pull request #1340 from smarterclayton/cleanup_watch_embedding
Cleanup watch encoding w/ RawExtension
2014-09-22 14:52:50 -07:00
Brendan Burns
3346c68d33 Merge pull request #1389 from lavalamp/scheduler
make watch actually return an error when there's an error
2014-09-22 13:59:57 -07:00
Brendan Burns
f851d4b7f1 Merge pull request #1391 from thockin/proxy
Proxy cleanups
2014-09-22 13:59:29 -07:00
Tim Hockin
486dbd165f Merge pull request #1318 from jhadvig/k8s_log_retrieval
Adding endpoint for log retrieval on the minion
2014-09-22 13:21:28 -07:00
Clayton Coleman
fece926e2b Remove unnecessary EmbeddedObjects
Clarify the tests in embedded_test.go to indicate that unmarshalling
of an internal object (runtime.EmbeddedObject) will not work.  Instead,
consumers should decode raw external objects.
2014-09-22 16:03:07 -04:00
Clayton Coleman
e3da2ba2c8 Cleanup watch encoding (remove dupe Encoding)
Move standard watch encode / decode streams to use
runtime.RawExtension and embed API decoding based on
a provided codec.
2014-09-22 16:03:07 -04:00
Clayton Coleman
6778a8d88d watch/iowatcher should log non EOF errors encountered 2014-09-22 16:03:07 -04:00
Victor Marmol
b6a56627a7 Merge pull request #1396 from eparis/update-cadvisor
Update cadvisor to 0.4.0
2014-09-22 13:01:06 -07:00
Clayton Coleman
9a0add3c96 runtime.RawExtension must copy the buffer, not use it 2014-09-22 15:57:37 -04:00
Tim Hockin
2c5693b0ad Don't force a host port through kubecfg 2014-09-22 12:31:37 -07:00
Eric Paris
a32400f47f Remove all code dealing with cadvisor Percentiles
This was removed upstream beween cadvisor 0.3.0 and 0.4.0
2014-09-22 14:22:40 -04:00
jhadvig
960f1b2693 Consistency update 2014-09-21 22:25:44 +02:00
Tim Hockin
dd9c562769 Get rid of un-needed lock 2014-09-20 11:40:02 -07:00
Tim Hockin
a559d8d9b2 Move some test-only code into the test 2014-09-20 11:38:05 -07:00
Tim Hockin
20826e6d50 Move copyBytes closer to use-sites 2014-09-20 11:31:13 -07:00
Tim Hockin
cf6ccaee54 Proxy: delete serviceInfo when stopping a service 2014-09-20 11:29:04 -07:00
Daniel Smith
4d7c6e2657 Treat super short watches with no items received the same as watches that error immediately 2014-09-19 18:09:40 -07:00
Daniel Smith
0d69393a43 make watch actually return an error when there's an error 2014-09-19 17:53:55 -07:00
Daniel Smith
06bb87c6c1 Merge pull request #1386 from brendandburns/auth
Add authenticated TLS support to the client.
2014-09-19 16:05:27 -07:00
Brendan Burns
8dff6f12d7 Add authenticated TLS support to the client. 2014-09-19 15:43:23 -07:00
Daniel Smith
6741704761 Merge pull request #1377 from smarterclayton/benchmarks
Add some benchmarks and minor test-go enhancements
2014-09-19 15:00:47 -07:00
Clayton Coleman
463a16af36 Add benchmarks for API tests 2014-09-19 17:17:54 -04:00
Filipe Brandenburger
334f9dc772 Merge pull request #1384 from brendandburns/release
Release 0.3
2014-09-19 13:32:47 -07:00
Daniel Smith
bdc8d898fa Merge pull request #1376 from ddysher/minion-test-fix
Fix minion registry test insert.
2014-09-19 12:50:29 -07:00
Brendan Burns
b2b3d2e16b Add the 0.3-dev commit. 2014-09-19 11:15:57 -07:00
Brendan Burns
89eff1d0d8 Rev the version to 0.3 2014-09-19 10:11:03 -07:00
Brendan Burns
06316f4861 Merge pull request #1375 from ddysher/pod-rest-test
Out of place test table
2014-09-19 10:03:01 -07:00
Clayton Coleman
5483333e29 Allow server and client to take api version as argument
* Defaults to v1beta1
* apiserver takes -storage_version which controls etcd storage version
  and the version of the client used to connect to other apiservers
* Changed signature of client.New to add version parameter
* All controller code and component code prefers the oldest (most common)
  server version
2014-09-18 23:27:28 -04:00
Clayton Coleman
ca5355908f Expose v1beta2 API group 2014-09-18 23:24:05 -04:00
Deyuan Deng
0c8d9ba870 Fix minion registry test insert. 2014-09-18 23:04:10 -04:00
Deyuan Deng
f966a51fc0 Out of place test table 2014-09-18 21:44:52 -04:00
Brendan Burns
edf3eb04e2 Fix the build. 2014-09-18 15:29:17 -07:00
Daniel Smith
12b677ad56 Merge pull request #1356 from brendandburns/healthz
Adjust the logic, so that if the apiserver restarts, or has no pod info
2014-09-18 15:15:24 -07:00
Brendan Burns
a4912d7203 Merge pull request #1342 from jwforres/websocket_connection_header
Match any Connection header that contains the Upgrade token for websocke...
2014-09-18 09:47:07 -07:00
Joe Beda
4487f311ab Merge pull request #1326 from lavalamp/scheduler
Fix cache to use the "List then Watch" pattern.
2014-09-18 09:00:52 -07:00
Jessica Forrester
f2732f18a7 Match any Connection header that contains the Upgrade token for websockets 2014-09-18 09:26:21 -04:00
jhadvig
9f34eaef9e kubelet server test cases 2014-09-18 14:17:10 +02:00
Brendan Burns
17cbde0c5a Adjust the logic, so that if the apiserver restarts, or has no pod info
for some other reason, pods on missing machines are still 'terminated'
2014-09-17 21:57:11 -07:00
Daniel Smith
b3bfef9127 Merge pull request #1347 from brendandburns/healthz
Fix a problem where if a minion went missing, we still thought the pod was running.
2014-09-17 18:26:44 -07:00
Brendan Burns
99586b4da4 Fix a problem where if a minion went missing, we still thought the pod was running.
Also convert some tests to table driven.
2014-09-17 18:16:52 -07:00
jhadvig
f3f5d0200c Using podID+containerName for querying the logs 2014-09-17 21:00:09 +02:00
Dave Bailey
14fcf68edc Improve error detection for URL manifests, and skip parsing if content unchanged. 2014-09-17 17:43:44 +00:00
Tim Hockin
450ccde521 Don't store name twice in proxy 2014-09-16 17:04:23 -07:00
Daniel Smith
4e9cf2ccb4 Add field selector to List, implement for pods. 2014-09-16 16:17:16 -07:00
Daniel Smith
b1169ed91e Fix cache to use the "List then Watch" pattern. 2014-09-16 16:17:15 -07:00
Brendan Burns
dc5a4a8c3f Refactor to clean up names. 2014-09-16 15:19:02 -07:00
erictune
506f51b186 Merge pull request #1330 from brendandburns/privilege
Only allow privileged containers if API server flag set.  Adds capabilities package.
2014-09-16 15:12:26 -07:00
Daniel Smith
0b75f7b543 Merge pull request #1275 from smarterclayton/v1beta2
Create v1beta2 and allow multiple Codec encodings to exist
2014-09-16 14:52:04 -07:00
Daniel Smith
0727b5a6c8 Merge pull request #1302 from brendandburns/validatez
Add a validator for validating components in the cluster infrastructure.
2014-09-16 14:36:10 -07:00
Clayton Coleman
23307344ee Add round trip tests for default encoding
Turn down iterations a bit for speed
2014-09-16 17:27:59 -04:00
Brendan Burns
f8844ce69e Add a validator for validating components in the cluster infrastructure. 2014-09-16 13:37:01 -07:00
Clayton Coleman
61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Clayton Coleman
154a91cd33 Rename runtime.DefaultScheme to latest.Codec for ease of readability 2014-09-16 16:19:35 -04:00
Clayton Coleman
fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Clayton Coleman
10f68902f6 Add v1beta2 API objects 2014-09-16 16:11:26 -04:00
Brendan Burns
5b9e2a55b5 Add a flag to reject privileged containers in the apiserver. 2014-09-16 11:22:32 -07:00
Paul Morie
f94198c7a3 Expose validation method for ReplicationControllerState 2014-09-16 12:55:27 -04:00
jhadvig
6da2653b4a Update according to review 2014-09-16 15:40:12 +02:00
Andrew M Bursavich
4e7f8db3a0 pkg/watch: remove test hook 2014-09-15 18:55:29 -07:00
Daniel Smith
9c25792dca Merge pull request #1321 from abursavich/master
pkg/watch: fix potential deadlock
2014-09-15 18:26:19 -07:00
Tim Hockin
f8a8df369c Merge pull request #1314 from ddysher/fd-lead
Fix leaking FD
2014-09-15 17:24:29 -07:00
Andrew M Bursavich
b9dcfbad76 pkg/watch: deadlock test 2014-09-15 16:58:26 -07:00
Dawn Chen
d51c28d757 Merge pull request #1304 from brendandburns/valid
Add some lifecycle validation.
2014-09-15 16:50:03 -07:00
Brendan Burns
6efafb141f Add some lifecycle validation. 2014-09-15 16:45:26 -07:00
Deyuan Deng
d5eb731b3f Fix leaking FD. 2014-09-15 19:12:32 -04:00
Daniel Smith
44f340f127 Remove custom scheme stuff
As separate commit to make it easy to get back-- I'm not completely
convince we won't want this in the future.
2014-09-15 13:15:46 -07:00
Daniel Smith
42dafb0e2e add PluginBase to fuzz functions 2014-09-15 13:15:46 -07:00
Daniel Smith
b8c955ea17 Fixes:
* Fix kubecfg test, which was writing an internal object straight to yaml
* Address review comments
2014-09-15 13:15:46 -07:00
Daniel Smith
52d2c221b8 pkg/runtime now has a well defined api pluggability model. 2014-09-15 13:15:46 -07:00
Daniel Smith
71e547124c Make needed changes in conversion package to support pluggability 2014-09-15 13:15:46 -07:00
Andrew M Bursavich
435e0b73bb pkg/watch: fix potential deadlock 2014-09-15 12:07:32 -07:00
Clayton Coleman
24b5b7e8d3 Merge pull request #1296 from brendandburns/healthz
Add healthz handlers to the controller manager and scheduler
2014-09-15 11:28:02 -04:00
Clayton Coleman
424447d3b0 Merge pull request #1306 from lavalamp/scheduler
Add ExtractList to runtime.
2014-09-15 11:27:42 -04:00
jhadvig
f351691493 Adding endpoint for log retrieval on the minion 2014-09-15 17:02:56 +02:00
Brendan Burns
99f7a4f25d Add healthz handlers to the controller manager and scheduler 2014-09-12 21:13:33 -07:00
Clayton Coleman
0a02c6bcdf Exact copy of v1beta1 as v1beta3 for further iteration 2014-09-12 22:02:27 -04:00
Daniel Smith
7d50aa8ba8 Add ExtractList to runtime. 2014-09-12 16:51:07 -07:00
Tim Hockin
3181f3555d Wrap goroutines in HandleCrash() 2014-09-12 16:47:40 -07:00
Tim Hockin
1e50f118fd Move UDP backend setup to a function 2014-09-12 16:47:40 -07:00
Tim Hockin
86d12681f2 Inject UDP timeout to enable testing 2014-09-12 16:47:40 -07:00
Tim Hockin
38416f6a23 Implement UDP proxying in kube-proxy 2014-09-12 16:47:40 -07:00
Tim Hockin
cad6122fe4 Refactor proxy code to make room for UDP 2014-09-12 16:38:17 -07:00
Tim Hockin
9f275c81ac add a 'protocol' field to api.Service 2014-09-12 16:38:17 -07:00
Tim Hockin
b566339f0c make service validation test be table-driven 2014-09-12 16:38:17 -07:00
Daniel Smith
6eeb967d3d Merge pull request #1229 from ragnard/aws-provider
Initial impl. of cloud provider for AWS
2014-09-12 15:16:47 -07:00
Brendan Burns
46d0cbd645 Add a global flag to enable/disable privileged containers 2014-09-12 09:56:45 -07:00
Dan Mace
3a3fab3f82 FEATURE: Support privileged containers in a pod
Add a Privileged field to containers in a pod, in order to facilitate pods
performing administrative tasks such as builds via Docker-in-Docker.

Discussion: https://github.com/GoogleCloudPlatform/kubernetes/issues/391
2014-09-12 09:38:11 -07:00
Tim Hockin
bc9a290241 Merge pull request #1218 from bcwaldon/docker-auth
Authenticated docker pulls, pt. I
2014-09-11 22:53:36 -07:00
Brian Waldon
2f87857b0f kubelet: generate keyring from .dockercfg 2014-09-11 21:01:39 -07:00
brendandburns
cc7999c00a Merge pull request #1268 from dchen1107/termination
Proposed ContainerStatus for each individual Container in a Pod.
2014-09-11 16:17:59 -07:00
Dawn Chen
7b46d8c9c5 typo 2014-09-11 16:07:56 -07:00
Dawn Chen
25fbe210f6 Clean up 2014-09-11 15:30:06 -07:00
Dawn Chen
3faf393e7b Introduce ContainerStates. Currently keep it has the same set as PodStatus:
Waiting, Running, Termination. For each state, there are some meaningful
status associated with it.
2014-09-11 15:22:53 -07:00
Dawn Chen
ee129cd440 Proposed ContainerStatus for each individual Container in a Pod. 2014-09-11 14:34:21 -07:00
Ragnar Dahlén
b548465adf Initial impl. of cloud provider interface for AWS 2014-09-11 22:28:56 +01:00
Daniel Smith
6757b402d5 Merge pull request #1133 from jwforres/enable_cors
Add option to enable a simple CORS implementation for the api server
2014-09-11 13:59:14 -07:00
Jessica Forrester
0f2b8f4f9f Create passthroughLogger when LogOf is called and request has no logger 2014-09-11 16:48:06 -04:00
Brian Waldon
0bf4fabc19 kubelet: move docker-related code into sub-package 2014-09-11 13:12:28 -07:00
derekwaynecarr
0c20fffa06 No DNS in vagrant cross minions, need explicit IP as host 2014-09-11 13:38:50 -04:00
Daniel Smith
b5c6edcd79 Merge pull request #1189 from simon3z/ovirt-cloud
Add support for oVirt cloud provider
2014-09-11 09:50:31 -07:00
Federico Simoncelli
320fd528e2 Add support for oVirt cloud provider
This patch adds the initial support for the oVirt cloud provider.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-09-11 13:08:46 +00:00
Dawn Chen
b48834e198 Fix PodInfo to include last terminated container info when calling
GetPodInfo based on name and UUID. With this fix, if some of containers
are dead, the pod status will stay as Running, not reset back to Waiting.
2014-09-10 14:41:18 -07:00
bgrant0607
fb4199cba7 Merge pull request #1238 from brendandburns/service
Add an earlier check and error for names that won't work for services.
2014-09-10 11:41:57 -07:00
Brendan Burns
80c06f4768 Add an earlier check and error for names that won't work for services. 2014-09-10 11:31:03 -07:00
Joe Beda
9ffe6c05dc Merge pull request #1251 from filbranden/version_string1
Use just GitVersion for the -version output
2014-09-09 16:32:01 -07:00
Daniel Smith
48913672d9 Merge pull request #1248 from brendandburns/replicas
Make replica controllers return current state.
2014-09-09 16:27:21 -07:00
brendandburns
e9d12fef05 Merge pull request #1250 from dchen1107/cleanup
Small clean up in validation.
2014-09-09 16:24:12 -07:00
Brendan Burns
e7625c8d91 Add current state to replica controller. 2014-09-09 16:19:18 -07:00
Filipe Brandenburger
8de322f196 Use just GitVersion for the -version output
It turns out that that's simply the most useful information about the version
that was built.

For a git tree, it includes information about the closest release, number of
commits since the release, enough of the SHA1 to find the exact commit and
whether the tree was clean or dirty at build time.

For a build from tarball, it will include information of which release was built
and, when using a tarball from a not released commit (e.g. downloading
"master.tar.gz" from GitHub, not recommended!) it will include the -dev prefix
to indicate that was not an official release. (That's as good as we can get with
it.)

If additional information is required, it can be found with -version=raw.

Tested:

- Built from the git tree:

    $ _output/go/bin/kubecfg -version
    Kubernetes v0.2-29-gd916051e9db865
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-gd916051e9db865", GitCommit:"d916051e9db8650899acb9415a4e285e3e3a1f87", GitTreeState:"clean"}

- Built it from a dirty git tree:

    $ { echo 'package version'; echo 'var X = 1'; } >pkg/version/sillyvar.go
    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes v0.2-29-gd916051e9db865-dirty
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-gd916051e9db865-dirty", GitCommit:"d916051e9db8650899acb9415a4e285e3e3a1f87", GitTreeState:"dirty"}

- Tag it v0.3 and build it:

    $ git tag -a v0.3 -m 'Release Kubernetes v0.3'
    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes v0.3
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"3", GitVersion:"v0.3", GitCommit:"d916051e9db8650899acb9415a4e285e3e3a1f87", GitTreeState:"clean"}

- Built it from a tarball:

    $ wget -O kubernetes.tgz https://api.github.com/repos/filbranden/kubernetes/tarball/version_string1
    $ tar xvf kubernetes.tgz
    $ cd filbranden-kubernetes-*/
    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes v0.2-dev
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}

- Built it with `go get`:

    # I need to prefetch the tree to replace the official tree with mine:
    $ mkdir -p ${TMPDIR}/gopath/src/github.com/
    $ ln -sf filbranden ${TMPDIR}/gopath/src/github.com/GoogleCloudPlatform

    # Now run `go get` to build kubecfg:
    $ GOPATH=${TMPDIR}/gopath go get github.com/filbranden/kubernetes/cmd/kubecfg

    # Check the version:
    $ ${TMPDIR}/gopath/bin/kubecfg -version
    Kubernetes v0.2-dev
    $ ${TMPDIR}/gopath/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-09 16:19:14 -07:00
Dawn Chen
80fa392f6b Small clean up in validation. errs is used as import path alias in validation.go, but it is reused
as a variable for validateVolume.
2014-09-09 16:08:21 -07:00
Filipe Brandenburger
61877f2dd0 Update version to use -dev suffix
According to the plan listed in docs/releasing.md.

The gitMinor will keep using a "+" suffix instead for now.

Added a //TODO to deprecate gitMajor and gitMinor in a follow up.

Tested:
- Built it from the git tree:

    $ make
    $ _output/go/bin/kubecfg -version
    Kubernetes version 0.2+, build 8d31eb03c11d4db64ae26809eef7f73070efd811
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-29-g8d31eb03c11d4d", GitCommit:"8d31eb03c11d4db64ae26809eef7f73070efd811", GitTreeState:"clean"}

- Built it with a direct `go install` (same as tarball):

    $ GOPATH=${PWD}/_output/go:${PWD}/Godeps/_workspace go install $KUBE_GO_PACKAGE/cmd/kubecfg
    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2+", GitVersion:"v0.2-dev", GitCommit:"", GitTreeState:"not a git tree"}
    $ _output/go/bin/kubecfg -version
    Kubernetes version 0.2+, build (unknown)

A follow up commit will address the output of the -version (without "raw") command to use gitVersion instead of Major + Minor.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-09 15:46:20 -07:00
Brendan Burns
4ba4762827 Insert the current state of a replica controller. 2014-09-09 15:23:34 -07:00
Jessica Forrester
d82cf7dd48 Rebased and fixed test cases 2014-09-09 17:50:18 -04:00
Jessica Forrester
0cac1c5f79 Switch LogOf from panicking when logger is missing to creating logger with the defaults.
Update CORS tests to a table-based test and cover more cases.
2014-09-09 17:50:18 -04:00
Jessica Forrester
becf6ca4e7 Move RecoverPanics to be the top level wrapped handler. Add new method to be sure a logger has been generated instead of assuming one has. Move regexp list compilation into a utility and pass regexp list into CORS. 2014-09-09 17:50:18 -04:00
Jessica Forrester
8b4ca9c2a7 Move CORS handler wrapping into cmd/apiserver and switch config flag to a list of allowed origins 2014-09-09 17:50:18 -04:00
Jessica Forrester
8723eece49 Add option to enable a simple CORS implementation for the api server 2014-09-09 17:50:18 -04:00
Tim Hockin
4ff76add57 Merge pull request #1147 from dchen1107/restart
Introduce the simplest RestartPolicy and handling.
2014-09-09 14:44:42 -07:00
Brendan Burns
69b359b689 Don't stack trace on 301s 2014-09-09 14:10:46 -07:00
Daniel Smith
1fd12778eb Merge pull request #1231 from brendandburns/service
Fix a bug where we don't return an error.
2014-09-09 12:48:19 -07:00
Brendan Burns
a343a93b2d Fix a bug where we don't return an error. 2014-09-09 10:29:00 -07:00
Dave Bailey
5ec748dc5e avoid dumping error pages into error messages 2014-09-09 17:20:58 +00:00
csrwng
6551f4e0f0 Use codec to encode/decode api objects in client and kubecfg parser 2014-09-09 08:45:53 -04:00
Dawn Chen
15cab4d053 Introduce the simplest RestartPolicy and handling. 2014-09-08 22:41:38 -07:00
brendandburns
b4e08dd347 Merge pull request #1219 from filbranden/release_v0.2
Release Kubernetes v0.2
2014-09-08 21:04:34 -07:00
Filipe Brandenburger
a0abb38157 Release Kubernetes v0.2
This commit will be tagged with a v0.2 annotated git tag.

Tested:
- Created a git tag for it, built it and checked output of -version:

    $ git tag -a -m 'Release Kubernetes v0.2' v0.2

    $ make
    hack/build-go.sh
    Building local go components

    $ _output/go/bin/kubecfg -version
    Kubernetes version 0.2, build b47f9af5c9ea770973be1b001adaffbdfcb08618

    $ _output/go/bin/kubecfg -version=raw
    version.Info{Major:"0", Minor:"2", GitVersion:"v0.2", GitCommit:"b47f9af5c9ea770973be1b001adaffbdfcb08618", GitTreeState:"clean"}

- Made sure hack/test-go.sh and hack/test-cmd.sh still pass.

Fixes: Issue #1018

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-09-08 16:21:36 -07:00
Daniel Smith
41754f5bd4 Merge pull request #1192 from smarterclayton/standardize_etcd_errors
Return standard API errors from etcd registry by operation
2014-09-08 15:57:08 -07:00
Clayton Coleman
3ffe259ac7 Return standard API errors from etcd registry by operation
Adds pkg/api/errors/etcd, which defines default conversions
for common CRUD operations from etcd to api.
2014-09-08 18:46:01 -04:00
Tim Hockin
81b502b0a6 Merge pull request #1217 from lavalamp/fixApi
Rename all XStorage types to REST for clarity
2014-09-08 15:38:47 -07:00
Daniel Smith
759c3f9033 Rename all XStorage types to REST for clarity 2014-09-08 15:19:13 -07:00
Daniel Smith
4c1d5f0c44 Merge pull request #1160 from simon3z/master
Support configurations for cloudproviders
2014-09-08 15:12:51 -07:00
Federico Simoncelli
6add1993c9 Support configurations for cloudproviders
Cloud providers may need specific configurations to run properly (e.g.
authentication parameters, uri, etc.).

This patch adds the simplest implementation for passing configurations
to cloudproviders: a new apiserver -cloud_config flag to specify the
path to an arbitrary configuration file.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-09-08 21:46:53 +00:00
Dawn Chen
7ace5a3e83 Passing pod UUID to Kubelet. 2014-09-08 14:24:09 -07:00
Daniel Smith
9345da0bfd Fix build 2014-09-08 13:05:38 -07:00
brendandburns
753b80c9b8 Merge pull request #1105 from lavalamp/proxy
Add a generic proxier
2014-09-08 12:51:24 -07:00
Brian Ketelsen
83d3da1436 changed address variable to bindAddress. Used net.JoinHostPort() instead of fmt.Sprintf() 2014-09-07 23:50:36 -07:00
Brian Ketelsen
34922226fd allow proxy to accept a listen address. fixes #1220 2014-09-07 23:27:43 -07:00
Daniel Smith
fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Daniel Smith
48ce23ac91 Make client use pointers 2014-09-07 22:19:24 -07:00
Daniel Smith
0d30a656ef Do interface{} -> runtime.Object rename everywhere 2014-09-07 22:19:24 -07:00
Daniel Smith
1c2b65788d Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names 2014-09-07 22:19:24 -07:00
Daniel Smith
828b70abb9 api and api/v1beta1 pass tests again 2014-09-07 22:19:24 -07:00
Daniel Smith
77edb91032 Add Object type to runtime, make runtime test pass. 2014-09-07 22:19:24 -07:00
Daniel Smith
0c6adde92e Change conversion package so that AddKnownTypes takes pointers. 2014-09-07 22:19:24 -07:00
Daniel Smith
2ba6503511 Add continuation to conversion routines 2014-09-07 22:19:24 -07:00
Tim Hockin
6ebe69a875 Merge pull request #1156 from brendandburns/api
Add support for the PostStart event handler.
2014-09-05 22:13:56 -07:00
brendandburns
8e10ee5169 Merge pull request #1197 from lavalamp/fixApi
Rename Object to EmbeddedObject
2014-09-05 21:39:37 -07:00
Clayton Coleman
e0c47d979c Merge pull request #1194 from fsouza/remove-godockerclient-copiedstructs
api/v1beta1: use go-dockerclient instead of docker-api-structs
2014-09-05 17:58:03 -04:00
Daniel Smith
7790961011 Rename Object to EmbeddedObject 2014-09-05 14:43:35 -07:00
Joe Beda
77488835fe Merge pull request #1190 from derekwaynecarr/vagrant_cluster_hostname
Improve vagrant hostname support across cluster
2014-09-05 14:30:09 -07:00
derekwaynecarr
7f75aae8ab Improve vagrant hostname support across cluster 2014-09-05 16:39:39 -04: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
Francisco Souza
6d0f84c700 api/v1beta1: use go-dockerclient instead of docker-api-structs
This involves updating go-dockerclient and removing the patched code.

Related to #692 and fsouza/go-dockerclient#146.
2014-09-05 17:31:13 -03:00
Brendan Burns
d0884accd7 Add support for the PostStart event handler. 2014-09-05 12:37:57 -07:00
Joe Beda
3c0a736908 Fix/expand kubecfg unit tests 2014-09-04 13:25:39 -07:00
Joe Beda
f8e2f927f6 Pretty up the demo a little.
Use images and some better formatting.  Also add scripts to help prevent typos.

This based on an improved version done by Julia Ferraioli.  She came up with the cool images.
2014-09-04 13:25:39 -07:00
Joe Beda
45aaff9993 Add template update to rollingUpdate 2014-09-04 13:25:38 -07:00
Joe Beda
2444e4e1dc Simplify labels for kubecfg run
We created a name=<controller name> label on each object we created.  This was confusing.  Instead, piggyback on `replicationController` label and use that as the selector.
2014-09-04 13:25:38 -07:00
Daniel Smith
779de7361a Merge pull request #1138 from bcwaldon/common-watch-code
Use shared watch code in kubelet etcd config
2014-09-03 23:47:09 -07:00
Deyuan Deng
75470e6adf Include pod status in kebecfg humanreadable result. 2014-09-03 20:26:32 -04:00
Brian Waldon
85bf7064bb Use shared watch code in kubelet etcd config 2014-09-03 15:51:02 -07:00
Clayton Coleman
34c40e4e48 Errors should be part of api/errors, not apiserver
Renames constructor methods to be errors.New<name> which changed a few
places.
2014-09-03 17:16:00 -04:00
Clayton Coleman
6dd4831de8 Move validation errors into their own file 2014-09-03 17:14:03 -04:00
Clayton Coleman
01e668187c Services and Endpoints weren't properly sync'ing
They need incremental changes and a resync on start.
2014-09-03 16:04:55 -04:00
derekwaynecarr
ca3f5a9f46 Fixup name vs ID terminology 2014-09-03 10:27:33 -04:00
Brendan Burns
dd9ecf5b79 Add types for lifecycle events. 2014-09-02 15:14:13 -07:00
brendandburns
25fdade6fa Merge pull request #1134 from thockin/race
try to fix data race
2014-09-02 14:07:15 -07:00
Daniel Smith
d20264351b Merge pull request #1077 from brendandburns/service
Step #1 in migrating the service controller away from the apiserver.
2014-09-02 14:03:52 -07:00
Tim Hockin
8ad98db773 Merge pull request #1121 from filbranden/rawversion2
Add support for -version=raw
2014-09-02 13:53:13 -07:00
Tim Hockin
6a624a2b4f try to fix data race 2014-09-02 13:51:15 -07:00
Daniel Smith
a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00
Daniel Smith
099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Daniel Smith
7615c00a9a Make validation work when not in the api package. 2014-09-02 10:42:06 -07:00
Daniel Smith
eb5ca80946 Split helper test, move fuzzing to api package as serialization_test.go 2014-09-02 10:40:52 -07:00
Daniel Smith
6121e61f99 Split api into api, api/common, api/validation & apitools 2014-09-02 10:40:52 -07:00
Brendan Burns
fee2b90608 Step #1 in migrating the service controller away from the apiserver.
Start using the API server for listing services.
2014-09-02 10:25:04 -07:00
Tim Hockin
5bed06f614 Merge pull request #1129 from VojtechVitek/godoc
Godoc improvements
2014-09-02 09:45:05 -07:00
Clayton Coleman
64c7348a19 Expand api ResourceVersioner test 2014-09-02 09:52:37 -04:00
Vojtech Vitek (V-Teq)
42c656501c Add several missing pkg Godoc files
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:11 +02:00
Vojtech Vitek (V-Teq)
59f58cd043 Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Deyuan Deng
d528949547 Fix pod status error with List method. 2014-09-01 21:23:50 -04:00
Filipe Brandenburger
1d8067450c Rename pkg/version/flag to pkg/version/verflag
This avoids some conflict with the built-in `flag` module in Go. The
module was already being renamed to `verflag` on import anyways, so we
might as well just call it that.

Tested:
- hack/build-go.sh and ran the resulting binaries with -version args.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-29 23:19:32 -07:00
Filipe Brandenburger
2421c738a6 Add support for -version=raw to print the Go version.Info
This can be helpful to print the internal fields of the version
information that will contain more details about the git tree than the
short -version output will.

Tested:
- Tested getting the raw version:
  $ _output/go/bin/kubecfg -version=raw
  version.Info{Major:"0", Minor:"1+", GitVersion:"v2.2.1-33-gdc4becd9765393", GitCommit:"dc4becd9765393fa05a3eb06f6af9e00068fe0c5", GitTreeState:"dirty"}

- Tested getting the simple version:
  $ _output/go/bin/kubecfg -version
  Kubernetes version 0.1+, build dc4becd976

- Tested getting the help output:
  $ _output/go/bin/kubecfg 2>&1 | grep -- -version
    -version=false: Print version information and quit

- Made sure -version=true and -version=false works, that -version with
  an invalid argument works as expected (prints usage help) and that
  -version followed by space will not try to use the next word as its
  argument (i.e. `-version raw` prints the version but not the raw one.)

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-29 23:15:24 -07:00
Joe Beda
2d8e160775 Merge pull request #1117 from lavalamp/fixApi
Invert api and api/v1beta1 dependencies
2014-08-29 14:59:15 -07:00
Daniel Smith
9928c40ea6 Merge pull request #1099 from smarterclayton/return_resource_version_on_list
Add the resource version to api.*List items from etcd
2014-08-29 13:41:46 -07:00
Daniel Smith
aa9b9b9fa8 Invert api and api/v1beta1 dependencies
This is some cleanup that has been needed for a while.
There's still one more step that could usefully be done, which is to
split up our api package into the part that provides the helper
functions and the part that provides the internal types. That can come
later.

The v1beta1 package is now a good example of what an api plugin should
do to version its types.
2014-08-29 12:15:30 -07:00
Clayton Coleman
821f9bd5e7 Merge pull request #1102 from lavalamp/fixApi
Fix incorrect tag in MinionList
2014-08-29 10:54:15 -04:00
Daniel Smith
dd862a7c53 Fix flaky scheduler factory test. 2014-08-28 20:32:20 -07:00
Clayton Coleman
bafc422ac0 Add the resource version to api.*List items from etcd
Allows clients to watch more easily (can invoke Get, then
Watch).
2014-08-28 23:17:00 -04:00
Daniel Smith
a2b03ea93b Fix incorrect tag in MinionList 2014-08-28 20:06:17 -07:00
Daniel Smith
e30d229a34 Merge pull request #1097 from bcwaldon/remove-code
Remove unnecessary parameter from NewRegistry
2014-08-28 17:37:05 -07:00
Daniel Smith
93818a9ce0 Merge pull request #1095 from dchen1107/cleanup
Fixed kubelet /healthz by using healthz package
2014-08-28 17:25:56 -07:00
Brian Waldon
816c4a3c76 Remove unnecessary parameter from NewRegistry 2014-08-28 16:52:45 -07:00
Dawn Chen
223fb6e610 Fixed kubelet /healthz by using healthz package
Fixed #1094
2014-08-28 15:34:39 -07:00
Daniel Smith
3c49aa96fe Merge pull request #1026 from lavalamp/redirect
Add simple service redirection
2014-08-28 14:54:10 -07:00
Clayton Coleman
818f357128 Client should validate the incoming host value
Convert host:port and URLs passed to client.New() into the proper
values, and return an error if the value is invalid.  Change CLI
to return an error if -master is invalid.  Remove Client.rawRequest
which was not in use, and fix the involved tests. Add NewOrDie

Preserves the behavior of the client to not auth when a non-https
URL is passed (although in the future this should be corrected).
2014-08-28 13:47:36 -04:00
brendandburns
b743c3de77 Merge pull request #1082 from smarterclayton/incorrect_manifest_validation
Incorrect validation error for container image
2014-08-28 09:32:29 -07:00
Clayton Coleman
cc1ab0a3db Incorrect validation error for container image 2014-08-28 09:58:16 -04:00
Vojtech Vitek (V-Teq)
5500bbade6 Fix typos in pkg docs
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-08-28 11:43:35 +02:00
Daniel Smith
4de254444e Add simple service redirection 2014-08-27 20:51:41 -07:00
Daniel Smith
0766e7a411 Merge pull request #1058 from vishh/add_list_minions
Adding ListMinions() API to pkg/client.
2014-08-27 14:19:57 -07:00
Vishnu Kannan
180e9ed493 Add unit tests for pkg/client.ListMinions() 2014-08-27 21:07:22 +00:00
Clayton Coleman
9006eadcfe kube-proxy can read config from the apiserver
All clients that talk to a "master" as a host:port or URL
(scheme://host:port) parameter.  Add tests.
2014-08-27 15:49:01 -04:00
Clayton Coleman
083d81b6d7 Expose REST resource for endpoints and watch on services/endpoints
Will allow kube-proxies to listen on endpoints.
2014-08-27 15:49:01 -04:00
Clayton Coleman
b5e1e044bc Move EndpointsController to its own package
Avoids recursive loop with endpoint registry defined
2014-08-27 15:49:00 -04:00
Clayton Coleman
ae698bcff8 Allow field/label users to get info from fields
Allows a consumer to get at the information stored in the field selector
for querying an underlying data store.  Not generic, but offers a
simple start.
2014-08-27 15:49:00 -04:00
Vishnu Kannan
a4b00e33e0 Adding ListMinions() API to pkg/client. 2014-08-27 18:57:29 +00:00
Daniel Smith
2606ece6e9 Merge pull request #1056 from filbranden/versioning_fixes1
Versioning fixes
2014-08-27 10:19:46 -07:00
Filipe Brandenburger
b777eb19e2 Add additional ldflags constants for Kubernetes versioning
Now it is possible to push these variables through ldflags:
- gitMajor
- gitMinor
- gitVersion (from latest annotated tag, output of git describe)
- gitCommit (renamed commitFromGit, intended to have the full sha1)
- gitTreeState (either "clean" or "dirty")

These are spawned into its separate source file, since they are meant to
be updated separately when a new version is released.

Also use the notation vX.Y+ for when git information is not present.
(This is consistent with the kernel build, e.g. Linux 3.15+ means its
version is >= 3.15 and < 3.16.)

v2: Added comments to the individual fields in pkg/version/base.go

Tested:
- Built it and checked the -version output:
  $ hack/build-go.sh
  $ output/go/bin/kubelet -version
  Kubernetes version 0.1+, build c328679ef8aa

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-08-27 10:06:22 -07:00
Clayton Coleman
31dadca04f Merge pull request #1047 from lavalamp/fixApiObj
Cleanup: remove deprecated fields the proper way
2014-08-27 11:43:27 -04:00
Brendan Burns
52473bdf11 Deflake operation listing. 2014-08-26 22:48:24 -07:00
Daniel Smith
97b05619f1 Remove deprecated bits from kubelet 2014-08-26 22:39:00 -07:00
Daniel Smith
e1a361a84b Merge pull request #1049 from brendandburns/flake
Fix a flake by extending the time out, so we don't race a go routine.
2014-08-26 21:00:23 -07:00
Daniel Smith
2a62d72140 Cleanup: remove deprecated fields the proper way 2014-08-26 17:28:36 -07:00
Brendan Burns
d83091ea52 Fix a flake by extending the time out, so we don't race a go routine.
Empirically this eliminates a flake.
2014-08-26 17:09:38 -07:00
Brendan Burns
556eb0f400 Add a run command to the kublet server 2014-08-26 13:57:44 -07:00
Daniel Smith
c7999a7f75 Merge pull request #964 from smarterclayton/return_validation_errors_from_api
Return validation errors via the REST API
2014-08-26 12:44:00 -07:00
Clayton Coleman
7487f9a951 Merge pull request #1040 from brendandburns/hostname
Switch the hostname in a container to be the pod id.
2014-08-26 15:02:05 -04:00
Brendan Burns
4f1fa939f7 Switch the hostname in a container to be the pod id. 2014-08-26 11:13:53 -07:00
Joe Beda
bce7a4bd90 Merge pull request #1014 from smarterclayton/set_commit_with_ldflags
Use -ldflags to set git commit version
2014-08-26 10:56:56 -07:00
Clayton Coleman
0a841a49fd Naming of Reason constants is inconsistent
Changed ReasonType to StatusReason (to match the field) and
changed CauseReason to CauseType and renamed StatusCause.Reason to
Type.
2014-08-26 13:39:21 -04:00
Clayton Coleman
52923a1348 Return validation errors from storage create/update 2014-08-26 13:30:55 -04:00
Clayton Coleman
84db1da42b Convert field errors into a selector for the object
Satisfies the "Field" condition for a Cause.  Also addresses
parts of #914.
2014-08-26 13:30:55 -04:00
Clayton Coleman
d326ba2976 Add a Causes array to status details for validation errors
Uses the same constant values as api/errors for each nested
reason.
2014-08-26 13:30:55 -04:00
Clayton Coleman
60126bfe64 Make the validation types match the pending ReasonCauses 2014-08-26 13:30:55 -04:00
Daniel Smith
aeaa3f99fb Merge pull request #1037 from thockin/proxy
Fix a race in proxy.
2014-08-25 22:10:54 -07:00
Tim Hockin
23fc00be5c Fix a race in proxy.
addService() eventually calls getServiceInfo(), but the serviceInfo object may
not be installed yet (race).
2014-08-25 21:38:16 -07:00
brendandburns
6f84f6d92f Merge pull request #1000 from lavalamp/fix2
Need to remove pods that change labels.
2014-08-25 21:20:33 -07:00
Satnam Singh
3f0f119e42 Very minor change to use camelCase for ReasonType as suggested in issue #914. 2014-08-25 16:57:13 -07:00
Daniel Smith
6b69ed402b Change 'sendCreate' to 'sendAdd'; integration passes. 2014-08-25 15:56:55 -07:00
Daniel Smith
db1c0db5c7 Move etcd watch code to its own files 2014-08-25 15:56:54 -07:00
Daniel Smith
72b35816cd Need to remove pods that change labels. 2014-08-25 15:56:54 -07:00
brendandburns
5155222edc Merge pull request #961 from lavalamp/removeAssignCall
Remove synchronous assignPod call from create pod
2014-08-25 15:25:27 -07:00
Daniel Smith
b8c57ea181 Merge pull request #1006 from satnam6502/master
Make validation check for legal service port numbers.
2014-08-25 14:51:22 -07:00
Clayton Coleman
9336373857 Use -ldflags to set git commit version 2014-08-25 16:40:47 -04:00
Daniel Smith
98ef76c164 Remove references to scheduler from pod storage. 2014-08-25 11:59:00 -07:00
Daniel Smith
ddba004ad0 Add constraint package to let us reject invalid assignments. 2014-08-25 11:59:00 -07:00
Daniel Smith
0a1dfa366e Make integration test pass. 2014-08-25 11:59:00 -07:00
Daniel Smith
29e9e13188 Remove synchronous assignPod call from create pod 2014-08-25 11:59:00 -07:00
Brendan Burns
3012c10ae3 Add a log when we drop a minion because of health checks. 2014-08-25 11:43:02 -07:00
Satnam Singh
4105f7ef61 Code review changes to adjust pacakge name for storage_test.go 2014-08-25 10:38:11 -07:00
Clayton Coleman
b01d0c2874 Merge pull request #1002 from smarterclayton/improve_wait_api
Improve the wait.Poll GoDoc and api
2014-08-25 13:07:04 -04:00
csrwng
938548a9fb Break up API client into per-resource client and common code 2014-08-25 07:54:35 -04:00
Clayton Coleman
58f8ac860f Set creation timestamp on services 2014-08-23 14:33:24 -04:00
Clayton Coleman
286c3c543c Improve the wait.Poll GoDoc and api
Add more tests, and switch to timeouts instead of cycles.
Deflake TestPoller
2014-08-23 12:18:03 -04:00
Satnam Singh
7fcaf80f67 Make validation check for legal serive port numbers. 2014-08-22 14:44:21 -07:00
Clayton Coleman
bd2cbdc312 Merge pull request #996 from brendandburns/selector
Add a validation that replicaSelector matches PodTemplate.Labels
2014-08-22 13:46:06 -04:00
Brendan Burns
5839378adc Add a validation that replicaSelector matches PodTemplate.Labels 2014-08-21 22:18:55 -07:00
Daniel Smith
42685ad8f1 Merge pull request #985 from brendandburns/kubecfg
Make rolling update be blocking.
2014-08-21 17:00:18 -07:00
Clayton Coleman
1c68247954 Merge pull request #909 from lavalamp/scheduler3
Scheduler plugin v1
2014-08-21 19:04:51 -04:00
Brendan Burns
de1480fd2f Make rolling update be blocking. 2014-08-21 15:58:17 -07:00
Daniel Smith
3ab35c63f3 Merge pull request #828 from roberthbailey/config
Add validation when processing pod manifests from a URL.
2014-08-21 14:34:25 -07:00
Paul Morie
47fd5842ad Fix typo in tests 2014-08-21 17:02:28 -04:00
Dawn Chen
df260c830f Merge pull request #905 from erictune/cleanup6
Dereference string* before printing it with "%s%".
2014-08-21 09:23:19 -07:00
brendandburns
8f5dd8cf63 Merge pull request #984 from thockin/make_vs_new
Rename a bunch of "Make" functions to "New"
2014-08-20 22:06:57 -07:00
Tim Hockin
0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
brendandburns
1bd4ae0c62 Merge pull request #943 from smarterclayton/only_wait_for_acceptance
Clients must wait for completion of actions
2014-08-20 21:01:21 -07:00
brendandburns
25b3da718f Merge pull request #980 from thockin/cloudproviders
Make cloud providers into plugins
2014-08-20 21:00:51 -07:00
Tim Hockin
edff541524 Treat async loops the same.
In the name of consistency, treat the PodCache loop the same as the
EndpointController.
2014-08-20 20:17:16 -07:00
Tim Hockin
caadf10197 clarity: rename minionRegistryMaker to makeMinionRegistry 2014-08-20 20:17:16 -07:00
Tim Hockin
f7d54390f9 Make cloud providers be plugins 2014-08-20 20:16:41 -07:00
Tim Hockin
eb9f3394c5 Move VagrantCloud into its own pkg 2014-08-20 20:16:41 -07:00
Tim Hockin
b23bef26eb Move GCECloud into its own pkg 2014-08-20 20:16:41 -07:00
Tim Hockin
95e0be9a63 Move FakeCloud into its own pkg 2014-08-20 20:16:41 -07:00
Daniel Smith
3d47c8bad1 Fix up client tests now that we check the query in FakeHandler 2014-08-20 16:50:02 -07:00
Daniel Smith
8a9eaf911f For testability & reuse, move scheduler setup into its own package. 2014-08-20 16:50:02 -07:00
Clayton Coleman
493863eb93 Return immediately when controllers/pods are committed
Add client waiting conditions.
2014-08-20 18:46:10 -04:00
Clayton Coleman
34031dbc6a Remove excessive waiting in kubelet etcd loop
Listen to etcd longer, and wait a shorter time before reconnecting.
No longer an argument to the source.
2014-08-20 18:46:10 -04:00
Daniel Smith
4c4ca59050 Add poller to cache. 2014-08-20 15:32:49 -07:00
Daniel Smith
dddad888b5 Begin scheduler plugin 2014-08-20 15:32:49 -07:00
Daniel Smith
4c3f509d94 Make cache.Reflector more injectable. Add test for resource version state keeping. 2014-08-20 15:32:49 -07:00
brendandburns
6ca912e07f Merge pull request #977 from pmorie/unit
Add missing case for IntOrString unit tests
2014-08-20 14:30:38 -07:00
Paul Morie
5331cd6ec0 Add missing case for IntOrString unit tests 2014-08-20 17:22:29 -04:00
derekwaynecarr
fd8741edf2 Refactor kubelet to use http.ServeMux 2014-08-20 16:08:08 -05:00
Clayton Coleman
6b05d71d74 Merge pull request #972 from brendandburns/pod
Switch api.Status to *api.Status in a bunch of places.
2014-08-20 16:53:36 -04:00
Vishnu Kannan
2b61831c22 Improve kubelet logging - log the docker container image name when docker pull fails. 2014-08-20 10:30:42 -07:00
Brendan Burns
a198bbb0ae Switch api.Status to *api.Status in a bunch of places. 2014-08-20 10:21:49 -07:00
Daniel Smith
f650337ec3 Merge pull request #913 from csrwng/pluggable_type_printing
Allow kubecfg to print custom types
2014-08-20 10:01:56 -07:00
csrwng
14714f2638 Allow kubecfg to print custom types 2014-08-20 12:23:02 -04:00
Deyuan Deng
c104551025 Improve pkg/registry/service code coverage. 2014-08-19 20:13:00 -04:00
Daniel Smith
b4973bbac4 Merge pull request #956 from brendandburns/service
Fix the proxier when a service with the same port is re-created after being deleted.
2014-08-19 16:22:04 -07:00
brendandburns
a9ba3687f4 Merge pull request #958 from dchen1107/port
Fix #926
2014-08-19 16:15:15 -07:00
Dawn Chen
5a2365b323 Fix #926
Make HostPort a real option without being set to ContainerPort if absent.
2014-08-19 15:44:50 -07:00
Brendan Burns
da74625ac6 Fix the proxier when a service with the same port is re-created, actually restart the proxy. 2014-08-19 12:24:10 -07:00
brendandburns
bd53643647 Merge pull request #851 from derekwaynecarr/cloud_provider
Vagrant supports a cloud provider
2014-08-18 18:23:49 -07:00
brendandburns
88baa52134 Merge pull request #918 from lavalamp/bindImpl
Implement bindings
2014-08-18 18:19:33 -07:00
brendandburns
5756a635c9 Merge pull request #949 from lavalamp/bugFix
Add comment for clarity and logging for debugging.
2014-08-18 18:15:37 -07:00
Daniel Smith
f689d44d25 Add comment for clarity and logging for debugging. 2014-08-18 17:43:10 -07:00
Daniel Smith
d363d5d942 Merge pull request #944 from brendandburns/service
Add a better test for service environment variables. Fix bugs.
2014-08-18 16:59:21 -07:00
brendandburns
0126688ca0 Merge pull request #939 from derekwaynecarr/kubecfg_stop_should_reuse_code
Use common resize controller logic for stop in kubecfg
2014-08-18 16:58:56 -07:00
Daniel Smith
138b560efb Implement bindings
This will effectively cause no changes until we remove the assignPod
call from CreatePod().
2014-08-18 16:55:44 -07:00
Brendan Burns
3eb044b495 Add a better test for service environment variables
Fix bugs.
2014-08-18 16:53:59 -07:00
Clayton Coleman
bcf7a37e21 Merge pull request #906 from lavalamp/watch
Watch improvements.
2014-08-18 17:11:08 -04:00
derekwaynecarr
3c68b0a009 Use common resize controller logic for stop 2014-08-18 15:58:31 -04:00
Brendan Burns
05ab1e49fb Address some follow up comments. 2014-08-18 12:49:52 -07:00
Tim Hockin
e472752ff9 Merge pull request #875 from brendandburns/exec
Add a in container exec based health check.
2014-08-18 12:19:22 -07:00
Brendan Burns
0caae9c1d4 Add a in container exec based health check. 2014-08-18 12:00:11 -07:00
derekwaynecarr
8df21b84a1 Add vagrant cloudprovider 2014-08-18 14:30:31 -04:00
brendandburns
53f53516f6 Merge pull request #933 from derekwaynecarr/issue_878
Enforce isDir, elliminates message in kubelet.log
2014-08-18 11:07:59 -07:00
Clayton Coleman
13c3efbc4c The default client poll interval is extremely long
Most operations complete much more quickly than 20s, and those that
do take longer are going to be fixed to make them take less time
(#353)
2014-08-18 13:40:35 -04:00
derekwaynecarr
39293eaf56 Enforce isDir, elliminates message in kubelet.log 2014-08-18 13:17:41 -04:00
Daniel Smith
b00afd7f3b Merge pull request #924 from thockin/cleanups2
Validation return types cleanup
2014-08-18 09:38:07 -07:00
Robert Bailey
ce572050a8 Add tests for invalid container manifests. 2014-08-18 00:44:46 -07:00
Robert Bailey
fecfe23ed1 Refactor tests to be table driven. 2014-08-18 00:17:06 -07:00
Robert Bailey
9ce364d498 Add validation when processing pod manifests from a URL. 2014-08-17 22:50:53 -07:00
Daniel Smith
4b2867fd8a Standardize watch usage in registry/storage objects. Fix up extremely confusing pod test object. 2014-08-16 19:07:41 -07:00
Daniel Smith
d900134a60 Add filter to watch 2014-08-16 19:07:30 -07:00
Daniel Smith
ca55bfb29c Add mux type to watch package 2014-08-16 19:07:29 -07:00
Daniel Smith
e40e5b53a7 Add Watch to /pods. 2014-08-16 19:07:29 -07:00
Tim Hockin
e0d9002717 All validations return ErrorList now 2014-08-16 13:48:48 -07:00
Tim Hockin
a69979d22b Change ErrorList.Append() to append() 2014-08-16 13:34:06 -07:00
brendandburns
0426055940 Merge pull request #919 from lavalamp/delMem
Remove unused and not completely correct code
2014-08-15 20:24:31 -07:00
Daniel Smith
26e2256178 Remove unused and not completely correct code 2014-08-15 18:20:37 -07:00
Daniel Smith
2946e21f80 Merge pull request #916 from smarterclayton/unify_fake_client
Replace pkg/kubecfg#FakeKubeClient with the fake in pkg/client
2014-08-15 17:15:19 -07:00
Clayton Coleman
12a22db2a9 Merge pull request #911 from derekwaynecarr/fix_verify_boilerplate
Fix verify-boilerplate
2014-08-15 17:28:57 -04:00
Clayton Coleman
82b0ec5115 Replace pkg/kubecfg#FakeKubeClient with the fake in pkg/client 2014-08-15 17:15:53 -04:00
Daniel Smith
daab393562 Merge pull request #780 from brendandburns/native
Add a utility for doing master election via etcd.
2014-08-15 11:48:13 -07:00
Brendan Burns
a17acd30ee Add a utility for doing master election via etcd. 2014-08-15 11:42:16 -07:00
derekwaynecarr
8c07a0f524 Fix verify-boilerplate 2014-08-15 13:12:01 -05:00
Daniel Smith
881234c7ec Merge pull request #900 from thockin/cleanups2
Move validation errors into a pkg
2014-08-15 10:01:48 -07:00
brendandburns
39d2020392 Merge pull request #897 from smarterclayton/watch_starting_too_early
Watch should start from next index when getting the initial state
2014-08-15 09:46:13 -07:00
Tim Hockin
b9e65c2438 Use new api/errors, get rid of api.* error code 2014-08-15 00:14:38 -07:00
Tim Hockin
bcd588ec15 Break api error handling into a new pkg 2014-08-15 00:14:38 -07:00
Clayton Coleman
befbf8466f Only write to etcd if values have changed
This prevents certain loops from writing data to etcd every few
seconds (when data hasn't changed).
2014-08-14 20:34:36 -04:00
Clayton Coleman
7c67cbff04 Watch should start from next index when getting the initial state
Also, the fake response we return should have an Action that is
appropriate for the operation.
2014-08-14 20:32:46 -04:00
csrwng
5538bfca01 Allow kubecfg to parse other types via initialization map 2014-08-14 18:14:12 -04:00
brendandburns
8daf8c7a30 Merge pull request #896 from smarterclayton/return_correct_index_for_delete
Delete should use current node, not prev node index
2014-08-14 14:59:52 -07:00
Joe Beda
5654f5b247 Merge pull request #904 from erictune/cleanup5
Return not required after panic.
2014-08-14 14:30:41 -07:00
Joe Beda
8092a80ad9 Merge pull request #903 from erictune/cleanup4
Pass obj with lock by reference.
2014-08-14 14:29:01 -07:00
Joe Beda
9f7f46d06b Merge pull request #901 from erictune/cleanup3
Remove unreachable code.
2014-08-14 14:27:31 -07:00
Clayton Coleman
87256127e0 Merge pull request #856 from pmorie/workaround-timestamp
Set CreationTimestamp in each storage implementation
2014-08-14 17:25:58 -04:00
Eric Tune
3d02700cc8 Dereference string* before printing it with "%s%".
Suggested by "go vet".
2014-08-14 14:06:09 -07:00
Eric Tune
c42d8b8e73 Return not required after panic.
Suggested by "go vet".
2014-08-14 14:04:39 -07:00
Eric Tune
ee91a19f90 Pass obj with lock by reference. Methods->funcs.
Fixes "lock passed by value" issues raised by "go vet".
2014-08-14 14:01:27 -07:00
Eric Tune
7de0df0be8 Remove unreachable code. 2014-08-14 13:56:42 -07:00
Paul Morie
c69160059b Change CreationTimestamp to a util.Time and set in each storage implementation
Because time.Time doesn't work correctly with our YAML package, it is necessary
to introduce a type, util.Time, which serializes correctly to JSON and YAML.

Eventually we would like timestamping to cut across storage implementations;
for now, we set it in each storage.
2014-08-14 16:26:29 -04:00
Clayton Coleman
2872e565a2 Delete should use current node, not prev node index
The index an object was deleted on should be resp.Node.ModifiedIndex
2014-08-14 16:14:24 -04:00
Brendan Burns
7ea2a37219 deflake tests. 2014-08-13 15:41:42 -07:00
Daniel Smith
9355fae71e Merge pull request #881 from smarterclayton/etcd_closes_watch_channel
Etcd can close the watch channel for services
2014-08-13 14:11:50 -07:00
Joe Beda
e5e4c8a7d3 Merge pull request #378 from monnand/godep
Use godep to manage dependencies
2014-08-13 13:28:15 -07:00
Daniel Smith
4d36502c9c Merge pull request #842 from smarterclayton/add_api_groups
Extract RESTHandler and allow API groupings
2014-08-13 13:05:02 -07:00
Nan Monnand Deng
41b0e5f34c move go-dockerclient-copiedstructs to third_party/docker-api-structs 2014-08-13 14:49:03 -04:00
Clayton Coleman
231ed95a61 Typo in name 2014-08-13 14:36:23 -04:00
Clayton Coleman
7d24615d8e Etcd can close the watch channel for services
Need to loop and reopen if it's closed.
2014-08-13 14:21:16 -04:00
Clayton Coleman
bbf3b55e76 Extract RESTHandler and allow API groupings
Prepare for running multiple API versions on the same HTTP server
by decoupling some of the mechanics of apiserver.  Define a new
APIGroup object which represents a version of the API.
2014-08-13 10:53:34 -04:00
Daniel Smith
aeea1b1e06 Merge pull request #732 from mfojtik/etcd_log
Avoid log flooding with messages about missing missing registry/services
2014-08-12 18:17:04 -07:00
Daniel Smith
ab24790e8f Fix go files with wrong boilerplate 2014-08-12 17:48:00 -07:00
Daniel Smith
1a5a22c539 Fix files missing gofmt 2014-08-12 17:48:00 -07:00
brendandburns
74a7179e2e Merge pull request #858 from lavalamp/fix
Fix flaky TestOpGet
2014-08-12 15:19:13 -07:00
Daniel Smith
f220aa1aba Fix flaky TestOpGet and TestSyncCreateTimeout 2014-08-12 14:23:12 -07:00
Michal Fojtik
afbd7a6147 Make proxy/config/etcd.go less verbose when etcd is not available 2014-08-12 11:51:44 +02:00
Kelsey Hightower
c21a0ca39f Breakup the registry package into separate packages.
Currently all registry implementations live in a single package,
which makes it bit harder to maintain. The different registry
implementations do not follow the same coding style and naming
conventions, which makes the code harder to read.

Breakup the registry package into smaller packages based on
the registry implementation. Refactor the registry packages
to follow a similar coding style and naming convention.

This patch does not introduce any changes in behavior.
2014-08-11 20:58:09 -07:00
Clayton Coleman
c6dcfd544f Merge pull request #839 from yugui/fix/api-status
Make storage.Delete return *api.Status instead of api.Status
2014-08-11 20:01:28 -04:00
Daniel Smith
c372b74bc8 Merge pull request #847 from thockin/health
Use IntOrString for health checks
2014-08-11 16:28:24 -07:00
Daniel Smith
6460a8cbf8 Correct confusing comment. 2014-08-11 15:58:59 -07:00
brendandburns
3222f61bca Merge pull request #557 from lavalamp/podLocation
Prepare for external scheduler
2014-08-11 15:27:24 -07:00
Tim Hockin
1c8704befc Merge pull request #592 from lavalamp/schedulerApi
Proposal for scheduler API
2014-08-11 15:20:45 -07:00
Daniel Smith
5e34a9784f Merge pull request #852 from smarterclayton/deliver_state_on_nil_version
Watch delivers current state for resourceVersion=0
2014-08-11 15:13:15 -07:00
Daniel Smith
b5352a81c7 Use DesiredState rather than CurrentState for Host. 2014-08-11 15:12:51 -07:00
Dan Mace
b986c520a7 Apply resource versioning to list extractions from etcd
Set the resource version on lists of objects extracted from etcd to prevent
them from always being interpreted as new during updates.
2014-08-11 21:11:08 +00:00
Clayton Coleman
c5630a9567 Watch delivers current state for resourceVersion=0
Allows clients to get the current state without having to execute
a get followed by a watch.  Makes integration with action loops
much cleaner.
2014-08-11 17:07:14 -04:00
Daniel Smith
b7752a86d4 Add debugging info printing to etcd fake
And make tests pass again.
2014-08-11 13:09:24 -07:00
Daniel Smith
9050c819dc Merge pull request #722 from smarterclayton/improve_errors
Normalize apiserver error handling of standard errors
2014-08-11 12:43:06 -07:00
Tim Hockin
bca90f4866 Reduce and comment exports 2014-08-11 00:11:59 -07:00
Tim Hockin
7beac7a9af Split health_check.go into smaller parts.
Distinct files for core, http, and tcp.
2014-08-11 00:01:17 -07:00
Tim Hockin
24c516ec1d Move HTTP code out of health.go
Put it with the related HTTP code.
2014-08-10 23:50:06 -07:00
Tim Hockin
c67c1edfb4 Use IntOrString for TCP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in TCP health checks.  Improve tests.
2014-08-10 23:44:42 -07:00
Tim Hockin
7201227cb1 Use IntOrString for HTTP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in HTTP health checks.  Improve tests.
2014-08-10 23:26:42 -07:00
Daniel Smith
7d605467dc New scheduler API
This commit adds a Binding object. The idea is that schedulers can write
these to cause pods to be asssigned to hosts. I'll provide an implementation
along with a rudimentary scheduler plugin.

This continues k8s' tradition of phrasing all APIs as RESTful handlers.
2014-08-10 19:05:03 -07:00
Daniel Smith
5cdce0e35a Prepare for external scheduler
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
   the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Clayton Coleman
d419eedb06 Watch handler not returning after 404 2014-08-09 10:46:56 -04:00
Yuki Yugui Sonoda
d359f3c396 Make storage.Delete return *api.Status instead of api.Status
as apiserver.APIServer.finishReq expects.

This solves the warning in finishReq:
"programmer error: use *api.Status as a result, not api.Status."
2014-08-09 22:18:24 +09:00
Clayton Coleman
0083fae453 Provide helpers and tests for common error types
Unify error handling in apiserver into a single path - RESTStorage
objects must provide appropriate errors individually.  Ensure ALL
errors which can be traced to logical faults with RESTStorage are
returned as api.Status objects.
2014-08-08 19:44:47 -04:00
Daniel Smith
079c9043bd Switch to new external fuzz package 2014-08-08 15:54:09 -07:00
Clayton Coleman
71c6e082d4 Merge pull request #805 from lavalamp/serverWatch
Improve watch
2014-08-08 17:30:28 -04:00
brendandburns
4c00acdde0 Merge pull request #827 from brendandburns/kubelet
Add container hashing to the container name, and restart containers on changes.
2014-08-08 14:17:11 -07:00
Daniel Smith
5dd130a350 Prevent accidental setting of sync or timeout 2014-08-08 14:09:14 -07:00
Daniel Smith
49cded3800 Simplify ResourceWatcher interface to one function. 2014-08-08 14:09:13 -07:00
Daniel Smith
71709ae09e Make replication controller use client 2014-08-08 14:09:13 -07:00
Daniel Smith
51caf759c3 Add WatchReplicationControllers to kubecfg's fake 2014-08-08 14:09:13 -07:00
Daniel Smith
85ff1d3e7f Add fake client to make testing easier. 2014-08-08 14:09:13 -07:00
Daniel Smith
097147545c Allow more general parameters to be made by client. Also fix style and comments. 2014-08-08 14:09:13 -07:00
Daniel Smith
283fdba6ab Add more parameters to Watch
* Add labels selector (same as List)
* Add fields selector
 * Plan to let you select pods by Host and/or Status
* Add resourceVersion to let you resume a watch where you left off.
2014-08-08 14:09:13 -07:00
Clayton Coleman
a74fac7d70 Centralize path magic in apiserver into the New method
Make OperationHandler and WatchHandler properly encapsulate their
concerns and make them not depend on the global path
2014-08-08 16:33:44 -04:00
Brendan Burns
2986db9885 Add container hashing to the container name, and restart containers on changes. 2014-08-08 13:32:07 -07:00
Daniel Smith
2297bf8cea Merge pull request #830 from brendandburns/net
Delete containers for a pod if we have to create the network container.
2014-08-08 13:12:42 -07:00
Brendan Burns
38900a9c58 Delete containers for a pod if we have to create the network container. 2014-08-08 12:34:59 -07:00
Daniel Smith
ac6d6ec974 Merge pull request #807 from smarterclayton/abstract_apiserver_encoding
Decouple apiserver from codec implementation
2014-08-08 11:57:04 -07:00
Victor Marmol
adc57da3f3 Merge pull request #825 from brendandburns/runin
Add support for "run in"
2014-08-07 23:47:19 -07:00
Brendan Burns
d31d0781b2 Add support for "run in" 2014-08-07 20:27:58 -07:00
Clayton Coleman
c9fc0bcf3d Decouple apiserver from codec implementation
The apiserver on initialization must be provided with a codec
for encoding and decoding all handled objects including api.Status
and api.ServerOp.  In addition, the RESTStorage Extract() method
has been changed to New(), which returns a pointer object that the
codec must decode into (the internal object).  Switched registry
methods to use pointers for Create/Update instead of values.
2014-08-07 13:35:35 -04:00
Clayton Coleman
d7f46718a8 Kubelet should have a max think time before auto resync
The sync frequency should be part of the syncLoop and resync no
less often than every X seconds.  The current implementation runs
even if a config update was delivered less than X seconds ago.
2014-08-07 10:40:03 -04:00
brendandburns
b43e3865b4 Merge pull request #789 from thockin/cleanups2
Rename files: stringlist -> list (similar to set)
2014-08-06 22:41:46 -07:00
csrwng
92be0b3f43 Fix the wrong action being recorded on GetService
Fix the action recorded when GetService gets called on FakeKubeClient
Also fix parameter names (controller -> service)
2014-08-07 00:15:44 -04:00
Tim Hockin
37309ece6d Rename files: stringlist -> list (similar to set) 2014-08-06 20:13:40 -07:00
Tim Hockin
ebef8af8fe Merge pull request #688 from Sarsate/volume-cleanup-loop
Volume reconciliation loop
2014-08-06 16:59:17 -07:00
Danny Jones
7c28e0849f Reorganization; Directory traversal less ugly
Directory traversal is no longer recursive and only goes as deep as it
needs to. Moved GetActiveVolumes to volume packages and added a simple
test.
2014-08-06 11:20:34 -07:00
Daniel Smith
8c529187b5 Merge pull request #806 from smarterclayton/follow_up_to_encoding_abstraction
Address remaining comments from #756
2014-08-06 10:47:41 -07:00
Danny Jones
3f7f6cb2dc Modifies tests to use new volume objects. 2014-08-06 10:21:59 -07:00
Danny Jones
6191ffc0de Modifies directory walker to use a regex
Now a regex is used to determine active volume properties from
their directory paths.
2014-08-06 10:21:59 -07:00
Danny Jones
47bca30edc Splits volume interface into Builders and Cleaners
Different information is needed to perform setup versus teardown. It
makes sense to separate these two interfaces since when we call teardown
from the reconciliation loop, we cannot rely on having the
information provided by the api definition of the volume.
2014-08-06 10:21:59 -07:00
Danny Jones
dfc9cb86f0 Initial reconciliation loop.
Determines the set of active volumes versus the set of valid volumes
defined by the manifests. If there is an active volume that is not
defined in any of the manifests, deletes and cleans up that volume.
2014-08-06 10:21:59 -07:00
Clayton Coleman
67dbd15929 Address remaining comments from #756
Rename Encoding to Codec, Versioning to ResourceVersioner.  Add
GoDoc.  Add Delete(key, recursive) to EtcdHelper
2014-08-06 11:25:35 -04:00
Clayton Coleman
836d2b9808 Fix proxy error condition and simplify method
Add new minion proxy test case.
2014-08-06 01:03:17 -04:00
Tim Hockin
63a7c37650 Merge pull request #799 from sborman/master
Corrected a typo in comment.
2014-08-05 17:17:02 -07:00
Kouhei Ueno
22522cd003 PodConfigListener is never used 2014-08-06 06:43:16 +09:00
Sean Borman
1fc29e20cc Corrected a typo. 2014-08-05 13:53:52 -07:00
Daniel Smith
860050b507 Merge pull request #745 from smarterclayton/add_structured_reason
Evolve the api.Status object with Reason/Details
2014-08-05 13:28:19 -07:00
Clayton Coleman
4f88b778a6 Evolve the api.Status object with Reason/Details
Contains breaking API change on api.Status#Details (type change)

Turn Details from string -> StatusDetails - a general
bucket for keyed error behavior.  Define an open enumeration
ReasonType exposed as Reason on the status object to provide
machine readable subcategorization beyond HTTP Status Code. Define
a human readable field Message which is common convention (previously
this was joined into Details).

Precedence order: HTTP Status Code, Reason, Details. apiserver would
impose restraints on the ReasonTypes defined by the main apiobject,
and ensure their use is consistent.

There are four long term scenarios this change supports:

1. Allow a client access to a machine readable field that can be
   easily switched on for improving or translating the generic
   server Message.

2. Return a 404 when a composite operation on multiple resources
   fails with enough data so that a client can distinguish which
   item does not exist.  E.g. resource Parent and resource Child,
   POST /parents/1/children to create a new Child, but /parents/1
   is deleted.  POST returns 404, ReasonTypeNotFound, and
   Details.ID = "1", Details.Kind = "parent"

3. Allow a client to receive validation data that is keyed by
   attribute for building user facing UIs around field submission.
   Validation is usually expressed as map[string][]string, but
   that type is less appropriate for many other uses.

4. Allow specific API errors to return more granular failure status
   for specific operations.  An example might be a minion proxy,
   where the operation that failed may be both proxying OR the
   minion itself.  In this case a reason may be defined "proxy_failed"
   corresponding to 502, where the Details field may be extended
   to contain a nested error object.

At this time only ID and Kind are exposed
2014-08-05 16:17:53 -04:00
Daniel Smith
dc0a475be9 Merge pull request #796 from nyaxt/fixrace
Avoid data race in Proxier.OnUpdate
2014-08-05 12:56:05 -07:00
Kouhei Ueno
2e02967aca Avoid data race in Proxier.OnUpdate
The bug was that the proxier is passed as value on method decleration.
This caused a copy of Proxier to be created when the method was invoked.
The copy being a shallow copy turned out to have them both reference
a same map instance, but their mutexes were different instances.
This turned out to use different mutexes before operating on a same map
instance, which didn't make sense.
2014-08-06 04:34:54 +09:00
Daniel Smith
e75854a1f9 Merge pull request #759 from brendandburns/valid
Add c-identifier validation to service ids.
2014-08-05 12:32:02 -07:00
Daniel Smith
6f85a5b8aa Merge pull request #794 from nyaxt/reland_atomicetcd
Remove duplicated defs and reland #694.
2014-08-05 12:07:59 -07:00
Daniel Smith
2d3373664f Merge pull request #765 from brendandburns/service
Add support for regions, and use them for cloud load balancing.
2014-08-05 11:59:36 -07:00
brendandburns
cc4300c3ec Merge pull request #757 from lavalamp/repCtl
Remove etcd dep from controller manager
2014-08-05 11:47:31 -07:00
brendandburns
f87a93af7a Merge pull request #754 from kelseyhightower/proxy-cleanup
proxy: cleanup and minor refactoring
2014-08-05 11:46:52 -07:00
brendandburns
bf40981197 Merge pull request #758 from lavalamp/clientCache
Watch based client cache
2014-08-05 11:46:22 -07:00
Kouhei Ueno
c1ec1d6d72 Remove duplicated def of IsEtcdNodeExist 2014-08-06 03:45:50 +09:00
Kouhei Ueno
c7947abd9c Revert "Revert "Use atomic create in EtcdHelper.AtomicUpdate""
This reverts commit 73b64aa490.
2014-08-06 03:43:19 +09:00
Brendan Burns
20a8f03d62 Add dns-952-identifier validation to service ids. 2014-08-05 11:40:48 -07:00
Brendan Burns
c27ab18481 Don't use zone for regional load balancers. 2014-08-05 11:38:33 -07:00
Brendan Burns
1d8407cf7d Don't hard code load balancer zone. 2014-08-05 11:38:33 -07:00
Daniel Smith
73b64aa490 Revert "Use atomic create in EtcdHelper.AtomicUpdate" 2014-08-05 11:34:00 -07:00
Daniel Smith
51872d65c9 Merge pull request #694 from nyaxt/atomicetcd
Use atomic create in EtcdHelper.AtomicUpdate
2014-08-05 11:19:22 -07:00
Daniel Smith
5ff072030c Merge pull request #746 from smarterclayton/atomic_create
Make create atomic for etcd on Services/ReplControllers
2014-08-05 11:08:55 -07:00
Kouhei Ueno
dea1b8c48b Remove 10ms timeout from TestWatch 2014-08-06 01:02:58 +09:00
Kouhei Ueno
cf117d5b48 Add test for EtcdHelper.AtomicUpdate concurrent create 2014-08-06 00:30:55 +09:00
Kouhei Ueno
4799b546c9 Make fake_etcd_client threadsafe 2014-08-05 23:37:32 +09:00
Kouhei Ueno
3f9ec452e4 use atomic create in EtcdHelper.AtomicUpdate 2014-08-05 23:37:32 +09:00
Kouhei Ueno
b3e5f40988 Fix bug where debug "return" prevented whole TestAtomicUpdate run 2014-08-05 23:37:32 +09:00
Kelsey Hightower
1d3e660248 proxy: cleanup and minor refactoring
This change includes minor refactoring and cleanup of the proxy
package including the following items:

 * Rename source files with misspelling of round robin
 * Remove unnecessary and redundant comments
 * Update comments for clarity
 * Add locking when updating the round-robin index
 * Improve method receiver names
 * Rename the LoadBalance method to NextEndpoint to add clarity

No changes in behaviour have been introduced.
2014-08-05 07:18:12 -07:00
Clayton Coleman
325f9ef005 Make create atomic on etcd for Services/ReplControllers 2014-08-05 01:12:27 -04:00
Clayton Coleman
babb7528ce httptest.NewTLSServer is ~0.2s of setup per test
We're not exercising anything TLS related in client and request,
set these back to NewServer.  Should add a new TLS end-to-end
test for hack/test-cmd.sh with real (test) certs.
2014-08-05 00:59:42 -04:00
Kouhei Ueno
6288336436 Rename IsEtcdConflict to IsEtcdTestFailed 2014-08-05 08:07:20 +09:00
Daniel Smith
041d56f3d0 finish testing client/cache 2014-08-04 14:50:01 -07:00
Daniel Smith
03fe91cc4a Add ID to JSONBaseInterface 2014-08-04 14:50:01 -07:00
Daniel Smith
a47b65bf8a Add cache package. 2014-08-04 14:50:01 -07:00
Daniel Smith
b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07:00
Tim Hockin
7f0d470979 Merge pull request #776 from nyaxt/respectzone
ServiceRegistryStorage.Delete should respect zone.
2014-08-04 14:29:46 -07:00
Tim Hockin
471955d310 Merge pull request #775 from nyaxt/misc_cleanup
Minor clean ups for readability
2014-08-04 14:29:07 -07:00
Kouhei Ueno
d7fc4637e9 ServiceRegistryStorage.Delete should respect zone. 2014-08-05 06:11:00 +09:00
Daniel Smith
38c4cdff99 Merge pull request #773 from smarterclayton/speed_up_proxy_tests
Remove 8 seconds of unnecessary sleeps from proxy tests
2014-08-04 13:49:07 -07:00
Kouhei Ueno
c6ebc4859e Reduce nesting on ServiceRegistryStorage.Create 2014-08-05 05:38:31 +09:00
Daniel Smith
f36d2a7ebd Merge pull request #740 from brendandburns/sync
Switched Set to Create in etcd tools
2014-08-04 13:15:08 -07:00
Kouhei Ueno
c8e1c6a02f dedupe apiserver.New 2014-08-05 05:11:25 +09:00
Kouhei Ueno
afa686ccc8 dedupe registry.MakeEndpointController init 2014-08-05 05:09:49 +09:00
derekwaynecarr
e5fd877052 Validate on replicas being non-negative 2014-08-04 15:39:45 -04:00
Clayton Coleman
0c33ed09d4 Remove long sleeps from proxy tests 2014-08-04 15:35:03 -04:00
Clayton Coleman
786b0399c3 Make interval a constant on proxy/config/etcd
Allow future testing of intervals
2014-08-04 15:34:43 -04:00
Brendan Burns
ab4918464e Switched Set to Create 2014-08-04 12:10:16 -07:00
roberthbailey
fb49ea331d Merge pull request #764 from brendandburns/expect
Fix unit test build.
2014-08-04 10:16:45 -07:00
brendandburns
27426db827 Merge pull request #756 from smarterclayton/expose_encoding_versioning_interfaces
Expose an Encoding/Versioning interface for use with etcd
2014-08-04 10:10:54 -07:00
Brendan Burns
d648b2350e Fix unit test build. 2014-08-04 09:50:25 -07:00
brendandburns
81a8ac723f Merge pull request #753 from smarterclayton/remove_expect_no_error_apiserver
Remove expectNoError from apiserver
2014-08-04 09:15:34 -07:00
brendandburns
d4860c21a9 Merge pull request #752 from smarterclayton/remove_expect_no_error_util
Remove expectNoError from client, kubelet, and util
2014-08-04 09:15:22 -07:00
brendandburns
97a6aaba53 Merge pull request #751 from smarterclayton/remove_expect_no_error
Remove expectNoError from pkg/registry
2014-08-04 09:14:59 -07:00
brendandburns
6531188f37 Merge pull request #750 from smarterclayton/operation_list_not_returned
/api/v1beta1/operations was returning Not Found
2014-08-04 09:13:27 -07:00
brendandburns
e52c62565b Merge pull request #692 from lavalamp/dockerObjWrap
Copy docker client structs into v1beta1
2014-08-04 09:10:57 -07:00
Clayton Coleman
f7149926c0 Remove expectNoError from client, kubelet, and util 2014-08-04 09:39:06 -04:00
Clayton Coleman
64bf2d9f63 Remove expectNoError from apiserver 2014-08-04 09:37:53 -04:00
Clayton Coleman
ef1329b6c8 Remove expectNoError from pkg/registry 2014-08-04 09:36:47 -04:00
Clayton Coleman
4448be2d95 Expose an Encoding/Versioning interface for use with etcd
etcd_tools.go is not dependent on the specific implementation
(which is provided by pkg/api).  All EtcdHelpers are created
with an encoding object which handles Encode/Decode/DecodeInto.
Additional tests added to verify simple atomic flows.

Begins to break up api singleton pattern.
2014-08-03 21:35:33 -04:00
Clayton Coleman
75aa364b3c /api/v1beta1/operations was returning Not Found
Splitting an empty string returns []string{""}, not []string{}
2014-08-03 19:35:17 -04:00
Clayton Coleman
10564e447b Generate valid file Pod Names and test for them
Ensure that pods coming from the unit test configuration validate,
and that proper names are generated.

Lowercases source filenames, strips all but a-z0-9, and tests
for consistent results.
2014-08-03 18:46:59 -04:00
Daniel Smith
2282f9ce3a Merge pull request #737 from brendandburns/atomic
Make updates atomic from the client side.
2014-08-01 17:30:37 -07:00
Daniel Smith
e8103e30a1 Merge pull request #715 from meirf/value-in-set-selector
structured message for selector; matching functionality
2014-08-01 16:47:47 -07:00
Brendan Burns
1101c00014 Make updates atomic from the client side. 2014-08-01 16:47:25 -07:00
erictune
5b589cf115 Merge pull request #735 from brendandburns/tcp-health
Add TCP socket based health checking.
2014-08-01 16:35:12 -07:00
Daniel Smith
828aed4cc8 Copy docker client structs, adding yaml/json tags.
Use these in our v1beta1 package so that we can pass fuzz test encode/decode.
2014-08-01 15:31:39 -07:00
Daniel Smith
1cc7fce523 Add documentation and tests to conversion. 2014-08-01 14:26:36 -07:00
Daniel Smith
5c0f5e85e2 Make api use converter package. 2014-08-01 14:26:35 -07:00
Daniel Smith
a73e4f4623 Separate generic parts of api library into conversion package. 2014-08-01 14:25:42 -07:00
Brendan Burns
490bb28bf9 Add TCP socket based health checking. 2014-08-01 14:13:56 -07:00
brendandburns
30b6ab5278 Merge pull request #728 from smarterclayton/improve_apiserver_tests
Expand apiserver test cases
2014-08-01 09:32:19 -07:00
Clayton Coleman
8b2b325103 Merge pull request #730 from lavalamp/rename
Begin systemizing files in pkg/registry
2014-08-01 10:57:31 -04:00
Yuki Yugui Sonoda
331fd0d986 Extract "pkg/version".PrintAndExitIfRequested() to its own package
because it causes a runtime panic if a binary which has its own implementation
of "-version" flag tries to reuse a package library which indirectly depend on
"pkg/version".

e.g. If such an user-defined binary tires to link "pkg/api" or "pkg/client",
the binary fails with a runtime panic "flag redefined: version".
2014-08-01 15:05:27 +09:00
Meir Fischer
9076e78654 change strValues's type to util.StringSet; rename Comparator to Operator; small syntax fix 2014-07-31 23:56:37 -04:00
Daniel Smith
7dbb6f02fe Begin systemizing files in pkg/registry
Files that have RESTStorage implementations now end in "storage", and
files that have registries now end in "registry". I removed some
underscores in file names, since it seems to be go style not to have
them. I split minion_registry.go into two files.

We should consider splitting this package into two, to make more clear
the separation between the layers.
2014-07-31 17:24:15 -07:00
Clayton Coleman
af4d57b39a Expand apiserver tests 2014-07-31 18:59:54 -04:00
Clayton Coleman
8986a0fc4b Remove debugging statement 2014-07-31 18:52:15 -04:00
Daniel Smith
928092e79e Etcd watcher verification
To make sure the etcd watcher works, I changed the replication
controller to use watch.Interface. I made apiserver support watches on
controllers, so replicationController can be run only off of the
apiserver. I made sure all the etcd watch testing that used to be in
replicationController is now tested on the new etcd watcher in
pkg/tools/.
2014-07-31 14:54:30 -07:00
Daniel Smith
aa454fea93 Merge pull request #711 from smarterclayton/more_info_about_format_conversion_error
More verbose error on missing field
2014-07-31 14:34:09 -07:00
Clayton Coleman
e1b0000404 Merge pull request #717 from nyaxt/atomicupdate_test
Add test for AtomicUpdate
2014-07-31 16:44:24 -04:00
Clayton Coleman
7ce23e43e7 More verbose error on missing field 2014-07-31 14:38:38 -04:00
Clayton Coleman
28d42a79a4 Merge pull request #719 from csrwng/list_replication_controllers
Add a method to list replication controllers
2014-07-31 14:34:58 -04:00
csrwng
19ddfe72df Fixed FakeKubeClient in kubecfg_test 2014-07-31 13:59:58 -04:00
Kouhei Ueno
d4a5ba863d Add test for AtomicUpdate 2014-08-01 02:35:38 +09:00
Kouhei Ueno
648b80e5d7 Implement FakeEtcdClient.ExpectNotFoundGet 2014-08-01 02:35:38 +09:00
Kouhei Ueno
a3771c9042 AtomicUpdate should use api.Encode 2014-08-01 02:35:38 +09:00
Kouhei Ueno
6dd1e9cbb5 Implement FakeEtcdClient.CompareAndSwap 2014-08-01 02:35:38 +09:00
Kouhei Ueno
ccb7e8793b return EtcdErrorNodeExist when Create is called for existing node 2014-08-01 02:35:37 +09:00
Kouhei Ueno
d46bfcb132 Fail immediately if f.Err is set 2014-08-01 02:35:37 +09:00
Kouhei Ueno
e40cdd50ed Generate modification index only if f.TestIndex is specified.
This is for compatibility with existing tests.
2014-08-01 02:34:08 +09:00
Kouhei Ueno
b82bb37c89 FakeEtcdClient: Maintain change index 2014-08-01 02:34:08 +09:00
Dawn Chen
2e8020be8c Update the entire cAdvisor package. There is a version mismatch issue
which cause #707
2014-07-31 10:11:25 -07:00
csrwng
a3476fcbca Add a method to list replication controllers 2014-07-31 12:37:02 -04:00
Dawn Chen
76ec7acf91 bump(github.com/google/cadvisor): bdd574b728e8a1e5eb08649d631197620dd09650 2014-07-31 09:14:04 -07:00
Meir Fischer
80b1fa000e structured message for selector; matching functionality 2014-07-31 00:29:42 -04:00
Filipe Brandenburger
de405ac126 Improve generation of version information from the git tree
Detect whether the tree is dirty and append a "-dirty" indication to the
git commit (common practice with other repos, e.g. kernel, docker.)

Properly handle the case where a git tree is not found (e.g. building
from archive.)

In the sed expression, look for the variable to be updated
(commitFromGit) instead of hardcoding a line number.

Tested:

- Built from a dirty tree:
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build 2d784c684c75-dirty

- Built from a clean tree:
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build 505f23a31172

- Built from an archive:
    $ hack/build-go.sh
    WARNING: unable to find git commit, falling back to commitFromGit = `(none)`
    $ output/go/bin/kubelet -version
    Kubernetes version 0.1, build (none)

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:57 -07:00
Filipe Brandenburger
7e56609139 Handle -version flag on all commands
Tested: Passed -version argument to kubelet (and all other binaries):
  $ output/go/bin/kubecfg -version
  Kubernetes version 0.1, build 6454a541fd56

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2014-07-30 18:48:56 -07:00
brendandburns
76e2cd70f7 Merge pull request #683 from smarterclayton/slightly_pause_on_return
Slightly pause on requests to allow most to finish
2014-07-30 16:05:15 -07:00
Dawn Chen
21513b1e08 Merge pull request #691 from dchen1107/restart
Add RestartPolicy to Pod and PodTemplate
2014-07-30 15:32:20 -07:00
Dawn Chen
2740fb0abf Add RestartPolicy to Pod and PodTemplate 2014-07-30 15:31:27 -07:00
Daniel Smith
c5ca032287 Merge pull request #706 from brendandburns/proxy
Revert the revert and fix tests.
2014-07-30 15:19:12 -07:00
brendandburns
59c5fb11c0 Merge pull request #672 from lavalamp/customConversionFuncs
Custom conversion funcs
2014-07-30 15:09:01 -07:00
Brendan Burns
2cbe2c18d4 Add a comment to tickle travis. 2014-07-30 15:06:56 -07:00
Daniel Smith
ce586c1448 Test both directions of the conversion. 2014-07-30 15:04:01 -07:00
Brendan Burns
9519a8049b Fixed tests. 2014-07-30 15:02:36 -07:00
Clayton Coleman
1bdeb058e1 Slightly pause on requests to allow most to finish
Currently, every write will result in a 202 (etcd adding a few
ms of latency to each request).  This forces clients to go into
a poll loop and pick a reasonable server poll frequency, which
results in 1 + N queries to the server for the single operation
and adds unavoidable latency to each request which affects their
perception of the service.

Add a very slight (25ms by default) delay to wait for requests
to finish.  For clients doing normal writes this reduces the
requests made against the server to 1.  For clients on long requests
this has no effect.  The downside is that http connections are held
on to for a longer period in high write loads.  The decrease in
perceived latency from the kubecfg is significant.
2014-07-30 17:49:47 -04:00
brendandburns
2486414c16 Merge pull request #690 from smarterclayton/refactor_apiserver_changes
Clean up pkg/apiserver
2014-07-30 14:41:00 -07:00
brendandburns
5443929b84 Merge pull request #702 from fsouza/update-go-dockerclient
third_party: update go-dockerclient
2014-07-30 14:25:37 -07:00
Daniel Smith
242c8cdaec Add custom conversion function system.
As an example, demonstrate how Env.Key's deprecation ought to work.
2014-07-30 14:18:23 -07:00
Clayton Coleman
e64a393e1a Move handle* methods to their respective locations
Fix names
2014-07-30 17:15:09 -04:00
Clayton Coleman
fe7f611d88 Split operations code and add comments 2014-07-30 17:15:09 -04:00
Clayton Coleman
9069696514 Rename write -> writeJSON 2014-07-30 17:15:09 -04:00
Clayton Coleman
b84c9f7a1c Rename methods and move parseTimeout 2014-07-30 17:15:09 -04:00
Clayton Coleman
82b78912fc Move prefix methods 2014-07-30 17:15:09 -04:00
Clayton Coleman
a2c86e4c97 Simplify helpers 2014-07-30 17:15:09 -04:00
Clayton Coleman
c7d311896e Shorten variable name 2014-07-30 17:15:09 -04:00
Clayton Coleman
8b511832ff Split minion 2014-07-30 17:15:09 -04:00
Clayton Coleman
a46f6313bc Split interfaces 2014-07-30 17:15:09 -04:00
Clayton Coleman
d5e22bfe2a Split index 2014-07-30 17:14:07 -04:00
Clayton Coleman
b70a145161 Split operations test 2014-07-30 17:14:06 -04:00
Clayton Coleman
db51ea2a17 Split async 2014-07-30 17:14:06 -04:00
Clayton Coleman
b911d9265a Split watch 2014-07-30 17:14:06 -04:00
erictune
a41aeeca67 Merge pull request #701 from SebastianM/misspelling
fix misspelling
2014-07-30 13:36:14 -07:00
Francisco Souza
2a345ffa9e third_party: update go-dockerclient
math.MaxInt64 represents 8 exabytes, which is a good limit for memory.
Also, this is the type used by Docker, so it's not possible to get any
value bigger than math.MaxInt64 as memory limit (both ram and swap) on a
Docker container.

Relevant discussion at #589 (more precisely,
https://github.com/GoogleCloudPlatform/kubernetes/pull/589#issuecomment-50640605).
2014-07-30 15:18:42 -03:00
Sebastian Müller
e1172fc78c fix misspelling 2014-07-30 20:10:12 +02:00
Clayton Coleman
dc6fdc423d Merge pull request #627 from lavalamp/fix
Add /version to server and check it in client.
2014-07-30 12:52:15 -04:00
Dan McPherson
d94f5c3360 Fixing typo 2014-07-30 16:45:53 +02:00
Brendan Burns
448a4b7d69 Revert "Revert "Add support for stopping a proxier.""
This reverts commit 19beaf71b5.
2014-07-30 06:52:03 -07:00
brendandburns
0ad9221f5c Merge pull request #695 from danmcp/fix_golint_warnings
Fixing golint warnings
2014-07-30 06:49:27 -07:00
Dan McPherson
d5fcaa1f03 Fixing golint warnings 2014-07-30 13:41:09 +02:00
Daniel Smith
19beaf71b5 Revert "Add support for stopping a proxier." 2014-07-29 23:24:57 -07:00
Daniel Smith
00bdeecb63 Merge pull request #682 from brendandburns/proxy
Add support for stopping a proxier.
2014-07-29 23:20:55 -07:00
brendandburns
b0d18b2af0 Merge pull request #571 from lavalamp/master
Decode/Encode everywhere
2014-07-29 17:19:33 -07:00
Daniel Smith
2396bdfa1b Incorporate new types into versioned api system.
* Made externalize/internalize generic to prevent boilerplate.
* Add fuzz testing.
* All objects pass fuzz tests now.
* This turned up some things we'll need to fix eventually. Left TODOs.
2014-07-29 15:46:57 -07:00
Brendan Burns
99f0d2e807 Add support for stopping a proxier. 2014-07-29 15:40:47 -07:00
Rohit Jnagal
fbd3e85e9c Fix handling of default cpu shares. 2014-07-29 18:34:16 +00:00
Daniel Smith
e10d85efce Merge pull request #685 from smarterclayton/error_on_empty_service
Cleanly delete service without endpoints key
2014-07-29 09:45:31 -07:00
Daniel Smith
4a1660be7c Merge pull request #679 from dchen1107/minionlogs
Fix #663
2014-07-29 09:37:55 -07:00
Daniel Smith
2a0b82a4ed Merge pull request #681 from brendandburns/noisy
Make file error logging edge triggered to reduce log spam.
2014-07-29 09:27:25 -07:00
Clayton Coleman
a49b331794 Cleanly delete service without endpoints key
If a service is deleted before the etcd key corresponding to its
endpoints has been created, a 500 error is returned (etcd key
not found).  Instead, key not found should be ignored silently.

There is a potential race condition with the controller creating
endpoints after the service has been deleted which a cleanup task
should handle in the future.

Closes #684
2014-07-29 11:44:46 -04:00
Brendan Burns
aa703a4e72 Make file error logging edge triggered to reduce log spam. 2014-07-29 05:38:07 -07:00
Dawn Chen
58008510a0 Fix #663
Return all healthy minions instead of only returning the first several
healthy minions. Without the PR, if the first minion failed with health
check, the machine list is empty, thus GET /api/v1beta1/pods failed
with code 500
2014-07-29 00:24:53 -07:00
Daniel Smith
f87bd6b8f9 Merge pull request #628 from jdef/master
named container ports should have sane env var names
2014-07-28 23:05:48 -07:00
Daniel Smith
cd0b25f1e5 Merge pull request #639 from rafael/validate_pods
Validate pod on create and update.
2014-07-28 18:49:51 -07:00
Rafael Chacón
c9a3ab168d Validate pod on create and update.
* This commit adds pod validations on when creating and updating a pod.
2014-07-28 18:02:30 -07:00
Daniel Smith
1d044e5912 Merge pull request #649 from kelseyhightower/improve_volume_test_coverage
volume: improve test coverage and minor refactoring
2014-07-28 17:46:23 -07:00
Daniel Smith
811d710385 Merge pull request #674 from brendandburns/service
Don't hard code load balancer zone.
2014-07-28 17:15:22 -07:00
Dawn Chen
3627bb5190 Merge pull request #675 from dchen1107/minionlogs
Instead of apiserver panic when proxy a request to a dead minion,
2014-07-28 17:03:02 -07:00
Dawn Chen
8e9864e8fc Instead of apiserver panic when proxy a request to a dead minion,
print out proper message through http.Response
2014-07-28 16:40:29 -07:00
Brendan Burns
c717b872a3 Don't hard code load balancer zone. 2014-07-28 15:54:16 -07:00
Daniel Smith
3b8488028d Add /version to server and check it in client.
Will help detect client/version skew and prevent e2e test from passing
while running a version other than the one you think it's running.
2014-07-28 15:45:25 -07:00
Daniel Smith
31a78c3e2b Merge pull request #619 from brendandburns/controller
Make individual controller actions asynchronous.
2014-07-28 15:35:19 -07:00
Brendan Burns
1a3e4f8baf Add some more synchronization. 2014-07-28 15:05:39 -07:00
brendandburns
71b14b464a Merge pull request #623 from smarterclayton/validate_replication_controllers
Add validation to ReplicationControllers
2014-07-28 14:46:47 -07:00
Clayton Coleman
46bb48cf13 Merge pull request #648 from kelseyhightower/improve_health_test_coverage
health: Improve test coverage
2014-07-28 17:08:33 -04:00
Daniel Smith
c92e8d38b6 Merge pull request #642 from kelseyhightower/cleanup_master_configs
Add master.Config type and cleanup master configuration
2014-07-28 12:53:31 -07:00
Daniel Smith
b3cc696486 All types stored in etcd are now API objects.
This means I made an api.ContainerManifestList, and added a JSONBase to
endpoints (and changed Name -> JSONBase.ID).
2014-07-28 11:27:36 -07:00
Brendan Burns
f1d6069b01 Use Decode/Encode in etcd_tools 2014-07-28 11:27:36 -07:00
brendandburns
b34a3c8c21 Merge pull request #630 from lavalamp/fuzz
Add go fuzzer in preparation for testing.
2014-07-28 10:44:59 -07:00
brendandburns
f073cee13b Merge pull request #636 from kelseyhightower/load_auth_info_tests
kubecfg: improve tests around authentication
2014-07-28 10:44:27 -07:00
Clayton Coleman
4ee3deaaf7 Merge pull request #647 from kelseyhightower/fix_extra_test_flags
Remove extra test flags from all commands
2014-07-28 12:58:57 -04:00
Dan McPherson
c4f4f69b93 Fixing Typos 2014-07-28 15:56:20 +02:00
Dan McPherson
7bbc5e2a19 Fixing typos 2014-07-28 15:15:50 +02:00
Daniel Smith
d09b164e67 Add TODOs, clean up, clarify comments, and add one more test. 2014-07-27 19:32:37 -07:00
Clayton Coleman
5bc19584a5 Update Service and ReplControllers to validate
Validations are performed on update and on create.
2014-07-27 19:55:03 -04:00
Daniel Smith
aa92dd7fb2 Add go fuzzer in preparation for testing. Also gofmt a few files that needed it. 2014-07-27 14:54:48 -07:00
Kelsey Hightower
87fa19cdfe Remove extra test flags from all commands
Currently all commands are being build with extra flags. The extra
flags appear because of a direct import of the testing package from
the fake_etcd_client.go source file.

Remove the direct import of the testing package. Add a tools.T
interface to support existing behavior. Also clean up two TODO items
by remove using of the expectError and expectNoError functions.

Fixes #579
2014-07-27 14:19:18 -07:00
Kelsey Hightower
7b59845843 volume: improve test coverage and minor refactoring
The volume package does not test enough use-cases.

Improve test coverage by adding additional tests and refactoring
current tests to use table testing.

This change introduces a new error var to make testing unsupported
volume type errors easier.

This change does not introduce any changes in behavior.
2014-07-27 14:11:19 -07:00
Clayton Coleman
1047c57c6d Use http.StatusInternalServerError instead of 500 2014-07-27 15:37:03 -04:00
Kelsey Hightower
c860ac3afc health: Improve test coverage 2014-07-27 08:44:59 -07:00
Kelsey Hightower
1ca199379f kubecfg: improve tests around authentication
This change adds additional test coverage for the kubecfg
command. There is now a test for the case when the auth info
file does not exist. LoadAuthInfo tests have been refactored
to use table testing.
2014-07-26 22:21:17 -07:00
Kelsey Hightower
6d1be5f0ee Add master.Config type and cleanup master configuration
Setting up a new master.Master instance requires passing
around too many arguments.

Add a master.Config type and group related master configs.
Refactor all commands to instantiate new masters using a
master.Config struct.
2014-07-26 22:07:24 -07:00
Kelsey Hightower
200b2c0ba7 httplog: Improve test coverage 2014-07-26 21:17:10 -07:00
James DeFelice
8e3e65e0f3 named container ports should have sane env var names 2014-07-25 17:55:52 -04:00
Clayton Coleman
d32024870a Extend validation for ReplicationController
Provide type safe checks for empty sets of selectors.
2014-07-25 12:15:17 -04:00
Jeromy Carriere
9cad657b4c Fix internalize for ReplicationControllerList. items were created
in a new var hiding the function-scoped var.
2014-07-25 10:44:45 -04:00
Clayton Coleman
fbd71c9c02 Merge pull request #535 from lavalamp/etcdWatcher
Etcd watcher
2014-07-25 08:40:05 -04:00
Daniel Smith
e3927b428d Merge pull request #618 from brendandburns/async
Make replication controller synchronizations independent.
2014-07-24 22:58:45 -07:00
Brendan Burns
51c5907c55 Make individual controller actions asynchronous. 2014-07-24 22:57:56 -07:00
Brendan Burns
ae0baf3fab Make replication controller synchronizations independent. 2014-07-24 22:46:04 -07:00
Daniel Smith
321ce0e1ce Merge pull request #565 from brendandburns/api2
Fork API types.
2014-07-24 22:29:57 -07:00
Brendan Burns
bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00
Daniel Smith
f3b6090a38 Make kubecfg work for minions. 2014-07-24 18:04:55 -07:00
Daniel Smith
9e9d9b8913 Merge pull request #607 from smarterclayton/return_correct_content_type
Write the json content type for API responses
2014-07-24 15:27:31 -07:00
Daniel Smith
8881adc905 Merge pull request #606 from jonboulle/master
assorted formatting and typo fixes
2014-07-24 15:25:08 -07:00
Jonathan Boulle
c43035088b assorted formatting and typo fixes 2014-07-24 15:10:36 -07:00
Clayton Coleman
30e881c3f9 Write JSON content type for API responses 2014-07-24 17:45:02 -04:00
Daniel Smith
5ae20f9edb Merge pull request #605 from Sarsate/setup-error
SetUp now returns an error.
2014-07-24 14:13:22 -07:00
Danny Jones
1117da4a55 SetUp now returns an error.
SetUp returns an error, kubelet now skips pod if error occurs.
2014-07-24 13:53:44 -07:00
Victor Marmol
b131da1cf5 Sync pods asynchronously in the Kubelet.
This makes two main changes:
- Runs syncPod in a separate Go routine (and enforces only one of those
  runs at a time).
- Uses the pod list to determine if a container should be running or
  should be killed (used to use the output of syncPod).

Since Docker pulls are synchronized by the Docker daemon we still block
on that, but pods can now be removed and prepared for starting without
blocking on long pulls.
2014-07-24 13:47:51 -07:00
Daniel Smith
41eb15bcff Merge pull request #527 from Sarsate/rootdir-flag
Adds a flag to specify root working directory.
2014-07-24 13:12:55 -07:00
Danny Jones
bfa4642055 Adds a flag to specify root working directory.
--root_dir specifies the directory kubelet will use for it's
procedures. Currently used for volume mounts.
2014-07-24 13:04:05 -07:00
Daniel Smith
65575953c0 Merge pull request #589 from monnand/update-docker-client
update github.com/fsouza/go-dockerclient
2014-07-23 18:00:24 -07:00
Nan Deng
ea4224cbe7 update github.com/fsouza/go-dockerclient 2014-07-23 17:42:03 -07:00
Daniel Smith
b630c7bcb4 Implement watch.Interface via etcd. 2014-07-23 15:04:08 -07:00
Daniel Smith
e2e2ce44c1 Merge pull request #587 from VojtechVitek/data_race
Fix data race in kubelet fake_docker_client
2014-07-23 13:00:55 -07:00
Vojtech Vitek (V-Teq)
1f78b0fc6f Fix reslice and data races in kubelet fake_docker_client
- Fix reslice in Pull() to remove the just returned error
- Fix data races found during the integration testing
- Remove one-liner helper method for better readability
2014-07-23 20:44:42 +02:00
Daniel Smith
7a8e268c0e Merge pull request #548 from kelseyhightower/improve_kubecfg_tests
Use table testing for makePort tests
2014-07-23 09:50:21 -07:00
Kelsey Hightower
609050da39 Use table testing for makePort tests 2014-07-23 00:18:09 -07:00
Brendan Burns
c3f313784d Actually fix kubecfg. 2014-07-22 23:40:55 -07:00
Brendan Burns
fcb9201c3b Add a name to containers created by RunController so that validation works. 2014-07-22 22:58:41 -07:00
Daniel Smith
ec0f639a21 Merge pull request #551 from erictune/private_kubelet
Private kubelet
2014-07-22 18:58:43 -07:00
Daniel Smith
0ef600c8cd Merge pull request #569 from smarterclayton/fix_bad_watch_in_etcd
Kubelet etcd watch skipping indices
2014-07-22 18:23:00 -07:00
Clayton Coleman
fbd7bc375f kubecfg doesn't allow updates because of path checks
Check for 1 path segment on create/list, 2 on update/delete, and
allow any number of path segments on get (for now).

Also pretty prints the list of actual types that are supported for
create/update, which today corresponds to the list of types that
are supported period.
2014-07-22 20:25:06 -04:00
Clayton Coleman
bc0ac1e81b Kubelet etcd watch skipping indices
The next index to watch should always be current+1 if we got a
response from etcd, but otherwise it should always be current.
Moved the increment into fetchNextState which returns the next
index to watch for (or the same if an error occurs)
2014-07-22 20:24:18 -04:00
Eric Tune
ded67ead1e Make Kubelet type members private and provide New functions. 2014-07-22 14:40:59 -07:00
Dawn Chen
47ad71f92d HandleIndex when URL.Path == "/" 2014-07-22 14:12:16 -07:00
Clayton Coleman
2a2fdb4773 Merge pull request #505 from lavalamp/clientWatch
Add client watch capability
2014-07-21 22:11:02 -04:00
Brendan Burns
6c734b1c55 integrate minion health checking and caching. 2014-07-21 21:52:33 -04:00
Clayton Coleman
7767c2a2ac Switch the Kubelet to use kubelet/config
Also transfer the Kubelet from using ContainerManifest.ID to source specific
identifiers with namespacing.  Move goroutine behavior out of kubelet/ and
into integration.go and cmd/kubelet/kubelet.go for better isolation.
2014-07-21 21:27:26 -04:00
Clayton Coleman
09294b90ce Refactor Kubelet config sources for clarity
Create a new "Pod" concept which can identify pods from
many config sources.
2014-07-21 21:18:36 -04:00
Daniel Smith
91375f4c04 Split httpWatcher into watch.StreamWatcher and tools.APIEventDecoder. 2014-07-21 16:07:58 -07:00
Daniel Smith
dbd0d419df Add watch capability to our client.
Next steps: Make an etcd watcher... decide on a state field for pods...
move the scheduler to its own binary.
2014-07-21 16:07:58 -07:00
Daniel Smith
f672edd1cf Merge pull request #457 from dchen1107/minionlogs
Add support to query kubelet's logs and cadvisor's stats through apiserver by passing rawquery
2014-07-21 16:02:44 -07:00
Daniel Smith
5f13c4b048 Merge pull request #545 from kelseyhightower/heath_tests
Improve test coverage for the health package and remove mocks
2014-07-21 15:49:10 -07:00
Daniel Smith
3f33bf78c5 Merge pull request #539 from vmarmol/pause
Add a pause image for the net container.
2014-07-21 15:47:39 -07:00
Kelsey Hightower
fce90dc761 Improve test coverage for the health package and remove mocks
The current tests for the health package utilize a fake HTTP client
for testing health checks and only cover a limited set of test cases.

This patch removes the need for mocks by using the httptest package
from the standard library. After removing the fake HTTP client a bug
was found in the health.Check function; it incorrectly assumes that
a http.Response is always non-nil. Fix the issue by moving the defer
that closes the http.Response.Body after error handling.

Related tests in the registry package have be refactored to work with
the changes made to the health.Check function. All methods that implement
the health.HTTPGetInterface interface now return a http.Response with
with a noop http.Response.Body.

This patch does not introduce any changes in behavior.
2014-07-21 15:30:29 -07:00
Dawn Chen
dc921b8c65 comment changes 2014-07-21 14:46:59 -07:00
Dawn Chen
064237a5b8 Add support to query kubelet's logs and cadvisor's stats through
apiserver by passing rawquery.

minor changes

Fixed a minor rebase issues.

Using ioutil.ReadAll instead of httputil.DumpResponse
2014-07-21 11:52:32 -07:00
Victor Marmol
88317efb42 Add a pause image for the net container.
The pause image is a 240KB image that simply pauses waiting on a signal.
Use this for the net container which only needs to act as a placeholder.
Current net image is ~2.5MB. From my tests, this reduces startup time
for the net container from ~14s to ~6s.
2014-07-21 10:28:49 -07:00
Daniel Smith
7910ae8159 Merge pull request #538 from kelseyhightower/replication_controller_test
remove unnecessary expectNoError helper function
2014-07-20 23:02:56 -07:00
Daniel Smith
d11b6246a1 Merge pull request #547 from kelseyhightower/kubelet_tests
Add test cases for Docker image name parsing and cleanup
2014-07-20 20:55:33 -07:00
Kelsey Hightower
67efa0a53a Add test cases for Docker image name parsing and cleanup
The tests for Docker image name parsing are repetitive and do not
cover enough test cases.

Refactor the tests to use table testing and add additional test cases.
2014-07-20 19:22:54 -07:00
Kelsey Hightower
682efb7ca5 Remove unnecessary expectNoError helper function
This patch completes a TODO item for the kubecfg package test suite by
removing the expectNoError helper function, which does not reduce enough
typing to justify its usage.
2014-07-20 18:28:55 -07:00
Daniel Smith
b577f36492 Merge pull request #541 from kelseyhightower/httplog_test
add tests for the httplog package
2014-07-20 13:42:15 -07:00
Kelsey Hightower
713cadac52 add tests for the healthz package
Currently there are no tests for the healthz package. This patch adds
an initial set of tests and improves test coverage.
2014-07-20 12:28:02 -07:00
Kelsey Hightower
a9e0b0d1a3 use %v instead of %#v when logging failures 2014-07-20 11:58:22 -07:00
Kelsey Hightower
34c80bb976 add tests for the httplog package
Currently there are no tests for the httplog package. This patch adds
an initial set of tests and improves test coverage.
2014-07-20 11:26:13 -07:00
Clayton Coleman
28b7b53c72 Merge pull request #529 from lavalamp/recursiveApiObj
Add APIObject for generic inclusion of API objects
2014-07-20 14:25:35 -04:00
Victor Marmol
0a2b1bf644 If no tag was specified, pull "latest" explicitly.
When no tag is given to Docker pull, it downloads all tags. This could be a
significantly large number of images and in the end we only ever run
:latest.
2014-07-20 10:51:31 -07:00
Kelsey Hightower
3b9029ee94 remove unnecessary expectNoError helper function
This patch completes a TODO item for the replication_controller test
suite by removing the expectNoError helper function, which does not
reduce enough typing to justify its usage.
2014-07-20 09:13:11 -07:00
Kelsey Hightower
dc7ee7c333 normalize -etcd_servers flag across all commands
The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.

This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.

This patch should be 100% backwards compatible with no changes in behavior.
2014-07-20 07:48:47 -07:00
Daniel Smith
69c483f620 Add APIObject for generic inclusion of API objects.
Includes test and json/yaml getters and setters.
2014-07-18 22:35:08 -07:00
Clayton Coleman
d1de579070 Merge pull request #493 from lavalamp/scheduler
Add websocket dep & watch api support
2014-07-18 22:18:03 -04:00
Daniel Smith
05f01a3654 Revert "assorted formatting and typo fixes" 2014-07-18 17:16:30 -07:00
Daniel Smith
211f6b312f Merge pull request #520 from jonboulle/master
assorted formatting and typo fixes
2014-07-18 17:15:30 -07:00
Daniel Smith
eda30d4f20 Add watch mechanism to apiserver
Implemented via HTTP and websocket. A test is present but this isn't
yet wired into anything.

Eventual purpose of this is to allow a scheduler to watch for new pods.
Or allow replication controller to watch for new items it controlls.
Generally, it'll be good to turn everything possible into a push instead
of a poll.
2014-07-18 16:47:17 -07:00
Daniel Smith
60b6f5b6bd Merge pull request #524 from brendandburns/service
Make the service reconciller use the API, not a PodRegistry
2014-07-18 15:01:09 -07:00
Tim Hockin
94c9c96cb7 Merge pull request #525 from Sarsate/superset-hasall
Renames HasAll to IsSuperset; HasAll uses slice.
2014-07-18 13:59:18 -07:00
Danny Jones
136c9e112c Renames HasAll to IsSuperset; HasAll uses slice.
For the pedants. HasAll is now called IsSuperset and
the new HasAll method takes a slice instead of a set.
2014-07-18 13:58:43 -07:00
Brendan Burns
c6255afe37 Make the service reconciller use the API, not a PodRegistry 2014-07-18 13:54:33 -07:00
Daniel Smith
dd36c45bfe Merge pull request #522 from Sarsate/has-all
Added HasAll utility method for string set.
2014-07-18 13:38:11 -07:00
Danny Jones
2d9bad95f8 Added HasAll utility method for string set.
Added HasAll method which detects if one set contains all
of the memebers of another set.

A.HasAll(B) returns true if A is a superset of B.
2014-07-18 13:19:55 -07:00
Daniel Smith
d8faca9e81 Merge pull request #512 from smarterclayton/communicate_missing_pod_info
PodInfo should indicate when a pod is not found
2014-07-18 13:03:16 -07:00
Jonathan Boulle
9e63c3a633 assorted formatting and typo fixes 2014-07-18 13:02:59 -07:00
Tim Hockin
fda69bcca2 Merge pull request #452 from Sarsate/extvol-hostdir
Initial framework for external volumes.
2014-07-18 12:44:38 -07:00
Clayton Coleman
a17f0d04d4 PodInfo should indicate when a pod is not found
Client should react.  Also, dial down the chattiness of errors for
pods which do not exist and stop processing NotFound earlier in
the podinfo chain
2014-07-18 13:32:10 -04:00
Daniel Smith
e9dbc4e8ad Merge pull request #509 from xiangli-cmu/kubelet
kubelet: cleanup
2014-07-18 10:24:11 -07:00
Daniel Smith
64d4e55624 Merge pull request #515 from brendandburns/fix
Add some more logging to service updates.
2014-07-18 10:18:04 -07:00
Xiang Li
86288ca82a kubelet: cleanup 2014-07-18 10:12:59 -07:00
Clayton Coleman
0ccf1b7812 Operation server was not returning in error cases 2014-07-18 12:36:27 -04:00
Brendan Burns
fa69781b41 Add some more logging to service updates. 2014-07-18 09:29:49 -07:00
Clayton Coleman
7d0b8e0c1c Merge pull request #514 from brendandburns/fix
Insert a couple of sleeps to slow things down.
2014-07-18 12:25:12 -04:00
Brendan Burns
744072a71e Insert a couple of sleeps to slow things down. 2014-07-18 09:24:01 -07:00
Daniel Smith
2188907022 Merge pull request #486 from yugui/fix/404-if-notfound
Make RESTful operations return 404 Not Found when the target resource does not exist.
2014-07-18 09:03:17 -07:00
Clayton Coleman
1831cf1711 Remove some verbose logging 2014-07-18 10:48:21 -04:00
Tim Hockin
2f593c92fa Merge pull request #487 from yugui/fix/golint
Fixes Go lint errors and a style fix
2014-07-17 22:44:31 -07:00
Yuki Yugui Sonoda
2aa3de12d4 Make RESTful operations return 404 Not Found when the target resource
does not exist.

In the original implementation, GET, DELETE and PUT operations on
non-existent resources used to return 500 but not 404.
2014-07-18 14:16:56 +09:00
Yuki Yugui Sonoda
e0d749f952 fix typo 2014-07-18 14:13:55 +09:00
Danny Jones
bb2843498d API modified to use source; now supports EmptyDirectory
API is now modified to use a Source struct to handle multiple volumes.

Two volume types are supported now, HostDirectory and EmptyDirectory.
2014-07-17 15:25:50 -07:00
Nan Deng
564a58722c Retrieve machine spec from cAdvisor 2014-07-17 15:21:47 -07:00
Clayton Coleman
15e791fc5b Rename kubelet_server*.go to server*.go 2014-07-17 13:42:24 -04:00
Danny Jones
f1a7850454 Adds EmptyDirectory volume struct
Adds EmptyDirectory to volumes. This represents a directory
on the host, given to a pod that should not persist beyond.

The current draft does not cleanup after itself.
2014-07-17 10:09:14 -07:00
Danny Jones
f84ff740f0 Adds initial volumes package; Supports host-dirs
Adds the framework for external volume mounts.

Currently supports bare host directory mounts.

Modifies the API to support host directory mounts from Volumes
instead of VolumeMounts.
2014-07-17 10:08:45 -07:00
Yuki Yugui Sonoda
5e31ca3b27 Correct godoc messages according to review comments 2014-07-17 12:27:58 +09:00
Clayton Coleman
831ab28759 Merge pull request #483 from brendandburns/health
Add a caching minion registry.
2014-07-16 20:51:27 -04:00
Clayton Coleman
17053f5950 Merge pull request #465 from smarterclayton/simplify_config_for_reuse
Extract proxy/config common functions for reuse
2014-07-16 18:28:07 -04:00
Brendan Burns
dceafbadab Add a caching minion registry. 2014-07-16 14:52:32 -07:00
Daniel Smith
7127eefd36 Merge pull request #469 from smarterclayton/unify_container_lookup
Make container lookup in the Kubelet cleaner
2014-07-16 12:15:52 -07:00
Clayton Coleman
021cf64808 Change proxy config to reuse util/config
Splits endpoint and service configuration into their own objects.  Also makes
the endpoint and service configuration tests correct - there was a race condition
previously that meant tests were passing but not checking correct code.
2014-07-16 14:13:25 -04:00
Clayton Coleman
38ec4ff8c0 Create a configuration update utility
Extracted from proxy/config
2014-07-16 14:13:25 -04:00
Clayton Coleman
185a97b037 Make container lookup in the Kubelet cleaner
Reduce duplicate calls to list lookups for parallel go routines.
2014-07-16 14:12:13 -04:00
brendandburns
02b06a2f2f Merge pull request #482 from monnand/cadvisor-update-2
Add code in client package to use kubelet's API to retrieve data from cAdvisor
2014-07-16 10:39:31 -07:00
brendandburns
8ddc33998c Merge pull request #464 from yugui/fix/golint2
Fixes Go lint errors
2014-07-16 09:55:30 -07:00
Yuki Sonoda (Yugui)
df9da65939 Rename a function according to go convention 2014-07-16 22:05:06 +09:00
Yuki Sonoda (Yugui)
1395b0fbf0 Fixes golint errors in pkg/healthz 2014-07-16 21:59:23 +09:00
Yuki Sonoda (Yugui)
f368e4be68 Fixes golint errors in pkg/health 2014-07-16 21:59:21 +09:00
Yuki Sonoda (Yugui)
d2db5cdffc Fix a build failure of a test 2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
c1eee00a57 Correct an error message 2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
a702be8e63 Fixes new golint errors in pkg/kubelet after merge 2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
07b8be4d4c Merge branch 'master' into fix/golint2
Conflicts:
	pkg/api/types.go
	pkg/health/health_check.go
	pkg/kubelet/kubelet.go
	pkg/kubelet/kubelet_server.go
	pkg/kubelet/kubelet_server_test.go
	pkg/kubelet/kubelet_test.go
2014-07-16 21:33:21 +09:00
Kouhei Ueno
938d9e811b don't reuse random 2014-07-16 15:58:16 +09:00
Nan Deng
6878f105c0 add a client to get container info from kubelet 2014-07-16 01:08:56 -04:00
Daniel Smith
90afdb06c1 Move logger to own package; clean up apiserver to use serve mux. 2014-07-15 21:25:33 -07:00
Daniel Smith
c7d31fabbc Merge pull request #480 from monnand/cadvisor-update-1
Update kubelet package to use most recent cAdvisor's code
2014-07-15 18:25:54 -07:00
Brendan Burns
c331849e69 Add support for CPU limiting to the kubelet. 2014-07-15 16:49:34 -07:00
brendandburns
74e17022e4 Merge pull request #474 from yifan-gu/close_chan
Changed op.notify<-true to close(op.notify).
2014-07-15 16:03:53 -07:00
Daniel Smith
3d63d733e3 Merge pull request #456 from brendandburns/health
Move health checking logic out to a utility. Add a minion registry that health checks.
2014-07-15 15:39:21 -07:00
Brendan Burns
c5db874090 Addressed comments. 2014-07-15 15:16:36 -07:00
Yifan Gu
0e9e2ee7f4 Changed op.notify<-true to close(op.notify). 2014-07-15 15:08:04 -07:00
Nan Deng
30bc2af9f1 gofmt -r "GetContainerStats->GetContainerInfo" 2014-07-15 11:53:00 -07:00
Nan Deng
8c573ee727 Update to latest cAdvisor and use data structures directly from cAdvisor 2014-07-15 11:53:00 -07:00
Daniel Smith
8ef60138e5 Merge pull request #466 from smarterclayton/move_docker_function_out
Move Docker specific function out of the Kubelet
2014-07-15 10:38:28 -07:00
Daniel Smith
61917a0628 Revert "Changed op.notify<-true to close(op.notify)." 2014-07-15 10:34:05 -07:00
Daniel Smith
e659688f6d Merge pull request #458 from yifan-gu/close_chan
Changed op.notify<-true to close(op.notify).
2014-07-15 09:29:49 -07:00
Tim Hockin
3a9295add0 Merge pull request #407 from yugui/fix/golint
Fixes Go lint errors.
2014-07-15 08:44:57 -07:00
Clayton Coleman
e02ea37d9f Move Docker specific function out of the Kubelet 2014-07-15 11:34:48 -04:00
Yuki Yugui Sonoda
edac5ce0b8 Fixes golint errors in pkg/kubelet 2014-07-15 22:56:31 +09:00
Yuki Yugui Sonoda
c6b27bb87d Fixes golint errors in pkg/kubecfg 2014-07-15 22:56:17 +09:00
Yuki Yugui Sonoda
af38bf1ef7 Fixes golint errors in pkg/api 2014-07-15 22:56:09 +09:00
Clayton Coleman
07fafb1252 Merge pull request #453 from brendandburns/memory
Add support for memory limits in the kubelet.
2014-07-15 09:37:42 -04:00
Yuki Yugui Sonoda
2861955025 Corrects wording of godoc comments. 2014-07-15 22:03:08 +09:00
Yuki Yugui Sonoda
1bd7276aca Correct the style of nested conditionals 2014-07-15 20:58:03 +09:00
Yuki Yugui Sonoda
60dd1f7cc0 Eliminates tautological comments 2014-07-15 20:58:01 +09:00
Yuki Yugui Sonoda
41febcee5e Merge branch 'master' into fix/golint
Conflicts:
	pkg/master/master.go
	pkg/master/pod_cache.go
	pkg/proxy/config/file.go
	pkg/proxy/proxier.go
	pkg/proxy/roundrobbin.go
	pkg/scheduler/randomfit.go
	pkg/scheduler/randomfit_test.go
2014-07-15 20:57:47 +09:00
Kouhei Ueno
bba23e28c2 Define EtcdErrorCode as constant and reuse EtcdError instances 2014-07-15 20:48:06 +09:00
Yifan Gu
90cc060699 Changed op.notify<-true to close(op.notify). 2014-07-15 00:29:43 -07:00
Brendan Burns
62dfc74606 Move health checking logic out to a utility.
Add a minion registry that health checks.
2014-07-14 22:38:28 -07:00
Daniel Smith
314eb1ae2d Merge pull request #454 from brendandburns/template
Add a template printer to kubecfg.
2014-07-14 21:46:21 -07:00
Clayton Coleman
0839f454fe Merge pull request #433 from brendandburns/service
Update services to use the internal IP and port, now that its available.
2014-07-15 00:22:34 -04:00
Brendan Burns
f7bd5a6f0f Add a template printer to kubecfg. 2014-07-14 21:13:06 -07:00
Brendan Burns
92d83640c0 Add support for memory limits in the kubelet. 2014-07-14 20:57:26 -07:00
Brendan Burns
ae179121c6 Address comments. 2014-07-14 20:38:43 -07:00
Brendan Burns
9f99767b6c Add a /healthz handler to the kubelet server, so that the master can validate kubelet health. 2014-07-14 20:38:18 -07:00
Brendan Burns
3cc5ff15cf Update services to use the internal IP and port, now that its available. 2014-07-14 20:24:58 -07:00
Daniel Smith
dcbb309e4f Merge pull request #440 from brendandburns/link
Add Docker link style env vars to link containers to services.
2014-07-14 16:47:49 -07:00
Brendan Burns
0e798bcc3c Add link env vars. 2014-07-14 16:37:17 -07:00
Yifan Gu
3a95572290 Changed the keepChannel to buffered channel.
Since the keepChannel is used to send data, not just for synchronizaiton,
so make it a buffered channel can avoid unnecessary goroutine yields.
2014-07-14 14:22:19 -07:00
Clayton Coleman
f474879bad Merge pull request #431 from claire921/controller
pkg/controller: cleanup replication_controller.go
2014-07-13 10:13:12 -04:00
Claire Li
ba9c370014 pkg/controller: cleanup replication_controller.go 2014-07-12 14:21:51 -07:00
Kouhei Ueno
c875a6d3ba rename FirstFitScheduler to RandomFitScheduler 2014-07-12 23:23:53 +09:00
Kouhei Ueno
070b4ffe9f make firstfit.go threadsafe and fix its comments 2014-07-12 23:23:53 +09:00
Kouhei Ueno
2a03a4d502 make random.go threadsafe 2014-07-12 23:23:52 +09:00
Clayton Coleman
f84a948c9c Merge pull request #426 from claire921/cleanup
pkg/proxy/config: clean up file.Run()
2014-07-12 15:12:05 -04:00
Clayton Coleman
de51331808 Merge pull request #435 from claire921/kubelet_server
pkg/kubelet: clean up server http error handling
2014-07-12 14:35:36 -04:00
Clayton Coleman
1603e17c4a Merge pull request #436 from claire921/k
pkg/kubelet: explicitly return nil as error and nil as a result on error
2014-07-12 14:20:04 -04:00
Claire Li
10de5b12fe pkg/kubelet: explicitly return nil as error and nil as a result on error 2014-07-12 11:03:08 -07:00
Clayton Coleman
1af753a396 Merge pull request #420 from claire921/proxy
pkg/proxy: remove unnecessary go routine
2014-07-12 13:58:42 -04:00
Clayton Coleman
5ad37f0f38 Merge pull request #427 from nyaxt/lint_registry2
Add comments on registry/etcd_registry.go to address some of golint errors.
2014-07-12 13:54:13 -04:00
Clayton Coleman
3fd730c5fe Merge pull request #428 from claire921/selector
pkg/selector: set the cap for slice in SelectorFromSet
2014-07-12 13:52:36 -04:00
Claire Li
cdc44387c6 pkg/kubelet: clean up server http error handling 2014-07-12 10:44:29 -07:00
Claire Li
d0aad153ee pkg/master: correct error string for GetPodInfo 2014-07-11 23:09:43 -07:00
Claire Li
2b183943c2 pkg/selector: set the cap for slice in SelectorFromSet 2014-07-11 22:59:50 -07:00
Kouhei Ueno
12c9a73205 Add comments on registry/etcd_registry.go 2014-07-12 14:44:13 +09:00
Claire Li
78cad3fd5e pkg/proxy/config: clean up file.Run() 2014-07-11 22:41:06 -07:00
brendandburns
89655584eb Merge pull request #423 from claire921/onpudate
pkg/proxy: filtering before comparing
2014-07-11 22:33:09 -07:00
brendandburns
cde7b5841b Merge pull request #422 from claire921/use_splithostport
pkg/proxy: use net.SplitHostPort instead of strings.Split
2014-07-11 22:32:50 -07:00
brendandburns
ee4ec2af9e Merge pull request #421 from claire921/proxy_checking
pkg/proxy: remove unnecessary io.EOF checking
2014-07-11 22:32:32 -07:00
Claire Li
094b78d7de pkg/proxy: filtering before comparing 2014-07-11 22:13:29 -07:00
Claire Li
ba07dc804c pkg/proxy: use net.SplitHostPort instead of strings.Split 2014-07-11 22:08:53 -07:00
Claire Li
abcbce55ce pkg/proxy: remove unnecessary io.EOF checking 2014-07-11 21:51:24 -07:00
brendandburns
cdf75c57df Merge pull request #411 from nyaxt/lint_registry
Fixes go lint errors on pkg/registry/controller_registry.go
2014-07-11 21:41:58 -07:00
brendandburns
2ee074f9fa Merge pull request #410 from nyaxt/lint_scheduler
Add comments to pkg/scheduler/ to pass golint
2014-07-11 21:40:18 -07:00
Claire Li
4d47db8b5f pkg/proxy: remove unnecessary go routine 2014-07-11 21:34:42 -07:00
Kouhei Ueno
f932891428 removes a comment on New and a typo fix 2014-07-12 13:21:52 +09:00
Kouhei Ueno
bf137c38e7 remove comments on Make.+() 2014-07-12 13:16:16 +09:00
brendandburns
93d45c1e71 Merge pull request #414 from thockin/cleanups
Fix go idiom feedback
2014-07-11 14:47:05 -07:00
Tim Hockin
779cb84625 Merge pull request #397 from brendandburns/service
Add initial validation of Service objects
2014-07-11 14:43:47 -07:00
Brendan Burns
c9babe619e Updated to use the makeInvalidError helper function. 2014-07-11 14:24:55 -07:00
Brendan Burns
b59dcbbb80 Fix tests. 2014-07-11 14:24:54 -07:00
Brendan Burns
e9edfc754e Add initial validation of Service objects 2014-07-11 14:24:54 -07:00
Tim Hockin
1e05d1ac4e Merge pull request #394 from brendandburns/poddata
Try to grab live data if the cache has errors.
2014-07-11 11:55:54 -07:00
Tim Hockin
7d5398bda7 Fix go idiom feedback 2014-07-11 11:43:42 -07:00
Tim Hockin
f532038281 Merge pull request #345 from smarterclayton/fix_ids
Ensure pod and manifest have a UUID in apiserver
2014-07-11 11:29:00 -07:00
Brendan Burns
1b4dfe7d14 Move from bool to HealthCheckStatus 2014-07-11 10:15:31 -07:00
Brendan Burns
6312ffebcf Address some comments from thockin@ 2014-07-11 10:14:45 -07:00
Kouhei Ueno
bcbdbf6558 use New instead of Make and add comments to make golint happy 2014-07-11 22:46:22 +09:00
Yuki Yugui Sonoda
7373695e33 Fixes golint errors in pkg/proxy 2014-07-11 22:35:57 +09:00
Yuki Yugui Sonoda
88284171f2 Fixes golint errors in pkg/master 2014-07-11 22:28:27 +09:00
Yuki Yugui Sonoda
85fa11da93 Fixes golint errors in pkg/labels 2014-07-11 22:28:27 +09:00
Kouhei Ueno
e53658a3ed s/controllerId/controllerID/ to make golint happy. 2014-07-11 22:16:51 +09:00
Kouhei Ueno
e268e4bb7a Add comments to pkg/scheduler/ to pass golint 2014-07-11 22:01:12 +09:00
Kouhei Ueno
93def86a9e fix go lint errors in util 2014-07-11 21:04:34 +09:00
Burcu Dogan
1816a63d55 proxy: lock should be above the fields it protects. 2014-07-11 00:23:43 -07:00
Burcu Dogan
6a2703627b scheduler: use New rather than Make for construction helpers. 2014-07-10 22:56:14 -07:00
Burcu Dogan
e4d966744d proxy: fixing linting errors. 2014-07-10 22:36:06 -07:00
Burcu Dogan
f4d989ae92 labels: Fixing linting errors. 2014-07-10 22:08:12 -07:00
Tim Hockin
c134a16c36 fix go lint errors in util 2014-07-10 17:32:42 -07:00
Andrew Gerrand
a9fdf1f6b5 rename client.ClientInterface to client.Interface 2014-07-11 09:51:34 +10:00
Clayton Coleman
5896ac14da Ensure pod and manifest always have a UUID
* Fixes implication #2 in docs/identifiers.md
* Replication controller lets the apiserver set the pod ID
2014-07-10 18:03:48 -04:00
brendandburns
e6ee45d38e Merge pull request #395 from thockin/cleanups
IntOrString for use in JSON/YAML
2014-07-10 12:46:05 -07:00
Tim Hockin
32bcdbeb53 Merge pull request #396 from brendandburns/hostname
Add Hostname to the docker run command.
2014-07-10 12:28:30 -07:00
Brendan Burns
dc61547b95 Add Hostname to the docker run command. 2014-07-10 12:25:57 -07:00
Tim Hockin
06ac51e6e5 Merge pull request #389 from brendandburns/podip
Add PodIP to the info returned for a pod.
2014-07-10 11:18:05 -07:00
Tim Hockin
85effbbc3f IntOrString for use in JSON/YAML
Specifying an API type as IntOrString will allow JSON and YAML to accept
either ints or strings with the same name.  For example, port names or
numbers.
2014-07-10 11:09:47 -07:00
Brendan Burns
5a4621f451 Try to grab live data if the cache has errors. 2014-07-10 10:26:40 -07:00
Brendan Burns
b4811abbd6 Address Clayton's comment. 2014-07-10 09:24:49 -07:00
Yuki Sonoda (Yugui)
45b48e1668 Fixes golint errors in pkg/kubelet 2014-07-10 21:57:26 +09:00
Yuki Sonoda (Yugui)
2d888539dc Fixes golint errors in pkg/kubecfg 2014-07-10 21:27:05 +09:00
Yuki Sonoda (Yugui)
056f871bed Fixes golint errors in pkg/controller 2014-07-10 21:27:01 +09:00
Yuki Sonoda (Yugui)
820b67e41f Fixes golint errors in pkg/cloudprovider 2014-07-10 20:46:56 +09:00
Yuki Sonoda (Yugui)
6914681ed0 Fixes golint errors in pkg/api 2014-07-10 20:46:35 +09:00
brendandburns
0748ac39e8 Merge pull request #374 from yugui/feature/show-progress
Periodically shows message while waiting for completion of REST operations
2014-07-09 23:15:05 -07:00
Yuki Yugui Sonoda
602f7d8112 Use glog instead of printing to stderr. 2014-07-10 14:59:56 +09:00
Brendan Burns
d5b7c4eb6d Fix integration tests with a check for nil
Add a unit test to validate behavior
2014-07-09 22:31:17 -07:00
Brendan Burns
7b11cbd622 Add PodIP to the info returned for a pod. 2014-07-09 22:13:07 -07:00
Tim Hockin
b0b9606aea Merge pull request #365 from brendandburns/health
add http health checks.
2014-07-09 16:14:30 -07:00
brendandburns
4c309862e3 Merge pull request #371 from thockin/valid3
Accumulate errors during validation
2014-07-09 13:36:37 -07:00
Tim Hockin
95fb7bc1ae Merge pull request #379 from brendandburns/host
Add support for host up binding to the API (and kubelet)
2014-07-09 12:54:32 -07:00
Brendan Burns
41c6680943 add http health checks. 2014-07-09 12:01:43 -07:00
Dan Mace
00df67b0bf Namespace "local" volume mounts by ContainerManifest ID on disk
Local volume mounts in a pod should result in host mounted directories
which are namespaced by the ContainerManifest ID.
2014-07-09 14:45:22 -04:00
Brendan Burns
4b22f7a462 Add support for host ip binding to the API (and kubelet) 2014-07-09 11:13:38 -07:00
Tim Hockin
4ecefd1ba3 Define an errorList type and use it to accumulate 2014-07-09 07:56:27 -07:00
Tim Hockin
54790080b3 Accumulate validation errors
Rather than report the first error, accumulate all errors and report them all
at once.
2014-07-09 07:55:15 -07:00
brendandburns
242627eaf0 Merge pull request #358 from thockin/valid2
Add validation of VolumeMounts
2014-07-08 21:58:32 -07:00
brendandburns
2ea8a68001 Merge pull request #375 from thockin/valid/dns_lengths
Simplify DNS validation checks
2014-07-08 21:48:46 -07:00
Dawn Chen
a0f94757a4 Instantiate cAdvisor client for kubelet to query both machine and container
information.
2014-07-08 16:37:43 -07:00
Tim Hockin
2eb2784725 Validation of HostPorts and Manifest IDs
Check that HostPorts are unique across the whole host and that Manifest IDs
are unique.
2014-07-08 15:22:47 -07:00
Tim Hockin
ad88fa48a5 Add validation of Ports
Also do caseless compares for "enum" strings.
2014-07-08 15:22:44 -07:00
Tim Hockin
dd6b209617 Add validation of VolumeMounts 2014-07-08 15:21:27 -07:00
Tim Hockin
8d6e832b8e Simplify DNS validation checks
Move DNS length checks to util/validation.go.  Make the max subdomain be 253,
which is what the RFC actually says.
2014-07-08 15:14:17 -07:00
brendandburns
40c71e8292 Merge pull request #372 from yugui/feature/golint
Fixes Go lint errors.
2014-07-08 12:55:41 -07:00
Tim Hockin
92cf6662ed Merge pull request #351 from discordianfish/use-api-for-pull
Use api for pulling images instead of shelling out
2014-07-08 09:08:12 -07:00
Johannes 'fish' Ziemke
3fa6c9671d Use docker client lib instead of binary for pulls 2014-07-08 12:21:39 +02:00
Yuki Yugui Sonoda
325c5cd47e Fixes golint errors in pkg/client 2014-07-08 16:15:41 +09:00
Yuki Yugui Sonoda
5cfbed4453 Fixes golint errors in pkg/apiserver 2014-07-08 16:10:11 +09:00
Yuki Yugui Sonoda
780c441d19 Fixes golint errors in pkg/api 2014-07-08 16:08:58 +09:00
Brendan Burns
e3838e1153 Make poll period and timeout configurable.
Make poll period short for integration testing.
2014-07-07 10:13:27 -07:00
Brendan Burns
2f5eeee1f6 Make sync false by default. Works around timeout/retry issues. 2014-07-03 21:23:21 -07:00
Nan Deng
b351578ddd fix data race in config.go. This is a hard one. 2014-07-02 23:23:14 -07:00
Nan Deng
aa808a6505 fix data race introduced by 1798e0f 2014-07-02 23:23:14 -07:00
Nan Deng
e13e31866d fix data races in controller 2014-07-02 23:22:09 -07:00
brendandburns
bf44347340 Merge pull request #350 from brendandburns/async
Fix an error in the async-path that led to dropping pods.
2014-07-02 23:15:35 -07:00
Brendan Burns
0655370ea2 Fix an error in the async-path that led to dropping pods. 2014-07-02 23:05:30 -07:00
brendandburns
d386c02dfd Merge pull request #328 from monnand/root-container
Get root container stats from cAdvisor
2014-07-02 22:57:28 -07:00
Nan Deng
42fd4383a1 Get machine stats from cAdvisor 2014-07-02 16:59:50 -07:00
brendandburns
1fc71893cf Merge pull request #344 from lavalamp/version
A package to get version information from
2014-07-02 16:41:18 -07:00
brendandburns
0b9f36b761 Merge pull request #307 from lavalamp/atomic
All PUTs now atomic
2014-07-02 16:31:35 -07:00
Tim Hockin
3f057baa0a Use structured errors during validation 2014-07-02 16:17:47 -07:00
Daniel Smith
3b9735d787 Test atomic PUTs, and make them work.
Improve apiserver/logger.go's interface (it's pretty cool now).

Improve apiserver's error reporting to clients.

Improve client's handling of errors from apiserver.

Make failed PUTs return 409 (conflict)-- http status codes are amazingly
well defined for what we're doing!
2014-07-02 15:42:05 -07:00
Daniel Smith
a6144f656c Move etcd helpers to tools package so they can depend on api package. Add ResourceVersion, hook it up to etcd index to get atomic PUTs. 2014-07-02 15:42:05 -07:00
Daniel Smith
60f05c8d8d update version package when building. 2014-07-02 15:32:30 -07:00
Daniel Smith
68bef4ac0c add version package 2014-07-02 15:26:13 -07:00
Tim Hockin
3cd56e85d6 Simplify supported manifest versions 2014-07-02 14:57:24 -07:00
Tim Hockin
d3da6b168e nit: s/Id/ID/ for go style 2014-07-02 11:21:29 -07:00
Tim Hockin
48074d4ae7 Fix wrong json name for Key field 2014-07-02 10:30:27 -07:00
Tim Hockin
839f2aed7b Add validation for Container.Env
This includes backwards compat with the older "key" field.
2014-07-01 22:16:46 -07:00
brendandburns
a8a0039a39 Merge pull request #335 from vmarmol/add-kubelet-new
Add a New() for Kubelet.
2014-07-01 22:16:24 -07:00
brendandburns
8d2ee4b7ae Merge pull request #330 from thockin/valid7
Add basic validation of Containers
2014-07-01 22:14:40 -07:00
Tim Hockin
fe67ef79b9 Add basic validation of Containers 2014-07-01 22:05:42 -07:00
Victor Marmol
e29ff512fc Add a New() for Kubelet.
This will make it easier to add new fields that need to be initialized. Also refactors tests to ease making fake Kubelets.
2014-07-01 19:23:26 -07:00
Daniel Smith
969586a214 Add logging, fix crash
Crash was in kublet_server when fake docker client gives it nil pointer.
2014-07-01 17:38:07 -07:00
Daniel Smith
bf3b34c2e9 Allow master's pod info getter to be faked. Wire up in integration tests in futile attempt to make travis pass. 2014-07-01 17:08:32 -07:00
Daniel Smith
587fb75a7a rearrange RunKubelet's parameters so that address and port are next to each other 2014-07-01 16:47:37 -07:00
Daniel Smith
11d6451d2a Change kublet to serve podInfo instead of containerInfo. Plumb through system. 2014-07-01 16:41:10 -07:00
Daniel Smith
049bc6b6d4 Fix interface{} in api/types.go; plumb through system. 2014-07-01 16:41:09 -07:00
Tim Hockin
045f1bda0c Add validation of Volumes 2014-07-01 16:30:39 -07:00
brendandburns
664c9faa43 Merge pull request #327 from lavalamp/etcdChanFix
Improvements to integration test & logging
2014-07-01 15:40:48 -07:00
brendandburns
ec01289aeb Merge pull request #326 from thockin/valid2
First piece ofn actual validation
2014-07-01 15:40:13 -07:00
brendandburns
67eae1f645 Merge pull request #331 from dchen1107/cleanup
Fixed the data race found in kubelet_test.go
2014-07-01 15:30:36 -07:00
Dawn Chen
17bad028ce Fixed the data race found in kubelet_test.go 2014-07-01 15:15:40 -07:00
Daniel Smith
b820e026f6 Improve logging. 2014-07-01 14:02:14 -07:00
Daniel Smith
50bbf39925 improvements to integration test organization 2014-07-01 14:02:14 -07:00
Tim Hockin
8bc49a02c3 Document api types wrt validation
Part 3 in a series of changes towards data validation.
2014-07-01 13:58:44 -07:00
Tim Hockin
a92e1aa1bf First piece of validation
I'm adding pieces incrementally to make sure we get full testing of each
piece.

Make syncLoop() private
2014-07-01 13:48:57 -07:00
Daniel Smith
229b8fca2a Don't double-close the channel when etcd returns an error. 2014-07-01 12:49:57 -07:00
Daniel Smith
a10ac51224 Merge pull request #320 from brendandburns/async
Make each pod synchronization in the kubelet an independent thread.
2014-07-01 12:42:33 -07:00
Brendan Burns
1798e0fea3 Make each pod synchronization async. 2014-07-01 12:20:13 -07:00
Daniel Smith
212a393404 Merge pull request #293 from brendandburns/minion
Activate cloud minion registry.
2014-07-01 12:11:22 -07:00
Daniel Smith
9da5fed7f4 Merge pull request #277 from brendandburns/sync
Add sync behavior to the pod registry.  Expand tests.
2014-07-01 11:43:40 -07:00
Daniel Smith
99f85e3897 Merge pull request #309 from monnand/race-controller
fix data races in controller
2014-07-01 11:34:05 -07:00
Brendan Burns
d5516e4cdc Activate gce minion list. 2014-07-01 11:33:58 -07:00
Brendan Burns
13d7a5959a Add sync behavior to the pod registry. Expand tests. 2014-07-01 11:31:21 -07:00
Nan Deng
44935c2f94 comment 2014-07-01 11:21:17 -07:00
Nan Deng
7f9d66525a remove lock for broadcast 2014-07-01 11:13:05 -07:00
Brendan Burns
7999983311 Added async behavior. 2014-07-01 11:11:10 -07:00
Clayton Coleman
15c96508a9 Use ID instead of Id (go style) everywhere
Fixes #278
2014-07-01 13:16:47 -04:00
Nan Deng
f68446fed9 comment 2014-06-30 20:51:38 -07:00
brendandburns
65a62278b1 Merge pull request #286 from lavalamp/exampleEtcd
Separate scheduler from registry
2014-06-30 20:17:07 -07:00
Nan Deng
101806cb5e do not recreate 2014-06-30 18:27:41 -07:00
Nan Deng
7b432eac5c gofmt -r "condChannelsReady->condWatchCompleted" 2014-06-30 18:05:01 -07:00
Daniel Smith
53618f5db7 Merge pull request #311 from thockin/valid3
Add validation primitives to util
2014-06-30 17:13:24 -07:00
Dawn Chen
85152fc137 Add a FileServer for master's logs 2014-06-30 16:33:54 -07:00
Nan Deng
905c6dcb10 gofmt -r "WaitToWatch->WaitForWatchCompletion" 2014-06-30 16:09:15 -07:00
Nan Deng
f13f1a5da6 use sync.Cond 2014-06-30 16:07:46 -07:00
Nan Deng
014165ded6 style 2014-06-30 15:39:03 -07:00
Nan Deng
fa1fbe88c1 use wait group 2014-06-30 15:32:55 -07:00
Tim Hockin
b3dd86a21e Add validation primitives to util
Part 2 in a series of changes towards data validation.
2014-06-30 15:17:53 -07:00
Nan Deng
62055090b4 fix data races in controller 2014-06-30 14:48:57 -07:00
Tim Hockin
74e1b03a80 Break the dep from util -> api
Part 1 in a series of changes towards data validation.
2014-06-30 14:28:41 -07:00
Nan Deng
f99a50ba69 use mutex instead of rwmutex 2014-06-30 11:13:42 -07:00
Nan Deng
3083a33e5f pkg/registry now passed race detector. 2014-06-30 11:04:57 -07:00
Daniel Smith
011ce9d871 Add crash handler bypass for testing. 2014-06-29 12:35:43 -07:00
Daniel Smith
0760e9bc2c Fix up usage and tests, split into multiple files.
Doing this in multiple commits in an attempt to preserve the file movement history.
2014-06-29 12:35:43 -07:00
Daniel Smith
21e63cf75a Move scheduler to own package. 2014-06-29 12:30:49 -07:00
Tim Hockin
6c79937a42 Reduce logging noise
Don't use %#v for errors.
Do use %+v when more detail than %v is needed.
Fix typos Kublet -> Kubelet.
2014-06-28 22:16:26 -07:00
Tim Hockin
b65d685a39 Add a NewStringSet() function
Also beef up tests to cover len(ss).
2014-06-28 19:36:44 -07:00
Tim Hockin
73a494c928 Merge pull request #283 from lavalamp/stringSet
Move stringSet to util.StringSet
2014-06-28 13:15:47 -07:00
Daniel Smith
3d1e8a92d3 Move stringSet to util.StringSet 2014-06-28 11:46:51 -07:00
Justin Huff
28afe91855 Allow empty lists when polling manifests via http 2014-06-27 23:46:02 -07:00
Daniel Smith
134f44e3fa Merge pull request #276 from brendandburns/minion
Initial integration of the cloud based minion registry.
2014-06-27 22:56:47 -07:00
Brendan Burns
431fcac8b0 Initial integration of the cloud based minion registry. 2014-06-27 22:49:27 -07:00
Daniel Smith
b21facafb1 Merge pull request #273 from brendandburns/kubelet
Make the docker endpoint a flag.
2014-06-27 17:09:25 -07:00
Brendan Burns
f8060c5b3d Make the docker endpoint a flag. 2014-06-27 17:01:12 -07:00
Daniel Smith
54ad4582e2 Fix unstable map ordering issue in test 2014-06-27 15:40:23 -07:00
Daniel Smith
9a0f89170e Fix comments. Add timeout to integration test; don't make travis run for 15 minutes any more. 2014-06-27 15:40:23 -07:00
Daniel Smith
999ea50c2a Cleanup to use AtomicUpdate. 2014-06-27 15:14:57 -07:00
Daniel Smith
529870d121 Generic atomic update code 2014-06-27 15:14:57 -07:00
Justin Huff
8c5562ef77 DockerContaineId->DockerId 2014-06-27 14:03:50 -07:00
Justin Huff
81663fdb80 Introduce a type for docker container ids 2014-06-27 14:03:50 -07:00
Justin Huff
fe0066d2e4 Cleaning up container ID handling inside kubelet 2014-06-27 14:03:50 -07:00
Brendan Burns
b25f950362 Use etcd compare and swap to update the list of pods, to remove a race. 2014-06-27 11:09:36 -07:00
Brendan Burns
a391b2ff03 Implement sync behavior for controllers. 2014-06-26 19:44:28 -07:00
Daniel Smith
ab308ad13a Merge pull request #264 from brendandburns/padding
Set id width at 8 and pad with zeros.
2014-06-26 19:37:17 -07:00
Brendan Burns
78d9538358 Set id width at 8 and pad with zeros. 2014-06-26 19:24:12 -07:00
Daniel Smith
ffc2f82bed Merge pull request #238 from brendandburns/update
Initial add of the update demo for Google I/O
2014-06-26 19:21:38 -07:00
brendandburns
9e90c14369 Merge pull request #259 from lavalamp/api_long_op
Implement client polling.
2014-06-26 19:06:18 -07:00
Justin Huff
6fdebd6560 Watch and Get on the same Etcd key.
Kubelet was killing existing pods when creating a new one because new
files were being set as /registry/hosts/<machine>/pods/<id> and
/registry/hosts/<machine>/kubelet.
2014-06-26 18:59:49 -07:00
brendandburns
ccc04336af Merge pull request #258 from lavalamp/misc_cleanup
Use net.JoinHostPort
2014-06-26 18:56:52 -07:00
Brendan Burns
23c971605e Initial add of cloud-demo 2014-06-26 18:52:08 -07:00
Daniel Smith
be39c3d646 Fix crash in test 2014-06-26 16:56:02 -07:00
Meir Fischer
a2513eb1d6 Test rejection of bad JSON. 2014-06-26 19:27:56 -04:00
Daniel Smith
001b07b292 Use net.JoinHostPort 2014-06-26 16:20:37 -07:00
Daniel Smith
fd5e3b0b04 Implement client polling. 2014-06-26 16:10:38 -07:00
Daniel Smith
de06869d30 Merge pull request #244 from brendandburns/minion
Add a minion registry that is backed by a cloud provider.
2014-06-26 13:13:59 -07:00
Brendan Burns
14838df51e Update the proxy server. 2014-06-26 13:09:23 -07:00
Brendan Burns
93019b8563 Add a minion registry that is backed by a cloud provider. 2014-06-26 13:00:07 -07:00
brendandburns
46a615864c Merge pull request #249 from lavalamp/api_long_op
Give api server operation tracking ability
2014-06-26 12:10:40 -07:00
Daniel Smith
afd13edd6a Address comments; also, demonstrate one more property in test. 2014-06-26 11:36:15 -07:00
Brendan Burns
9bd4e441b3 better error handling. 2014-06-26 10:44:57 -07:00
Daniel Smith
c9246dc130 Implement required sync changes everywhere.
Make requests sync by default, so that usage of them doesn't have to
change.
2014-06-26 10:33:21 -07:00
Daniel Smith
59a6489e84 Add tracked operations to apiserver 2014-06-26 10:33:21 -07:00
Daniel Smith
c97c514742 Rename cloudcfg to kubecfg 2014-06-25 18:01:37 -07:00
Tim Hockin
3f0e7e790b Less verbose logging for "normal" things.
Don't log things that we expect to happen every sync loop, unless the user
asks for --v > 0.
2014-06-24 22:05:25 -07:00
Tim Hockin
a570b81220 Default --logtostderr=true
This retains compatibility with existing logging to stderr, until we can agree
on log dirs for each cmd.
2014-06-24 21:29:53 -07:00
Tim Hockin
9f9e75f508 Switch to glog for logging, bridge logging to glog.
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
  s/log.Printf/glog.Infof/
  s/log.Print/glog.Info/
  s/log.Fatalf/glog.Fatalf/
  s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*

Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog.  Pass glog-wrapped
Loggers to etcd for logging.

Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.

The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Justin Huff
ddf0fd18f0 Remove extractMultipleFromReader and extractSingleFromReader. Unused now after improvements in #212 and #213 2014-06-24 18:59:57 -07:00
Daniel Smith
c3da356cd6 Merge pull request #237 from brendandburns/tests
Added some tests
2014-06-24 18:04:32 -07:00
brendandburns
8b44f34e0f Merge pull request #213 from lavalamp/fix_manifest
Better fix of #212
2014-06-24 17:42:22 -07:00
Brendan Burns
60ce1296d4 Added some tests 2014-06-24 17:41:30 -07:00
Daniel Smith
f7968ce00b Make integration test the manifest url feature. Make kubelet's docker pull command testable. 2014-06-24 16:57:35 -07:00
Daniel Smith
cfa1ef3c4c Merge pull request #229 from brendandburns/fix
Several small fixes.
2014-06-24 15:35:50 -07:00
brendandburns
19fa068de4 Merge pull request #232 from lavalamp/master
Make minion printing prettier; standardize on MinionList.Items
2014-06-24 15:34:06 -07:00
Brendan Burns
84e5c37f74 Several small fixes. 2014-06-24 15:30:14 -07:00
Daniel Smith
2cc038298b Make minion printing prettier; standardize on MinionList.Items like the other list types. 2014-06-24 15:29:17 -07:00
Daniel Smith
fd66a8b59b Readability fixes & address review comments. 2014-06-24 15:16:21 -07:00
Daniel Smith
6900431b13 Add kubelet testing to integration test. Test that kubelet makes the requested containers. Check that the url manifest feature works. 2014-06-24 15:14:40 -07:00
Daniel Smith
9d8a16f180 Make manifest url reader accept both single and multiple manifests. 2014-06-24 15:13:18 -07:00
Tim Hockin
c705593b62 Logging cleanup in Kubelet
Make it easier to see the signal when looking at kubelet logs.  Make the
signal more consistent and legible.
2014-06-24 13:50:08 -07:00
Daniel Smith
cf041acc29 Merge pull request #227 from thockin/cleanups
Rename Kubelet.Client -> EtcdClient
2014-06-24 13:26:59 -07:00
Tim Hockin
7622bb871b Rename Kubelet.Client -> EtcdClient
All the other *Client members are so named.  Makes easier reading.
2014-06-24 13:17:38 -07:00
Daniel Smith
dec3e09aa7 Merge pull request #226 from gottwald/TestYAMLPrinter
Add test for YAMLPrinter
2014-06-24 13:16:51 -07:00
Ingo Gottwald
79a9e0d849 Add test for YAMLPrinter 2014-06-24 21:44:39 +02:00
Justin Huff
4f714dd0fe Ignore files that start with '.' when processing a config dir. 2014-06-24 12:02:49 -07:00
Brendan Burns
8b50e45dcc Update the proxy server. 2014-06-24 11:25:45 -07:00
Brendan Burns
5756189f0d Added a proxy server to cloudcfg 2014-06-24 11:15:08 -07:00
brendandburns
b94ceffbed Merge pull request #205 from lavalamp/api2
Small client refactor; interpret 202 responses
2014-06-24 11:12:10 -07:00
Daniel Smith
175e998258 Fix nil/[]byte{} consistency, and other review comments. 2014-06-24 10:07:51 -07:00
Tim Hockin
8c2a8b65c3 Escape manifest IDs when hunting the network container.
This makes it possible to have manifests with _ in the ID.  I'm not sure we
want to allow this, but we do for now.  I hope to follow this up with a deeper
change to make this a bit more robust.
2014-06-24 09:52:43 -07:00
Daniel Smith
dccfe8046a Remove dead code 2014-06-24 09:38:22 -07:00
Daniel Smith
72809f8e67 catch 202 early 2014-06-24 09:38:22 -07:00
Daniel Smith
5ce54bb77b Use new method. 2014-06-24 09:38:22 -07:00
Daniel Smith
61a494d303 First step of combination. 2014-06-24 09:38:22 -07:00
brendandburns
e811e24b23 Merge pull request #216 from thockin/logging
Minor: log cleanups
2014-06-23 22:38:06 -07:00
Tim Hockin
60ad86c972 Minor: Log cleanups
Clean up log messages to be more obvious. Fix a typo (exit -> exist).
2014-06-23 22:11:18 -07:00
Tim Hockin
7218a4d165 Clarify config file code to be clear that it handles directories. ...
… Add a check for IsRegular() before reading a config path.  Add a comment
about exec.Command("hostname", "-f").
2014-06-23 21:14:15 -07:00
Daniel Smith
e96cfaf115 Merge pull request #214 from thockin/logging
Remove noisy non-error lines from logs
2014-06-23 21:02:35 -07:00
brendandburns
974d3f3999 Merge pull request #180 from lavalamp/master
Make minions first class citizens
2014-06-23 19:52:00 -07:00
Tim Hockin
228156dbc6 Remove noisy non-error lines from logs 2014-06-23 17:58:21 -07:00
Daniel Smith
77af24e7dc manifest_url needs to take a single ContainerManifest. 2014-06-23 15:06:28 -07:00
Daniel Smith
f62440a65e Fix call to removed function EncodeIndent 2014-06-23 13:35:14 -07:00
Daniel Smith
c12a3773f5 Add minion types, address other comments 2014-06-23 13:27:52 -07:00
Daniel Smith
79ee5aa250 Implement minion registry. Minions now a first-class object. 2014-06-23 13:27:52 -07:00
Daniel Smith
d460c01ade Add minion registry 2014-06-23 13:27:52 -07:00
Daniel Smith
6ccd9b2361 Move to new file. Build and tests pass. 2014-06-23 13:24:27 -07:00
Daniel Smith
7667c7de42 Add test 2014-06-23 13:24:27 -07:00
Daniel Smith
b1d8a41049 Add new api usage mechanism. 2014-06-23 13:24:26 -07:00
brendandburns
49c25a4e28 Merge pull request #196 from lavalamp/marshal
Make api able to marshal its types correctly
2014-06-23 13:22:52 -07:00
Daniel Smith
b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Daniel Smith
ee75bb8dbe Address comments; Also internally start using JSONBase instead of reflect.Value of JSONBase. 2014-06-23 09:54:17 -07:00
Daniel Smith
41534c1cc5 Encode/decode working everywhere now. 2014-06-23 09:54:17 -07:00
Daniel Smith
14361e336a Make apiserver work with new encode/decode 2014-06-23 09:54:17 -07:00
Daniel Smith
d7b4915111 Don't make people have to worry about the Kind field. 2014-06-23 09:54:17 -07:00
Daniel Smith
2bcb44b6bd make Registry use Encode 2014-06-23 09:54:17 -07:00
Daniel Smith
fb991fb84e Change type to []byte 2014-06-23 09:54:17 -07:00
Daniel Smith
a9d9bb9d47 Add intelligent type marshalling/unmarshalling 2014-06-23 09:54:17 -07:00
brendandburns
86f837d47e Merge pull request #192 from lavalamp/misc_cleanup
Logging + Misc cleanup
2014-06-23 09:42:39 -07:00
Daniel Smith
a718f6fdb8 minor fixes to scheduler_test 2014-06-22 11:17:23 -07:00
Daniel Smith
d57531d924 Cleanup: no need for stacked timing loops 2014-06-22 11:17:23 -07:00
Daniel Smith
5de9071b5c Add improved logging: record latency & call stack on error 2014-06-22 11:17:23 -07:00
Daniel Smith
14e18a5308 Fix missing <- 2014-06-22 11:15:10 -07:00
Justin Huff
1441a84673 Cleanup handling of config channels in RunSyncLoop by passing a map
instead of a bunch of vars.
2014-06-22 09:32:49 -07:00
Justin Huff
460821e370 Add a k8s prefix to docker containers that we manage 2014-06-21 13:30:10 -07:00
Ingo Gottwald
8bc07747fe Add unit test for cloudcfg.LoadAuthInfo 2014-06-21 15:03:02 +02:00
Brendan Burns
b84cc9c895 Deflake a test w/ go1.3 random maps. 2014-06-20 10:41:15 -07:00
Daniel Smith
b3fbc47bd4 Make selector parsing deterministic 2014-06-20 10:03:56 -07:00
Daniel Smith
671a7f1c27 File name should have changed during query->selector rename. 2014-06-20 09:58:09 -07:00
Justin Huff
ecf7d11477 Make config dir handling deterministic 2014-06-20 09:31:52 -07:00
Justin Huff
d5bf045a6c Make sure that config files are closed properly 2014-06-20 09:31:52 -07:00
Justin Huff
d204f76484 Add config dir support to kubelet 2014-06-20 09:31:52 -07:00
Justin Huff
f49b9c2429 Fix merge conflicts 2014-06-20 09:31:18 -07:00
Daniel Smith
8a13e5300d Merge pull request #182 from brendandburns/net
Update IP assignment to be per-pod, not per-container
2014-06-20 09:06:34 -07:00
Brendan Burns
b46d8d2337 Merge branch 'net' of https://github.com/brendandburns/kubernetes-1 into net 2014-06-20 09:01:17 -07:00
brendandburns
3a9a3b1114 Merge pull request #174 from monnand/kubelet-cadvisor
Letting kubelet retrieve container stats from cAdvisor
2014-06-20 08:36:22 -07:00
Johan Euphrosine
fe589a3f64 pkg/client: refactor tests 2014-06-19 23:12:27 -07:00
brendandburns
0c8d556afb Fix IP affinity to be per-pod, not per-container. 2014-06-19 23:09:21 -07:00
brendandburns
168ec29f54 Merge pull request #178 from vmarmol/add-external-mounts
Adding support for external mounts
2014-06-19 21:28:40 -07:00
Nan Deng
a10a64856d use json.Marshal directly 2014-06-20 04:21:57 +00:00
Victor Marmol
e794f539d8 Adding support for external mounts 2014-06-19 21:14:19 -07:00
Nan Deng
7c7dfe3eeb style 2014-06-20 04:06:28 +00:00
Brendan Burns
ae9fce1358 Fix the container manifest to so that Command is an array, not a string. 2014-06-19 20:21:20 -07:00
Daniel Smith
466be48c74 Merge pull request #166 from brendandburns/sync
Part #1 of synchronous requests: Add channels and a mechanism for waiting
2014-06-19 16:40:25 -07:00
Brendan Burns
2640de5c02 Part #1 of synchronous requests: Add channels and a mechanism for waiting on them 2014-06-19 16:13:13 -07:00
Nan Deng
865ba190ff write headers after error checking 2014-06-19 22:28:48 +00:00
Nan Deng
979f832a0c write StatusOK to the header after json.Encode() 2014-06-19 22:12:32 +00:00
Nan Deng
d001110df1 gofmt -s -w -l 2014-06-19 20:59:20 +00:00
brendandburns
e031c193a3 Merge pull request #164 from lavalamp/master
Standardize terminology on "selector"
2014-06-19 13:55:27 -07:00
Nan Deng
2cc3a88411 unit test for GetContainerStats() 2014-06-19 20:44:53 +00:00
Nan Deng
1b9cb5d501 more unit test 2014-06-19 20:44:53 +00:00
Nan Deng
b01a12fe34 more unit test for GetContainerStats() 2014-06-19 20:44:53 +00:00
Nan Deng
3080262f12 unit test for cadvisor 2014-06-19 20:44:53 +00:00
Nan Deng
c7eaa2095c GOPATH... 2014-06-19 20:44:52 +00:00
Nan Deng
037cfd257f add /containerStats 2014-06-19 20:44:52 +00:00
Nan Deng
2402e939c2 Add cAdvisor into third_party 2014-06-19 20:44:52 +00:00
Daniel Smith
936ce13862 Merge pull request #171 from brendandburns/poll
Wire in the pod cache.  Just used for List for now.
2014-06-19 13:37:53 -07:00
Daniel Smith
5a1a793784 fix after rebase 2014-06-19 13:33:36 -07:00
Daniel Smith
cfce408266 Rename ReplicasInSet to ReplicaSelector 2014-06-19 13:31:42 -07:00
Daniel Smith
bc02b3c21a Rename [label] query to selector 2014-06-19 13:31:42 -07:00
Daniel Smith
c4649d539b Separate labels and selector in services for clarity 2014-06-19 13:30:04 -07:00
Brendan Burns
302ec0f37b Wire in the pod cache. Just used for List for now. 2014-06-18 22:26:35 -07:00
Daniel Smith
4c7cc33066 Merge pull request #165 from brendandburns/replicas
On delete, also attempt to update controller state
2014-06-18 22:10:13 -07:00
Brendan Burns
84b2a9e9f3 On delete, also attempt to update controller state, in case we
missed a previous update.  Add a test to validate that this works
2014-06-18 21:32:55 -07:00
Brendan Burns
4f549aae54 Add a PodCache that is responsible for caching pod information.
Not wired in yet.
2014-06-18 20:04:52 -07:00
Brendan Burns
b3f0e1724d Add IP to hostname in cloudcfg printing. 2014-06-18 15:25:47 -07:00
Brendan Burns
420b2fdd57 Add support for populating host ip address. 2014-06-18 14:57:50 -07:00
Brendan Burns
57869958bc Add IP look up if the Cloud Provider is not null
Add Instance info to the Cloud Provider interface
2014-06-18 14:27:43 -07:00
Brendan Burns
31427d2d6f Add a fake cloud impl.
Update the service registry with unit tests.
2014-06-18 14:22:41 -07:00
Daniel Smith
a253209a2c Add test for watch goroutine handling, fix other review comments 2014-06-18 13:10:39 -07:00
Daniel Smith
1b94f7b244 Fix race 2014-06-18 13:10:39 -07:00
Daniel Smith
7e464aa55c Test controller's synchronize method. Requires fake etcd client to be relocated. 2014-06-18 13:10:39 -07:00
Daniel Smith
b6a260940c Fix fake handler so it can be used for more than one call. 2014-06-18 13:10:39 -07:00
Daniel Smith
3737b4e4e2 Fix bad lock handling. 2014-06-18 13:10:39 -07:00
Daniel Smith
e74ac01a62 Move run logic into package 2014-06-18 13:10:39 -07:00
Daniel Smith
65d6280936 Move etcd helper to util so it can be used elsewhere, too 2014-06-18 13:10:39 -07:00
Daniel Smith
a24116c7bd Move controller to it's own package, it's not part of the registry. 2014-06-18 13:10:39 -07:00
Brendan Burns
77dd0afc26 Fix a bug in pod listing introduced in a recent refactor.
Add a test to catch a regression in the future.
2014-06-18 10:39:14 -07:00
Brendan Burns
5f66d33880 Add load balancing support to services. 2014-06-17 21:28:20 -07:00
brendandburns
1b1662d22d Merge pull request #145 from lavalamp/test_fix
Ensure that MockPodRegistry verifies the query it's passed.
2014-06-17 21:00:59 -07:00
Daniel Smith
246db91cb5 Merge pull request #135 from brendandburns/lb
Add load balancing support to services.
2014-06-17 18:40:42 -07:00
Daniel Smith
372e7b7727 Ensure that MockPodRegistry verifies the query it's passed. 2014-06-17 18:33:51 -07:00
brendandburns
1fd954b1d3 Merge pull request #138 from lavalamp/master
Normalize etcd_registry's storage & error handling
2014-06-17 17:34:42 -07:00
brendandburns
a3036d2c81 Merge pull request #143 from jjhuff/fix_scheduler_panic
FirstFitScheduler was triggering a panic by passing nil as the query to EtcdRegistry.ListPods
2014-06-17 17:33:17 -07:00
Justin Huff
1bef7fdd04 FirstFitScheduler was triggering a panic by passing nil as the query to
EtcdRegistry.ListPods. I think this was just missed during the recent
label refactor.
2014-06-17 15:48:37 -07:00
Justin Huff
3072ccf088 When the apiserver panics, log a stacktrace. 2014-06-17 14:59:37 -07:00
Daniel Smith
500ef4c46c Extract yet more redundancy 2014-06-17 13:53:47 -07:00
Daniel Smith
77556a5eb0 Extract more redundancy 2014-06-17 13:53:47 -07:00
Daniel Smith
25ab3b695e Move duplicated logic into single function. 2014-06-17 13:53:47 -07:00
Brendan Burns
2759b2367f Add load balancing support to services. 2014-06-17 12:37:39 -07:00
Daniel Smith
e10e5b99d5 Fix typo 2014-06-16 22:21:43 -07:00
Daniel Smith
c4e575d4ac switch to different types for different parts of the label query 2014-06-16 22:05:12 -07:00
Daniel Smith
3b980bd9dc Make deterministic 2014-06-16 22:05:12 -07:00
Daniel Smith
c534d070e5 Rename LabelSet labels.Set 2014-06-16 22:05:12 -07:00
Daniel Smith
5c3e4fab58 add another test 2014-06-16 22:05:12 -07:00
Daniel Smith
7d05ba4dc4 Implement new label system 2014-06-16 22:05:12 -07:00
Daniel Smith
ad2ec27e91 Implement label queries for controller registry 2014-06-16 22:05:12 -07:00
Daniel Smith
154ec0db1e apiserver builds again 2014-06-16 22:05:12 -07:00
Daniel Smith
1c6342a794 Move labels to own package 2014-06-16 22:05:11 -07:00
Daniel Smith
3ab2f8a3a2 First piece of improving labels 2014-06-16 22:05:11 -07:00
Daniel Smith
6d3af1f8ff Make success status public so it will actually get sent to clients 2014-06-16 22:05:11 -07:00
Brendan Burns
b8eaa8634e Remove dot syntax. 2014-06-16 11:16:18 -07:00
Daniel Smith
ea5cbd44bb Refactor apiserver command; move logic to a package for reuse and eventual testing 2014-06-15 23:30:58 -07:00
Daniel Smith
b3ab658c71 consistent filenames 2014-06-15 23:30:58 -07:00
Brendan Burns
32071289e6 Add some documentation 2014-06-15 22:42:19 -07:00
Brendan Burns
76148dc85f gofmt 2014-06-15 21:57:29 -07:00
Brendan Burns
2e68d087a9 Add udp support. 2014-06-15 21:19:35 -07:00
Daniel Smith
229ccb0fa3 Merge pull request #110 from jbeda/test-fix
Stable comparison of stuff that transits through map.
2014-06-14 16:05:30 -07:00
Daniel Smith
c7a307ceb2 Merge pull request #105 from lavalamp/improve_e2e
Add a new e2e test; fix some bugs/usability problems
2014-06-14 16:03:56 -07:00
Joe Beda
c6dd6cb410 Stable comparison of stuff that transits through map.
There are probably more of these in the codebase.  Looks like this happens with the go tip via travis.
2014-06-14 14:42:00 -07:00
Daniel Smith
50b9c34cf1 Fix error recovery. 2014-06-13 18:11:32 -07:00
Daniel Smith
5626703634 Add a new e2e test; fix some bugs/usability problems 2014-06-13 16:30:26 -07:00
Joe Beda
239e1273cf The Mac is picky about the syntax for listening on ephemeral ports. 2014-06-13 16:04:17 -07:00
Daniel Smith
2324dc1510 Merge pull request #102 from brendandburns/errors
Make all error strings lower case, for readability.
2014-06-13 15:56:40 -07:00
brendandburns
7342b6cee9 Merge pull request #100 from lavalamp/fix_panic
Add nice(r) error message on api server panic. Fix nil ptr derefs.
2014-06-13 15:46:52 -07:00
Brendan Burns
482a360f9e Make all error strings lower case, for readability. 2014-06-13 15:45:19 -07:00
Daniel Smith
b95eef522b Add nice(r) error message on api server panic. Fix nil ptr derefs. 2014-06-13 14:59:36 -07:00
Brendan Burns
d393838dfd Only manage containers with '--' in the name. 2014-06-13 12:09:48 -07:00
Daniel Smith
9cd9754693 Merge pull request #92 from brendandburns/container_info
Add status message population.
2014-06-13 10:49:32 -07:00
Brendan Burns
c2c6055d70 Add status message population. 2014-06-13 09:42:04 -07:00
Daniel Smith
e1bc4d2eba Port 2223 is in use on my machine sometimes, so this test was flaky. 2014-06-12 21:55:55 -07:00
Daniel Smith
f9a5fadf45 Merge pull request #86 from brendandburns/dot
Remove dot import syntax from registry package.
2014-06-12 20:58:13 -07:00
Brendan Burns
164160adef Address package level comments for readability. 2014-06-12 20:26:12 -07:00
brendandburns
f053a49988 Merge pull request #71 from brendandburns/container_info
Fix some problems in container info handling if the container's no present.
2014-06-12 20:17:05 -07:00
brendandburns
4a8c53e7bd Merge pull request #74 from danielnorberg/dano/cloudcfg-start
cloudcfg: resize <name> <replicas> command
2014-06-12 20:16:31 -07:00
Brendan Burns
0c3b9f2b69 fix dot import. 2014-06-12 20:14:41 -07:00
Daniel Smith
078451053b gofmt -s && change gofmt reminder to specify -s in prepare-commit-msg 2014-06-12 17:25:46 -07:00
Daniel Smith
867daadbdb Yaml parses json, too; no need to try both. 2014-06-12 17:23:28 -07:00
Daniel Smith
2abfd95d6b Tests pass now. 2014-06-12 17:23:28 -07:00
Daniel Smith
601f6bb4ad Add inline attribute 2014-06-12 17:23:28 -07:00
Daniel Smith
853a4e26a8 Call parsing code from cloudcfg 2014-06-12 17:23:28 -07:00
Daniel Smith
881613e3f5 First part of parsing settings client-side 2014-06-12 17:23:28 -07:00
Brendan Burns
b05bc22a62 Refactor the kubelet for testability.
Add unit tests.  Test coverage to 56.9%
2014-06-12 14:44:46 -07:00
Johan Euphrosine
4f6bed03ae gofmt -s pkg/ cmd/ 2014-06-12 14:16:19 -07:00
Daniel Norberg
339623736d cloudcfg: resize <name> <replicas> command 2014-06-12 17:07:06 -04:00
Daniel Norberg
75957dc5b9 cloudcfg: fix TestDoRequest 2014-06-12 16:35:00 -04:00
Brendan Burns
c36a7896fd Added a comment explaining the function. 2014-06-12 11:27:50 -07:00
Daniel Smith
ac65cc7094 Address comments 2014-06-12 09:35:04 -07:00
Daniel Smith
69acbf5a74 Fix build 2014-06-12 09:35:04 -07:00
Daniel Smith
7c17db672e Move hostname detection logic to allow replacement 2014-06-12 09:35:04 -07:00
Daniel Smith
187f7d2534 cloudcfg working locally now 2014-06-12 09:35:04 -07:00
Daniel Smith
8178240bbe Add a binary and scripts for running a local kubernetes cluster. 2014-06-12 09:35:04 -07:00
Joe Beda
02d9cf2eb9 Merge pull request #69 from brendandburns/scheduler
Fix the first fit scheduler to randomize.
2014-06-11 21:29:51 -07:00
Daniel Smith
12c1d660a3 Fix link 2014-06-11 17:20:16 -07:00
Daniel Smith
4f848b6d3b Need proper package comment. 2014-06-11 17:20:16 -07:00
Brendan Burns
5563459178 Fix the first fit scheduler to randomize. 2014-06-11 17:11:48 -07:00
Brendan Burns
9f76f13205 gofmt 2014-06-11 12:50:01 -07:00
Brendan Burns
d83f407e43 Fix tests. 2014-06-09 16:50:44 -07:00
Brendan Burns
62f6291377 Fix a bug if the container is non-existent. 2014-06-09 16:45:17 -07:00
Brendan Burns
9010ef954c Update tests 2014-06-09 07:16:43 -07:00
Brendan Burns
c96b14aba0 Fixes for task->pod changes & a TODO 2014-06-08 23:29:04 -07:00
Brendan Burns
f204bd52bc Add some more docs. 2014-06-08 23:07:29 -07:00
Brendan Burns
3e211272a7 Added. 2014-06-08 23:07:29 -07:00
Brendan Burns
fdcf273d50 Add pretty printing. 2014-06-08 23:07:29 -07:00
Brendan Burns
5cb4444176 Task -> Pod #4, the final chapter 2014-06-08 23:00:12 -07:00
Brendan Burns
6018497174 Task -> Pod part #3 2014-06-08 22:38:45 -07:00
Brendan Burns
79b7976cbf Add pod registry. 2014-06-08 21:43:17 -07:00
Brendan Burns
66e2575f2b More Task -> Pod 2014-06-08 21:43:17 -07:00
Brendan Burns
c8d493f532 Part one of the grand rename: Task -> Pod 2014-06-08 21:17:53 -07:00
brendandburns
139be599e9 Merge pull request #25 from lavalamp/rename_kl
Change 'this' varable to more sensible abbreviation
2014-06-08 20:38:32 -07:00
Daniel Smith
62aba06180 Change 'this' varable to more sensible abbreviation 2014-06-08 20:35:07 -07:00
Daniel Smith
c3c739d6b4 Fix spelling 2014-06-08 19:48:04 -07:00
Daniel Smith
19343c6014 Add test to kubelet, coverage up to 37% 2014-06-08 16:10:29 -07:00
Brendan Burns
0181953242 Add kind in all cases for list. 2014-06-07 21:57:36 -07:00
Brendan Burns
6e7b3fd969 Fix a compile error. 2014-06-07 21:56:14 -07:00
Brendan Burns
ef7cce5dad Populate 'Kind' field in all API types being returned. 2014-06-07 21:07:20 -07:00
Joe Beda
2c4b3a562c First commit 2014-06-06 16:40:48 -07:00