Commit Graph

411 Commits (7d7ca5ab72231c783ad52fb530876aceca9cd16d)

Author SHA1 Message Date
Tim Hockin 8ae203825b Implement multi-port endpoints
Instead of endpoints being a flat list, it is now a list of "subsets"
where each is a struct of {Addresses, Ports}.  To generate the list of
endpoints you need to take union of the Cartesian products of the
subsets.  This is compact in the vast majority of cases, yet still
represents named ports and corner cases (e.g. each pod has a different
port number).

This also stores subsets in a deterministic order (sorted by hash) to
avoid spurious updates and comparison problems.

This is a fully compatible change - old objects and clients will
keepworking as long as they don't need the new functionality.

This is the prep for multi-port Services, which will add API to produce
endpoints in this new structure.
2015-03-27 12:36:32 -07:00
Piotr Szczesniak 31901ed9d0 Changed PodInfo to be a list
This change is to make API consistent with our convention.

Fixes #3622
2015-03-26 10:15:25 +01:00
Rohit Jnagal 49ff04765b Add validation for node creation. 2015-03-25 21:55:03 +00:00
Federico Simoncelli 5b3056cdb7 nodecontroller: add event recorder support
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-25 15:06:53 -04:00
Victor Marmol f7135b3dd4 Merge pull request #5827 from spothanis/master
added cloud provider flag to kubelet
2015-03-25 10:50:18 -07:00
Filip Grzadkowski 74da3b14b0 Delete pod_cache and rely on updating pod status by kublet. 2015-03-25 15:08:09 +01:00
Filip Grzadkowski 0804a5c823 Fix race in integration test 2015-03-25 14:28:57 +01:00
Sreekanth Pothanis 1c06cde4c4 added cloud provider flag to kubelet
This is to fix issue #5667
2015-03-24 19:32:50 -07:00
Clayton Coleman aee9bdd69a Merge pull request #5805 from liggitt/node_proxy
Improve ResourceLocation API, allow proxy to use authenticated transport
2015-03-24 13:01:54 -04:00
Filip Grzadkowski 632ca506ce * Update pod status only when it changes.
* Refactor syncing logic into a separate struct
2015-03-24 16:41:00 +01:00
Jordan Liggitt a75b501821 Improve ResourceLocation API, allow proxy to use authenticated transport 2015-03-24 11:11:34 -04:00
Wojciech Tyczynski f80cac1775 Integration test for reading Pods via http & file 2015-03-24 12:05:41 +01:00
Clayton Coleman d020ca00b8 Pass hostname to all kubelet config sources instead of os.Hostname()
Make applyDefaults be tied to the current config source.
2015-03-23 15:58:45 -04:00
Clayton Coleman bd12cfea69 Integration tests should do a faster status sync loop 2015-03-23 14:48:28 -04:00
Tim Hockin bfadae77e0 Promote volume plugins, prep for persistent vols
Move pkg/kubelet/volume/... to pkg/volume/...
Some renames to make the soon-to-come persistent volumes work clearer.
2015-03-20 13:49:40 -07:00
Brian Grant 11f9733599 Merge pull request #5587 from nikhiljindal/enable3
Updating integration tests to test both API versions - v1beta1 and 3
2015-03-18 16:14:20 -07:00
nikhiljindal 7e36bbab3c Updating integration tests to test both API versions - v1beta1 and 3 2015-03-18 15:24:11 -07:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
Yu-Ju Hong 929fb63b33 Sync static pods from Kubelet to the API server
Currently, API server is not aware of the static pods (manifests from
sources other than the API server, e.g. file and http) at all. This is
inconvenient since users cannot check the static pods through kubectl.
It is also sub-optimal because scheduler is unaware of the resource
consumption by these static pods on the node.

This change syncs the information back to the API server by creating a
mirror pod via API server for each static pod.

 - Kubelet creates containers for the static pod, as it would do
   normally.

 - If a mirror pod gets deleted, Kubelet will re-create one. The
   containers are sync'd to the static pods, so they will not be
   affected.

 - If a static pod gets removed from the source (e.g. manifest file
   removed from the directory), the orphaned mirror pod will be deleted.

Note that because events are associated with UID, and the mirror pod has
a different UID than the original static pod, the events will not be
shown for the mirror pod when running `kubectl describe pod
<mirror_pod>`.
2015-03-17 08:45:56 -07:00
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
Filip Grzadkowski 336525a27d Periodically update pod status from kubelet. 2015-03-16 23:03:03 +01:00
Jeff Lowdermilk e37fd2a84d Merge pull request #5477 from dchen1107/clean
Convert RestartPolicy to string for v1beta3.
2015-03-16 10:23:52 -07:00
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Victor Marmol dc96ea6300 Run cAdvisor inside the Kubelet.
cAdvisor is started as a Kubelet dependency during startup of the
Kubelet before the sync loops start.
2015-03-13 16:06:02 -07:00
Dawn Chen 0cc2b62b4a Merge pull request #5265 from ddysher/kubelet-post-status
kubelet post node status to master
2015-03-13 15:29:22 -07:00
Timothy St. Clair 7eebf674d4 Update to option enable profiling on the master daemon processes.
--profiling=true , default is false
2015-03-13 10:45:01 -05:00
Eric Tune cf22810ffc This is a combination of 2 commits.
Fix log messages and var names in integr test

It says "pods" where the things are actually "containers".
2015-03-12 14:10:52 -07:00
Eric Tune ac7bf05079 Kubelet has not even heard of etcd. 2015-03-11 16:29:31 -07:00
Victor Marmol 7d53425bbc Merge pull request #5337 from erictune/no_hostport_integ_test
Don't use hostPort in integration test.
2015-03-11 16:00:11 -07:00
Eric Tune 1a2da5b8f5 Don't use hostPort in integration test.
The integration test will fail if I check in my pending PR
to remove boundPods.  Kubernetes eventually does the right
thing, but getting the integration test to check expectations
is hard because the scheduling behavior is unpredictable.

The boundPods removal is needed to fix P1 bug and speeds up
the scheduler considerably.
2015-03-11 15:30:56 -07:00
Prashanth Balasubramanian 28d9260c0b Sync replication count with the api server on pod creation/deletion. 2015-03-11 13:29:20 -07:00
Deyuan Deng 9982aaa960 kubelet post node status to master 2015-03-10 23:17:36 -04:00
Brian Grant 9aa744925e Merge pull request #5030 from simon3z/nodeinfo
Add support for fetching node collected information
2015-03-10 14:05:41 -07:00
Paul Morie a486ab078f Fix selfLink issues in integration test 2015-03-10 14:40:16 -04:00
Mike Danese 46ec580771 add PATCH to apiserver 2015-03-10 10:56:15 -07:00
Federico Simoncelli 1b18440f35 kubelet: add GetNodeInfo implementation
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-10 10:11:01 -04:00
Alex Mohr da9622a6d7 Revert "Revert "Deleting old sample JSON; moving those in use; updating referenc..." 2015-03-09 14:44:14 -07:00
Alex Mohr 44b9b7aea5 Revert "Deleting old sample JSON; moving those in use; updating references" 2015-03-09 14:18:40 -07:00
Alex Mohr ee276b26cb Merge pull request #5124 from MikeJeffrey/ex3
Deleting old sample JSON; moving those in use; updating references
2015-03-09 10:58:44 -07:00
MikeJeffrey 4da6d413be Deleting old sample JSON; moving those in use; updating references 2015-03-06 17:24:45 -08:00
Jordan Liggitt 02622b1401 Plumb tls and cert options into kubelet start 2015-03-05 16:30:52 -05:00
Victor Marmol 71e545bf81 Merge pull request #4970 from dchen1107/podstatus
Hide POD container from end users
2015-03-02 17:15:24 -08:00
Dawn Chen dad365fb2b Hide POD container from end users 2015-03-02 17:03:28 -08:00
Brendan Burns fe973461f5 Merge pull request #4916 from thockin/plural_21_endpoints
Rename type Port to ContainerPort
2015-03-02 10:53:32 -08:00
Filip Grzadkowski 86b1c90097 Add flag to control probing pods statuses from kubelets. 2015-03-02 16:06:14 +01:00
Tim Hockin ea548b8260 Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-27 21:05:59 -08:00
Jerzy Szczepkowski e0548c3c03 Node controller supports disabling node probes.
Node controller supports disabling sending node probes and updating node statuses. Controlled by --sync_node_status flag. Resolves #4565.
2015-02-27 08:21:04 +01:00
Daniel Smith 650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -08:00
Tim Hockin 7fe7f8a542 move pkg/kubelet/server to cmd/kubelet/app 2015-02-20 08:49:12 -08:00
Dawn Chen 34df171693 Debugging message for debugging #4500 2015-02-18 14:40:24 -08:00
Clayton Coleman eebe00c259 Test namespace overlap in test-integration.sh 2015-02-16 16:31:32 -05:00
Clayton Coleman 3e2e4714a2 Always set ?namespace in query if specified
Revise our code to only call Request.Namespace() if a namespace
*should* be present.  For root scoped resources, namespace should
be ignored.  For namespaced resources, it is an error to have
Namespace=="".
2015-02-16 00:23:38 -05:00
Clayton Coleman 9175082a1c Split naming behavior out into objects that are derived from the request
Fix bug with cross namespace queries not being possible.  Ensure selflink
is set on lists correctly.
2015-02-16 00:23:38 -05:00
Dawn Chen f5f2b6f773 Check if kubelet does know such Pod before querying status. 2015-02-11 10:16:04 -08:00
Mike Danese 043794492e implement readiness. 2015-02-10 08:30:09 -08:00
Deyuan Deng 4c6f6e0efc Refactor RegisterRetryCount, improve tests 2015-02-09 17:55:28 -05:00
Deyuan Deng 55b9944cfe Remove pods from failed node 2015-02-09 17:50:24 -05:00
Deyuan Deng f5bc43a46c Merge pull request #3498 from pravisankar/ravi/sync-nodes-optional
Make periodic sync nodes from -cloud_provider/-machines optional.
2015-02-09 17:45:56 -05:00
Ravi Sankar Penta 3a5ef05f64 Make periodic sync nodes from cloud provider optional.
--sync_nodes=false gives user flexibility to add/remove nodes in the
cluster using REST api/kubectl cli and at the same time can use
cloud provider for other resources like persistent disks, etc.
2015-02-09 13:42:44 -08:00
Clayton Coleman 4369e31b9d Integration tests should use 127.0.0.1 consistently 2015-02-09 14:30:31 -05:00
Mike Danese 14bfec92f2 rename probe.Status to probe.Result. 2015-02-05 15:49:58 -08:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08:00
Joe Beda d96afdd645 Move 'pkg/standalone' package to 'pkg/kubelet/server'.
This paves the way to hyperkube for the kubelet.
2015-02-02 14:03:13 -08:00
Clayton Coleman 7f39a37eee Fix integration tests to not depend on setting pod.Status on create
Allow the master to have pod/node cache timeouts controlled via a config
flag for integration tests.

Move integration test to '127.0.0.1' so that it correctly returns a health
check, and enable health check testing on the integration test.
2015-02-02 14:46:23 -05:00
saadali e83fd7b8e7 Make master service IP static (no longer randomly assigned) 2015-01-30 16:07:19 -08:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
nikhiljindal dc92d3c7a2 Cleaning up the operations code in client 2015-01-28 21:04:16 -08:00
Mrunal Patel 19e0605f5b Replace "net" by "pod infra" in docs and format strings. 2015-01-28 15:03:06 -08:00
Tim Hockin c8f61885df Merge pull request #3695 from mikedanese/ready
refactor pkg/health into more reusable pkg/probe
2015-01-28 11:00:32 -08:00
Clayton Coleman 5117189e03 Merge pull request #3707 from nikhiljindal/preOperations
Removing support for asynchronous server requests
2015-01-28 13:02:52 -05:00
nikhiljindal de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
Mike Danese 5dc6362f8a rename probe.Healthy to probe.Success and renam probe.Unhealthy to probe.Failure. 2015-01-27 11:20:30 -08:00
Mike Danese a298402bd4 remove pkg/health and move everything over to pkg/probe 2015-01-27 11:20:30 -08:00
Tim Hockin 6cb275829f Implement volumes as plugins.
Break up the monolithic volumes code in kubelet into very small individual
modules with a well-defined interface.  Move them all into their own packages
and beef up testing along the way.
2015-01-20 11:45:45 -08:00
Brendan Burns e86c8f9e53 Merge pull request #3565 from dchen1107/podstatus
Introduce PodStatusResult, and deprecate PodContainerInfo.
2015-01-16 12:05:07 -08:00
Dawn Chen 15e9fa8a9d Introduce PodStatusResult, and deprecate PodContainerInfo. 2015-01-16 09:10:40 -08:00
Daniel Smith 46f8a56dba Merge pull request #3376 from erictune/channel_api
Kublet watches Pods.
2015-01-15 14:48:12 -08:00
Joe Beda 6bd6b905f5 Address code review comments
Add some documentation.
Create new util.InitFlags() function to merge and parse in one step.
2015-01-15 09:12:20 -08:00
Joe Beda dcd00c936e Move all kubernetes to posix flags 2015-01-15 09:12:19 -08:00
Eric Tune b759f67ee3 Kublet watches Pods.
Added a kubelet config source for watching pods on apiserver.
The pods are converted to boundpods for merging with other
config sources.

The preferred way to create a kubelet is now to pass an apiserver
client but not an etcd client.  Changed cmd/integration to use
apiserver to talk to kubelets.  And cmd/kubernetes.

Unit, integration, and e2e tests pass, except for a failure of the pd
e2e test which was unrelated.
2015-01-14 15:31:26 -08:00
Paul Morie fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Tim Hockin 905514a12b Ensure Namespace and UID are set in kubelet
Make all kubelet config sources ensure that UID and Namespace are defaulted, if
need be.

We can *almost* disable the "if blank" logic for UID, except for tests that
call APIs that do not run through SyncPods.  We really ought to be enforcing
invariants better.
2015-01-12 14:27:34 -08:00
Tim Hockin 5b0a65e9a3 make private root dirs for integration test kubelets 2015-01-11 16:40:06 -08:00
Deyuan Deng a2651bfcc7 Rename minioncontroller to nodecontroller 2015-01-08 14:52:10 -05:00
Eric Tune c2b3d678c0 Merge pull request #3248 from derekwaynecarr/admission_control_hooks
Implement basic admission control framework
2015-01-07 16:52:49 -08:00
derekwaynecarr a56087cdf8 Remove client from attributes, remove admission control interface, fix-up error codes 2015-01-07 14:42:31 -05:00
derekwaynecarr 1e2b995a79 Fix admission control in tests 2015-01-07 14:42:31 -05:00
Clayton Coleman ba53d723d3 Clean up how client is passed to Kubelet in preparation for reading pods
Also fixes how Kubelet server looks up pods by name when there are multiple
sources.
2015-01-07 14:40:37 -05:00
Jeff Lowdermlk 0ab39df66b Add a rollingupdate lib and command to kubectl
Also decouple conditions from client for testability.
2015-01-06 17:29:05 -08:00
Tim Hockin a57976b46d fix call to Fatal() vs Fatalf() 2015-01-03 20:51:14 -08:00
Tim Hockin 297c8d1d5a Parse flags for in integration test.
The default --v=10 might be reconsidered.
2015-01-03 20:48:19 -08:00
Clayton Coleman e355f54eda Update references from Path() to the appropriate segment use 2014-12-29 15:38:52 -05:00
Daniel Smith 5b8e91595a Make pod listing costant-time
* move ip cache out of registry/pod
* combine, rationalize, and move pod status logic
* Fix unit and integration tests
2014-12-22 14:14:03 -08:00
Mike Danese 4850bdbe63 refactor scheduler factory to use plugin architecture style like credentialprovider and cloudprovider for configuring priority functions and fit predicates 2014-12-17 14:55:28 -08:00
Brendan Burns a6f967b6e7 Revert "Revert "Add an api object for the kubelet, and a versioned endpoint.""
This reverts commit dcfcf315e5.
2014-12-15 09:29:04 -08:00
Brendan Burns dcfcf315e5 Revert "Add an api object for the kubelet, and a versioned endpoint."
This reverts commit d4b9979382.
2014-12-12 21:13:44 -08:00
Brendan Burns d4b9979382 Add an api object for the kubelet, and a versioned endpoint. 2014-12-12 15:26:28 -08:00
Abhishek Gupta 6b712cc700 Scheduler changes for extensibility 2014-12-08 14:47:05 -08:00
Brendan Burns d47b510104 Refactor kubelet, standalone k8s and integration test to all use the same code. 2014-12-01 15:37:21 -08:00
Tim Hockin ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Daniel Smith c412540cf2 Remove confusing function; add TODO and explanation for (nonfatal) error message in integration test. 2014-11-14 17:16:05 -08:00
Daniel Smith 1be56fa91b Merge pull request #2279 from brendandburns/integration
Added some etcd retries to try to work around some flakes we see in Travis
2014-11-12 13:51:39 -08:00
Brendan Burns bcec212c37 Added some etcd retries to try to work around some flakes we see in Travis. 2014-11-12 12:59:19 -08:00
Clayton Coleman d97f6cd0d8 Integration test was not decoding using api.Scheme 2014-11-11 17:03:20 -05:00
Clayton Coleman 94c873e7a4 Remaining refactor for PodTemplateSpec and fixing test cases 2014-11-11 17:03:20 -05:00
bgrant0607 fc0dab630c Merge pull request #2086 from markturansky/v1beta3_refactor
Refactor internal API for Services to match v1beta3
2014-11-04 21:48:02 -08:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Eric Tune 1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Eric Tune 55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Brendan Burns 893291d81d Merge pull request #1997 from ddysher/split-master
Separate minion controller from master.
2014-10-31 11:23:58 -07:00
Brendan Burns c6df93d76e Merge pull request #2082 from lavalamp/fix
Fix self linking of objects returned in lists.
2014-10-30 21:43:31 -07:00
Deyuan Deng 019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Clayton Coleman 41f0929384 Merge pull request #2044 from erictune/fix_mux
Allocate mux in master.New()
2014-10-30 20:15:57 -04:00
Daniel Smith b28234fac6 Fix self linking of objects returned in lists. 2014-10-30 15:04:11 -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
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 35bd8d4a11 Add e2e and integration tests. 2014-10-29 11:29:57 -07:00
Clayton Coleman 71fecef6f6 Add test coverage and fix a few minor problems 2014-10-29 14:08:37 -04:00
Daniel Smith dca7363459 Serve API version list, test with an integration test. 2014-10-28 17:35:56 -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
derekwaynecarr ce30b2657a Fix integration tests 2014-10-24 11:49:04 -04:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Haney Maxwell 3160500940 Refactor kubelet access and add SSL 2014-10-22 14:53:59 -07:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Tim Hockin e907011111 Core support for ip-per-service 2014-10-16 08:36:47 -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 0431f2430d Use cache for minion lookups, don't hammer apiserver 2014-10-13 14:46:31 -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
derekwaynecarr 9e60bf1e43 Pod cache needs to be namespace-aware 2014-10-10 09:35:31 -04:00
Haney Maxwell c0bf974871 Allow disabling non-necessary kubelet and apiserver endpoints 2014-10-09 16:49:27 -07:00
Haney Maxwell 4d87159eda Allow etcd config file to be passed to apiserver, kubelet, and proxy 2014-10-07 14:25:54 -07:00
Daniel Smith cf203f1304 Fix build error in integration test 2014-10-07 13:10:58 -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
Tim Hockin eb24c997e4 Merge pull request #1606 from lavalamp/fix
Try to fix flakiness by increasing timeouts
2014-10-06 17:22:51 -07:00
Daniel Smith a744623948 Try to fix flakiness by increasing timeouts, because that is always the best way to perform such a fix. 2014-10-06 17:14:34 -07:00
Brendan Burns ab6065944c Merge pull request #1584 from thockin/net
Flag-compatible IP type
2014-10-06 13:35:48 -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 0ad0a247c4 Flag-compatible IP type 2014-10-06 11:29:22 -07:00
Deyuan Deng a9e7cf8e40 Fix integration test read volume dir error. 2014-10-03 19:51:07 -04: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 f00fd8d2e3 Add an integration test for services. 2014-10-02 21:07:06 -07:00
derekwaynecarr 0a290506c2 Fix integration tests 2014-10-02 12:56:42 -04: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 de1f94cbc7 Fix integration test 2014-09-30 14:31:17 -04: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 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
Brian Waldon 0bf4fabc19 kubelet: move docker-related code into sub-package 2014-09-11 13:12:28 -07:00
Daniel Smith fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -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
Clayton Coleman e840062c65 Delete all keys prior to running integration test 2014-08-28 09:58:39 -04:00
Daniel Smith 0a1dfa366e Make integration test pass. 2014-08-25 11:59:00 -07: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
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
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
derekwaynecarr fd8741edf2 Refactor kubelet to use http.ServeMux 2014-08-20 16:08:08 -05: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
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
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
brendandburns cc4300c3ec Merge pull request #757 from lavalamp/repCtl
Remove etcd dep from controller manager
2014-08-05 11:47:31 -07:00
Brendan Burns 20a8f03d62 Add dns-952-identifier validation to service ids. 2014-08-05 11:40:48 -07:00
Robert Bailey 8671d69f34 Minor style fixes and keep the test manifest in sync. 2014-08-04 16:14:43 -07:00
Daniel Smith b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07: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
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 7a7dfeb85b integration: Fix multiple response.WriteHeader calls
The current integration tests do not return after delegating
HTTP requests, as a result an extra call to response.WriteHeader
is made for every request.

Fix the issue by returning after delegating HTTP requests.
2014-07-26 16:09:15 -07:00
Brendan Burns bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00
Eric Tune ded67ead1e Make Kubelet type members private and provide New functions. 2014-07-22 14:40:59 -07: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
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
Brendan Burns c6255afe37 Make the service reconciller use the API, not a PodRegistry 2014-07-18 13:54:33 -07:00
Brendan Burns 5bf0820580 Fix integration tests. 2014-07-11 14:24:54 -07:00
Yuki Yugui Sonoda c25f44c137 Fixes golint errors in cmd/. 2014-07-08 16:08:24 +09:00
Brendan Burns a77248eb6f Add some more logging to better understand integration test timeouts. 2014-07-07 13:57:25 -07: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
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 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 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
brendandburns d53c56dd29 Merge pull request #314 from thockin/valid2
Fix examples to set manifest ID and version
2014-06-30 20:21:32 -07:00
brendandburns 65a62278b1 Merge pull request #286 from lavalamp/exampleEtcd
Separate scheduler from registry
2014-06-30 20:17:07 -07:00
Tim Hockin 9affd6d260 Fix examples to set manifest ID and version
Part 4 in a series of changes towards data validation.
2014-06-30 16:16:06 -07:00
Daniel Smith 011ce9d871 Add crash handler bypass for testing. 2014-06-29 12:35:43 -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
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 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
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
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
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 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 61a494d303 First step of combination. 2014-06-24 09:38:22 -07:00
Daniel Smith 79ee5aa250 Implement minion registry. Minions now a first-class object. 2014-06-23 13:27:52 -07:00
Brendan Burns 302ec0f37b Wire in the pod cache. Just used for List for now. 2014-06-18 22:26:35 -07:00
Brendan Burns 420b2fdd57 Add support for populating host ip address. 2014-06-18 14:57:50 -07:00
Daniel Smith d8206503b8 Make integration/localkube work with new controller library 2014-06-18 13:10:39 -07:00
Daniel Smith 59d9763a52 remove package name, not needed here 2014-06-11 17:20:16 -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
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00