Skip to content

Commit 5f0fd80

Browse files
committed
remove default tags (use setDefault)
1 parent dd80f61 commit 5f0fd80

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

cmd/loxilb-agent/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ type AgentConfig struct {
5353
// external BGP Peers. This is a comma separated list e.g. IP1:ASID1,IP2:ASID2
5454
ExtBGPPeers []string `yaml:"extBGPPeers,omitempty"`
5555
// support BGP protocol
56-
SetBGP uint16 `yaml:"setBGP,omitempty,default=0"`
56+
SetBGP uint16 `yaml:"setBGP,omitempty"`
5757
// Custom BGP Port
58-
ListenBGPPort uint16 `yaml:"listenBGPPort,omitempty,default=179"`
58+
ListenBGPPort uint16 `yaml:"listenBGPPort,omitempty"`
5959
// Set eBGP multi-hop
6060
EBGPMultiHop bool `yaml:"eBGPMultiHop"`
6161
// loxilb loadbalancer mode

cmd/loxilb-agent/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func newAgentCommand() *cobra.Command {
8181
if err := opts.validate(args); err != nil {
8282
klog.Errorf("Failed to options validate. err: %v", err)
8383
os.Exit(255)
84-
8584
}
8685
if err := run(opts); err != nil {
8786
klog.Errorf("Error running agent. err: %v", err)

cmd/loxilb-agent/options.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,4 +291,7 @@ func (o *Options) setDefaults() {
291291
if o.config.ExtBGPPeers == nil {
292292
o.config.ExtBGPPeers = []string{}
293293
}
294+
if o.config.ListenBGPPort == 0 {
295+
o.config.ListenBGPPort = 179
296+
}
294297
}

0 commit comments

Comments
 (0)