Use leases for leader election

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2022-05-31 13:01:01 +03:00
parent bfcf288561
commit a0fae153cf
4 changed files with 37 additions and 1 deletions
+1 -1
View File
@@ -325,7 +325,7 @@ func startLeaderElection(ctx context.Context, run func(), ns string, kubeClient
id = id + "_" + string(uuid.NewUUID())
lock, err := resourcelock.New(
resourcelock.ConfigMapsResourceLock,
resourcelock.ConfigMapsLeasesResourceLock,
ns,
configMapName,
kubeClient.CoreV1(),