@@ -8,40 +8,41 @@ import (
88)
99
1010type KubeRouterConfig struct {
11- HelpRequested bool
12- Kubeconfig string
13- Master string
14- ConfigSyncPeriod time.Duration
15- CleanupConfig bool
16- IPTablesSyncPeriod time.Duration
17- IpvsSyncPeriod time.Duration
18- RoutesSyncPeriod time.Duration
19- RunServiceProxy bool
20- RunFirewall bool
21- RunRouter bool
22- MasqueradeAll bool
23- ClusterCIDR string
24- EnablePodEgress bool
25- HostnameOverride string
2611 AdvertiseClusterIp bool
2712 AdvertiseExternalIp bool
28- PeerRouters []net.IP
29- PeerASNs []uint
30- PeerMultihopTtl uint8
31- ClusterAsn uint
32- FullMeshMode bool
3313 BGPGracefulRestart bool
14+ CleanupConfig bool
15+ ClusterAsn uint
16+ ClusterCIDR string
17+ ConfigSyncPeriod time.Duration
3418 EnableiBGP bool
35- GlobalHairpinMode bool
36- NodePortBindOnAllIp bool
3719 EnableOverlay bool
38- PeerPasswords [] string
20+ EnablePodEgress bool
3921 EnablePprof bool
22+ FullMeshMode bool
23+ GlobalHairpinMode bool
24+ HealthPort uint16
25+ HelpRequested bool
26+ HostnameOverride string
27+ IPTablesSyncPeriod time.Duration
28+ IpvsSyncPeriod time.Duration
29+ Kubeconfig string
30+ MasqueradeAll bool
31+ Master string
4032 MetricsEnabled bool
41- MetricsPort uint16
4233 MetricsPath string
34+ MetricsPort uint16
35+ NodePortBindOnAllIp bool
36+ PeerASNs []uint
37+ PeerMultihopTtl uint8
38+ PeerPasswords []string
39+ PeerRouters []net.IP
40+ RoutesSyncPeriod time.Duration
41+ RunFirewall bool
42+ RunRouter bool
43+ RunServiceProxy bool
44+ Version bool
4345 VLevel string
44- HealthPort uint16
4546 // FullMeshPassword string
4647}
4748
@@ -57,6 +58,8 @@ func NewKubeRouterConfig() *KubeRouterConfig {
5758func (s * KubeRouterConfig ) AddFlags (fs * pflag.FlagSet ) {
5859 fs .BoolVarP (& s .HelpRequested , "help" , "h" , false ,
5960 "Print usage information." )
61+ fs .BoolVarP (& s .Version , "version" , "V" , false ,
62+ "Print version information." )
6063 fs .BoolVar (& s .RunServiceProxy , "run-service-proxy" , true ,
6164 "Enables Service Proxy -- sets up IPVS for Kubernetes Services." )
6265 fs .BoolVar (& s .RunFirewall , "run-firewall" , true ,
@@ -120,5 +123,4 @@ func (s *KubeRouterConfig) AddFlags(fs *pflag.FlagSet) {
120123 // "Password that cluster-node BGP servers will use to authenticate one another when \"--nodes-full-mesh\" is set.")
121124 fs .StringVarP (& s .VLevel , "v" , "v" , "0" , "log level for V logs" )
122125 fs .Uint16Var (& s .HealthPort , "health-port" , 20244 , "Health check port, 0 = Disabled" )
123-
124126}
0 commit comments