Status leader election must consired the ingress class
This commit is contained in:
parent
0f9f082959
commit
c4ef98240d
1 changed files with 9 additions and 1 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
package status
|
package status
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -187,7 +188,14 @@ func NewStatusSyncer(config Config) Sync {
|
||||||
}
|
}
|
||||||
st.syncQueue = task.NewCustomTaskQueue(st.sync, st.keyfunc)
|
st.syncQueue = task.NewCustomTaskQueue(st.sync, st.keyfunc)
|
||||||
|
|
||||||
le, err := NewElection(config.ElectionID,
|
// we need to use the defined ingress class to allow multiple leaders
|
||||||
|
// in order to update information about ingress status
|
||||||
|
id := fmt.Sprintf("%v-%v", config.ElectionID, config.DefaultIngressClass)
|
||||||
|
if config.IngressClass != "" {
|
||||||
|
id = fmt.Sprintf("%v-%v", config.ElectionID, config.IngressClass)
|
||||||
|
}
|
||||||
|
|
||||||
|
le, err := NewElection(id,
|
||||||
pod.Name, pod.Namespace, 30*time.Second,
|
pod.Name, pod.Namespace, 30*time.Second,
|
||||||
st.callback, config.Client)
|
st.callback, config.Client)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue