Enable custom election id for status sync.
This commit is contained in:
parent
85369f87cf
commit
2d526b213c
3 changed files with 7 additions and 1 deletions
|
|
@ -52,6 +52,7 @@ type Config struct {
|
|||
Client clientset.Interface
|
||||
PublishService string
|
||||
IngressLister cache_store.StoreToIngressLister
|
||||
ElectionID string
|
||||
}
|
||||
|
||||
// statusSync keeps the status IP in each Ingress rule updated executing a periodic check
|
||||
|
|
@ -171,7 +172,7 @@ func NewStatusSyncer(config Config) Sync {
|
|||
}
|
||||
st.syncQueue = task.NewCustomTaskQueue(st.sync, st.keyfunc)
|
||||
|
||||
le, err := NewElection("ingress-controller-leader",
|
||||
le, err := NewElection(config.ElectionID,
|
||||
pod.Name, pod.Namespace, 30*time.Second,
|
||||
st.callback, config.Client)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue