feat: using LeaseLock for election (#8921)
We removed the use of configmap as an election lock, so we will use the Lease API to complete the election. Before this, we used `MultiLock` to facilitate smooth migration of existing users of ingress-nginx from configmap to LeaseLock. Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com> Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
This commit is contained in:
parent
fe09f6d096
commit
730174f73d
3 changed files with 8 additions and 32 deletions
|
|
@ -92,10 +92,10 @@ var _ = framework.IngressNginxDescribe("[Status] status update", func() {
|
|||
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error cleaning Ingress status")
|
||||
framework.Sleep(10 * time.Second)
|
||||
|
||||
err = f.KubeClientSet.CoreV1().
|
||||
ConfigMaps(f.Namespace).
|
||||
err = f.KubeClientSet.CoordinationV1().
|
||||
Leases(f.Namespace).
|
||||
Delete(context.TODO(), "ingress-controller-leader", metav1.DeleteOptions{})
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error deleting leader election configmap")
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error deleting leader election lease")
|
||||
|
||||
_, cmd, err = f.KubectlProxy(port)
|
||||
assert.Nil(ginkgo.GinkgoT(), err, "unexpected error starting kubectl proxy")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue