diff --git a/cmd/loxilb-agent/config.go b/cmd/loxilb-agent/config.go index d8f8b46..dd51371 100644 --- a/cmd/loxilb-agent/config.go +++ b/cmd/loxilb-agent/config.go @@ -53,9 +53,9 @@ type AgentConfig struct { // external BGP Peers. This is a comma separated list e.g. IP1:ASID1,IP2:ASID2 ExtBGPPeers []string `yaml:"extBGPPeers,omitempty"` // support BGP protocol - SetBGP uint16 `yaml:"setBGP,omitempty,default=0"` + SetBGP uint16 `yaml:"setBGP,omitempty"` // Custom BGP Port - ListenBGPPort uint16 `yaml:"listenBGPPort,omitempty,default=179"` + ListenBGPPort uint16 `yaml:"listenBGPPort,omitempty"` // Set eBGP multi-hop EBGPMultiHop bool `yaml:"eBGPMultiHop"` // loxilb loadbalancer mode diff --git a/cmd/loxilb-agent/main.go b/cmd/loxilb-agent/main.go index 2a37457..3bde80d 100644 --- a/cmd/loxilb-agent/main.go +++ b/cmd/loxilb-agent/main.go @@ -81,7 +81,6 @@ func newAgentCommand() *cobra.Command { if err := opts.validate(args); err != nil { klog.Errorf("Failed to options validate. err: %v", err) os.Exit(255) - } if err := run(opts); err != nil { klog.Errorf("Error running agent. err: %v", err) diff --git a/cmd/loxilb-agent/options.go b/cmd/loxilb-agent/options.go index 5c33326..a06da25 100644 --- a/cmd/loxilb-agent/options.go +++ b/cmd/loxilb-agent/options.go @@ -291,4 +291,7 @@ func (o *Options) setDefaults() { if o.config.ExtBGPPeers == nil { o.config.ExtBGPPeers = []string{} } + if o.config.ListenBGPPort == 0 { + o.config.ListenBGPPort = 179 + } }