File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ type AgentConfig struct {
53
53
// external BGP Peers. This is a comma separated list e.g. IP1:ASID1,IP2:ASID2
54
54
ExtBGPPeers []string `yaml:"extBGPPeers,omitempty"`
55
55
// support BGP protocol
56
- SetBGP uint16 `yaml:"setBGP,omitempty,default=0 "`
56
+ SetBGP uint16 `yaml:"setBGP,omitempty"`
57
57
// Custom BGP Port
58
- ListenBGPPort uint16 `yaml:"listenBGPPort,omitempty,default=179 "`
58
+ ListenBGPPort uint16 `yaml:"listenBGPPort,omitempty"`
59
59
// Set eBGP multi-hop
60
60
EBGPMultiHop bool `yaml:"eBGPMultiHop"`
61
61
// loxilb loadbalancer mode
Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ func newAgentCommand() *cobra.Command {
81
81
if err := opts .validate (args ); err != nil {
82
82
klog .Errorf ("Failed to options validate. err: %v" , err )
83
83
os .Exit (255 )
84
-
85
84
}
86
85
if err := run (opts ); err != nil {
87
86
klog .Errorf ("Error running agent. err: %v" , err )
Original file line number Diff line number Diff line change @@ -291,4 +291,7 @@ func (o *Options) setDefaults() {
291
291
if o .config .ExtBGPPeers == nil {
292
292
o .config .ExtBGPPeers = []string {}
293
293
}
294
+ if o .config .ListenBGPPort == 0 {
295
+ o .config .ListenBGPPort = 179
296
+ }
294
297
}
You can’t perform that action at this time.
0 commit comments