Merge pull request #351 from danielqsj/master
Enable custom election id for status sync.
This commit is contained in:
commit
fb8e2d7373
3 changed files with 7 additions and 1 deletions
|
|
@ -134,6 +134,7 @@ type Configuration struct {
|
|||
Backend ingress.Controller
|
||||
|
||||
UpdateStatus bool
|
||||
ElectionID string
|
||||
}
|
||||
|
||||
// newIngressController creates an Ingress controller
|
||||
|
|
@ -303,6 +304,7 @@ func newIngressController(config *Configuration) *GenericController {
|
|||
Client: config.Client,
|
||||
PublishService: ic.cfg.PublishService,
|
||||
IngressLister: ic.ingLister,
|
||||
ElectionID: config.ElectionID,
|
||||
})
|
||||
} else {
|
||||
glog.Warning("Update of ingress status is disabled (flag --update-status=false was specified)")
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ func NewIngressController(backend ingress.Controller) *GenericController {
|
|||
|
||||
updateStatus = flags.Bool("update-status", true, `Indicates if the
|
||||
ingress controller should update the Ingress status IP/hostname. Default is true`)
|
||||
|
||||
electionID = flags.String("election-id", "ingress-controller-leader", `Election id to use for status update.`)
|
||||
)
|
||||
|
||||
backend.OverrideFlags(flags)
|
||||
|
|
@ -137,6 +139,7 @@ func NewIngressController(backend ingress.Controller) *GenericController {
|
|||
|
||||
config := &Configuration{
|
||||
UpdateStatus: *updateStatus,
|
||||
ElectionID: *electionID,
|
||||
Client: kubeClient,
|
||||
ResyncPeriod: *resyncPeriod,
|
||||
DefaultService: *defaultSvc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue