1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix: don't release lock on context cancelled (#6048)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-01-24 18:43:48 +01:00 committed by GitHub
parent 47cb099cf9
commit 8a645f63cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ func New(log logr.Logger, name, namespace string, kubeClient kubernetes.Interfac
}
e.leaderElectionCfg = leaderelection.LeaderElectionConfig{
Lock: e.lock,
ReleaseOnCancel: true,
ReleaseOnCancel: false,
LeaseDuration: 6 * retryPeriod,
RenewDeadline: 5 * retryPeriod,
RetryPeriod: retryPeriod,