Commit Graph

12 Commits

Author SHA1 Message Date
Matthew Wong
e10ef5817f Add Lease implementation to leaderelection package
Kubernetes-commit: 410175851c092dae63f72f7d12abf19b1b74e200
2018-11-20 10:29:44 -05:00
Clayton Coleman
30b06a83d6 leaderelection: Allow leader elected code to step down on a context cancel
The current code simply exits without continuing to renew the lease, which means
participants using a slower lease duration might have to wait multiple minutes
before a new leader is elected. Allow an optional flag to be set on
LeaderElectionConfig that will release the lease when the calling context is
cancelled. Callers *must* ensure their lease guarded code has completed before
the context is cancelled, or other processes may acquire the lease before this
lease has released.

Add an example command that demonstrates how cancellation could be done.

As a convenience to users, make event recorder optional - not all users of the
lock code will need a recorder.

Kubernetes-commit: 09890b6c48da8e85237a5674d6256900f482b0a5
2018-11-27 21:51:21 -05:00
tanshanshan
9a73dd2136 fix error info
Kubernetes-commit: 19c9df95ad7812f3f5bab39211c82316e72f91b4
2018-09-04 17:14:12 +08:00
Kubernetes Publisher
fff8c3d73e sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:19:38 +00:00
Matt Kelly
ae2f680955 Fix typos in configmaplock
Kubernetes-commit: b2342ae9d942af2f6bf572aeb71cce6acaac218b
2018-02-19 14:40:11 -05:00
Jeff Grafton
c92755ea3b update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
Jeff Grafton
5da217e5c4 Use buildozer to delete licenses() rules except under third_party/
Kubernetes-commit: a7f49c906df816123e7d4ccbd4cebab411519465
2017-08-29 12:51:55 +00:00
Jeff Grafton
fa2ceb7462 Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 12:51:55 +00:00
Jeff Grafton
f921a73942 Run hack/update-bazel.sh to generate BUILD files
Kubernetes-commit: 3579017b865ddbc5449d6bba87346f086e4b93ff
2017-08-29 12:50:17 +00:00
Clayton Coleman
684e17ef90 Use a client interface instead of a concrete type
Aids testing

Kubernetes-commit: b9bebe8a4e12648a68ed02036ff8d4a7ec9be2eb
2017-07-28 13:45:49 +00:00
Chao Xu
ec4003cdb5 update bazel
Kubernetes-commit: 65cedeeb433638a977ad8d1be9870c2567671f04
2017-07-16 03:58:42 +00:00
Chao Xu
9869cc1684 move leaderelection package to client-go
Kubernetes-commit: 24d5279c59f1285fa8f589599d937ebee24f7ea4
2017-07-16 03:58:42 +00:00