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
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
Clayton Coleman
3d52aac13c
genericetcd.Etcd should test resourceVersion
...
Also fix that Update was returning AlreadyExists instead of
NotFound (when create is disabled) and that Update when CreateOnUpdate
was true was not populating the returned object.
Added more tests
2015-03-03 19:54:43 -05:00
Clayton Coleman
23d199ded9
Make generic etcd more powerful and return operations from etcd
...
When we complete an operation, etcd usually provides a response
object. Return that object up instead of querying etcd twice.
2015-02-13 13:11:33 -05:00
Yu-Ju Hong
6813683ee2
Allow AtomicUpdate() to surface the error when the key doesn't exist
...
In some cases, when the key doesn't exist, AtomicUpdate should simply fail and
surface the error. This change adds a new function parameter "ignoreNotFound"
for this purpose.
2015-02-11 21:56:28 -08:00
saadali
a41f520bf0
Add "Update Event" to Kubernetes API
2015-02-05 00:07:51 -08:00
Deyuan Deng
d30da9a812
List objects in deterministic order
2015-01-27 09:29:40 -05:00
Mike Danese
a98faa1f62
fixed bug in tools.NewEtcdClientStartServerIfNecessary
2014-12-03 12:58:03 -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
Dawn Chen
30fcf24131
Merge pull request #2121 from brendandburns/standalone
...
Create a standalone k8s binary, capable of running a full cluster
2014-11-10 22:04:28 -08:00
Brendan Burns
2c1221864d
Make a standalone binary.
2014-11-10 13:34:11 -08:00
Brendan Burns
d7dc20fd6a
Add etcd to the list of services to validate.
...
Also add minions.
2014-11-05 21:22:01 -08: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
Clayton Coleman
3a89883223
EtcdHelper.decodeList was not properly returning errors
2014-10-23 16:48:16 -04: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
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
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
0d30a656ef
Do interface{} -> runtime.Object rename everywhere
2014-09-07 22:19:24 -07: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
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
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
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
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
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
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
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
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
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
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
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
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
Kouhei Ueno
3f9ec452e4
use atomic create in EtcdHelper.AtomicUpdate
2014-08-05 23:37:32 +09:00
Clayton Coleman
325f9ef005
Make create atomic on etcd for Services/ReplControllers
2014-08-05 01:12:27 -04:00
Kouhei Ueno
6288336436
Rename IsEtcdConflict to IsEtcdTestFailed
2014-08-05 08:07:20 +09:00
Brendan Burns
ab4918464e
Switched Set to Create
2014-08-04 12:10:16 -07: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
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
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