Replace use of endpoint as locks with configmap

This commit is contained in:
Manuel de Brito Fontes 2017-05-24 01:55:13 -04:00
parent f2abb7894f
commit e347413649
3 changed files with 111 additions and 105 deletions

View file

@ -101,8 +101,8 @@ func NewElection(electionID,
Host: hostname,
})
lock := resourcelock.EndpointsLock{
EndpointsMeta: meta_v1.ObjectMeta{Namespace: namespace, Name: electionID},
lock := resourcelock.ConfigMapLock{
ConfigMapMeta: meta_v1.ObjectMeta{Namespace: namespace, Name: electionID},
Client: c,
LockConfig: resourcelock.ResourceLockConfig{
Identity: id,