Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit 4c54e32

Browse files
author
David Chung
authored
use correct default options for ingress controller (#715)
Signed-off-by: David Chung <[email protected]>
1 parent 961825e commit 4c54e32

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

pkg/run/v0/ingress/ingress.go

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ func init() {
3636
inproc.Register(Kind, Run, DefaultOptions)
3737
}
3838

39-
// Options capture the options for starting up the plugin.
40-
type Options struct {
41-
42-
// // Name of the backend pool controller
43-
// Group plugin.Name
44-
45-
plugins func() discovery.Plugins
46-
leadership manager.Leadership
47-
}
48-
4939
func leadership(plugins func() discovery.Plugins) (manager.Leadership, error) {
5040
// Scan for a manager
5141
pm, err := plugins().List()
@@ -76,23 +66,22 @@ func Run(plugins func() discovery.Plugins, name plugin.Name,
7666
panic("no plugins()")
7767
}
7868

79-
options := Options{}
69+
options := DefaultOptions
8070
err = config.Decode(&options)
8171
if err != nil {
8272
return
8373
}
8474

8575
log.Info("Decoded input", "config", options)
8676

87-
options.plugins = plugins
88-
options.leadership, err = leadership(plugins)
77+
leadership, err := leadership(plugins)
8978
if err != nil {
9079
return
9180
}
9281

9382
transport.Name = name
9483
impls = map[run.PluginCode]interface{}{
95-
run.Controller: ingress.NewTypedControllers(plugins, options.leadership),
84+
run.Controller: ingress.NewTypedControllers(plugins, leadership),
9685
}
9786

9887
return

0 commit comments

Comments
 (0)