Add ConfigureFlags() on controller interface

This commit is contained in:
Joao Morais 2017-05-24 21:03:52 -03:00
parent 675296dcf9
commit 37f8c8bb40
4 changed files with 12 additions and 1 deletions

View file

@ -92,8 +92,8 @@ func NewIngressController(backend ingress.Controller) *GenericController {
)
flags.AddGoFlagSet(flag.CommandLine)
backend.ConfigureFlags(flags)
flags.Parse(os.Args)
backend.OverrideFlags(flags)
flag.Set("logtostderr", "true")

View file

@ -94,6 +94,9 @@ type Controller interface {
BackendDefaults() defaults.Backend
// Info returns information about the ingress controller
Info() *BackendInfo
// ConfigureFlags allow to configure more flags before the parsing of
// command line arguments
ConfigureFlags(*pflag.FlagSet)
// OverrideFlags allow the customization of the flags in the backend
OverrideFlags(*pflag.FlagSet)
// DefaultIngressClass just return the default ingress class