Commit Graph

163 Commits (906122a279abbfa7f54e8dbf3ea06aac3bf89fac)

Author SHA1 Message Date
Daniel Smith eabc344eed Fix logging; extend queue length to 100 2015-06-30 10:27:24 -07:00
Alex Robinson 83f0bd668c Merge pull request #10427 from lavalamp/etcdChanFix
Don't block etcd client
2015-06-29 13:28:48 -07:00
Daniel Smith 45ac0cf25e Don't block etcd client 2015-06-26 14:27:13 -07:00
Clayton Coleman 6970dda54e Use runtime.Copier instead of hardcoding api.Scheme
Allow other schemes to be supported by etcd_helper.go

runtime.Scheme.Copy() should be using the built in DeepCopy()
2015-06-26 14:50:33 -04:00
Maxwell Forbes 461fc2b01b Merge pull request #10277 from brendandburns/health
Switch to using the official etcd health check.
2015-06-24 11:45:51 -07:00
Brendan Burns f4e97be78e Switch to using the official etcd health check. 2015-06-24 10:18:39 -07:00
nikhiljindal 221ae4d63b Allow update without resource version 2015-06-23 00:16:08 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Clayton Coleman da7c612bb6 Expire is a new type of watch action 2015-06-01 17:26:48 -04:00
Clayton Coleman 3368e12a6c Ensure TTL is not cleared in possible edge cases 2015-06-01 17:26:47 -04:00
Rohit Jnagal 3e98919a63 Merge pull request #8857 from andronat/fix_TestGetEtcdVersion_NotListening
fix TestGetEtcdVersion_NotListening
2015-05-29 13:25:02 -07:00
Rohit Jnagal 51750a4680 Merge pull request #8724 from smarterclayton/preserve_ttl
TTL is not preserved automatically during edit
2015-05-29 11:12:00 -07:00
Anastasis Andronidis bb9fb19cc2 TestGetEtcdVersion_NotListening is looking for a closed port first 2015-05-29 11:32:05 +02:00
Clayton Coleman 2b8e918ed9 TTL is not preserved automatically during edit
Change the signature of GuaranteedUpdate so that TTL can
be more easily preserved. Allow a simpler (no ttl) and
more complex (response and node directly available, set ttl)
path for GuaranteedUpdate.  Add some tests to ensure this
doesn't blow up again.
2015-05-28 19:58:17 -04:00
Filip Grzadkowski eb14b68a9c Improve tracing information by deleting traces from etcd cache and adding information to traces from generic registry. 2015-05-28 16:34:35 +02:00
Wojciech Tyczynski 33318f0162 Use generated DeepCopy methods. 2015-05-28 09:03:27 +02:00
Filip Grzadkowski 967b1b95ba Add very simple tracing mechanism for easier debugging of slow requests. 2015-05-26 16:17:18 +02:00
Filip Grzadkowski 50de4d0081 Add cache with multiple shards to decrease lock contention 2015-05-11 15:07:50 +02:00
Brendan Burns 5461231c1c Merge pull request #7567 from endocode/kbeecher/wip_etcd_migrate_keys
WIP: Add startup code to apiserver to migrate etcd keys
2015-05-07 10:05:41 -07:00
Filip Grzadkowski 970e972cd8 Add latency metrics for etcd operations 2015-05-07 08:58:28 +02:00
Karl Beecher 0473f652fd Add startup code to apiserver to migrate etcd keys
Refs: #3476
2015-05-05 12:28:14 +02:00
CJ Cullen 1ec0fb2e3d Make changes suggested in #7675 2015-05-04 21:58:13 -07:00
Nikhil Jindal 2ae13693ab Merge pull request #7675 from cjcullen/cbr0
Fix kube2sky flakes. Fix tools.GetEtcdVersion to work with etcd > 2.0.7
2015-05-04 14:23:29 -07:00
CJ Cullen a21713a771 Fix kube2sky flakes. Fix tools.GetEtcdVersion to work with etcd > 2.0.7 2015-05-04 13:01:35 -07:00
Filip Grzadkowski 6f341eb5ae Add metrics to measure cache hit ratio 2015-05-04 13:20:15 +02:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Filip Grzadkowski 15e9bfd9ae Add a simple cache for objects stored in etcd. 2015-04-30 12:08:56 +02:00
CJ Cullen 182f47ee3d Revert "Add a simple cache for objects stored in etcd" 2015-04-29 12:06:52 -07:00
Filip Grzadkowski 016e20167b Add a simple cache for objects stored in etcd. 2015-04-29 13:14:31 +02:00
Karl Beecher a7623ca6cc Adds ability to define a prefix for etcd paths
The API server can be supplied (via a command line flag) with a custom
prefix that is prepended to etcd resources paths.

Refs: #3476
2015-04-24 12:12:39 +02:00
Masahiro Sano f90dc8f413 use Watch for single object instead of WatchList 2015-04-21 08:00:52 +09:00
derekwaynecarr 199011eee0 Fix nil pointer in etcd tools 2015-04-17 11:33:31 -04:00
Wojciech Tyczynski 6feaf8ee4f Support List() single-matchers 2015-04-15 12:10:43 +02:00
David Oppenheimer 6b28a69a1b Clarify comments describing how GuaranteedUpdate() (previously AtomicUpdate() works. Closes #6626. 2015-04-14 15:38:15 -07:00
nikhiljindal 08d9e244f7 Removing some references to v1beta1 from test code 2015-04-08 17:28:06 -07:00
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
Prashanth Balasubramanian b0068d05f8 Add the ability to watch fields of an rc 2015-03-26 11:01:56 -07:00
Clayton Coleman 65425f690c Move field errors to pkg/util/fielderrors
Allows pkg/api to take a reference to labels.Selector and fields.Selector
2015-03-22 17:43:34 -04:00
Clayton Coleman 428d2263e5 Graceful deletion of resources
This commit adds support to core resources to enable deferred deletion
of resources.  Clients may optionally specify a time period after which
resources must be deleted via an object sent with their DELETE. That
object may define an optional grace period in seconds, or allow the
default "preferred" value for a resource to be used. Once the object
is marked as pending deletion, the deletionTimestamp field will be set
and an etcd TTL will be in place.

Clients should assume resources that have deletionTimestamp set will
be deleted at some point in the future.  Other changes will come later
to enable graceful deletion on a per resource basis.
2015-03-19 15:33:32 -04:00
Clayton Coleman bddef32193 Prepare EtcdHelper to extract more data from Node
In order to support graceful deletion, the resource object will
need access to the TTL value in etcd.  Also, in the future we
may want to get the creation index (distinct from modifiedindex)
and expose it to clients.  Change EtcdResourceVersioner to be
more type specific (objects vs lists) and provide a default
implementation that relies on the internal API convention.

Also, rename etcd_tools.go to etcd_helper.go and split a few
things up.
2015-03-16 15:33:50 -04:00
Clayton Coleman 4ca90e0343 FakeEtcdClient should return KeyNotFound on Delete 2015-03-16 14:22:03 -04:00
Clayton Coleman 143015025a Support TTL in genericetcd#Update 2015-03-16 14:22:01 -04:00
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Mike Danese 438052c453 fix variable shadowing bug in etcd_tools.go 2015-03-05 22:34:28 -08:00
Daniel Smith 4e7bccab02 Merge pull request #4991 from fabioy/etcdcheck-fix
Fix the etcd version check and have it return the version string.
2015-03-04 14:55:49 -08:00
Daniel Smith 4cd59e629a Merge pull request #5010 from smarterclayton/update_resource_version
genericetcd.Etcd should test resourceVersion
2015-03-04 14:49:05 -08:00
Mike Danese 4f6e09d854 add tests to pkg/tools/etcd_tools_test.go 2015-03-04 10:38:42 -08:00
Mike Danese e1ca63f569 SetObj and CreateObj optionally accept an object to fill with the result of the get 2015-03-04 10:38:42 -08:00
Fabio Yeon c38c6f0dad Fix the etcd version check and have it return the version string. 2015-03-03 16:59:00 -08:00