mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-09-28 03:21:15 +02:00
feat(options): allow disabling GoBGP grpc port
This commit is contained in:
parent
de3e2186a1
commit
d8cac914ab
@ -86,7 +86,7 @@ Usage of kube-router:
|
|||||||
--enable-pod-egress SNAT traffic from Pods to destinations outside the cluster. (default true)
|
--enable-pod-egress SNAT traffic from Pods to destinations outside the cluster. (default true)
|
||||||
--enable-pprof Enables pprof for debugging performance and memory leak issues.
|
--enable-pprof Enables pprof for debugging performance and memory leak issues.
|
||||||
--excluded-cidrs strings Excluded CIDRs are used to exclude IPVS rules from deletion.
|
--excluded-cidrs strings Excluded CIDRs are used to exclude IPVS rules from deletion.
|
||||||
--gobgp-admin-port uint16 Port to connect to GoBGP for administrative purposes. (default 50051)
|
--gobgp-admin-port uint16 Port to connect to GoBGP for administrative purposes. Setting this to 0 will disable the GoBGP gRPC server. (default 50051)
|
||||||
--hairpin-mode Add iptables rules for every Service Endpoint to support hairpin traffic.
|
--hairpin-mode Add iptables rules for every Service Endpoint to support hairpin traffic.
|
||||||
--health-port uint16 Health check port, 0 = Disabled (default 20244)
|
--health-port uint16 Health check port, 0 = Disabled (default 20244)
|
||||||
-h, --help Print usage information.
|
-h, --help Print usage information.
|
||||||
|
@ -1015,7 +1015,7 @@ func (nrc *NetworkRoutingController) startBgpServer(grpcServer bool) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if grpcServer {
|
if grpcServer && nrc.goBGPAdminPort != 0 {
|
||||||
nrc.bgpServer = gobgp.NewBgpServer(
|
nrc.bgpServer = gobgp.NewBgpServer(
|
||||||
gobgp.GrpcListenAddress(net.JoinHostPort(nrc.krNode.GetPrimaryNodeIP().String(),
|
gobgp.GrpcListenAddress(net.JoinHostPort(nrc.krNode.GetPrimaryNodeIP().String(),
|
||||||
strconv.FormatUint(uint64(nrc.goBGPAdminPort), 10)) + "," +
|
strconv.FormatUint(uint64(nrc.goBGPAdminPort), 10)) + "," +
|
||||||
|
@ -167,7 +167,7 @@ func (s *KubeRouterConfig) AddFlags(fs *pflag.FlagSet) {
|
|||||||
fs.BoolVar(&s.GlobalHairpinMode, "hairpin-mode", false,
|
fs.BoolVar(&s.GlobalHairpinMode, "hairpin-mode", false,
|
||||||
"Add iptables rules for every Service Endpoint to support hairpin traffic.")
|
"Add iptables rules for every Service Endpoint to support hairpin traffic.")
|
||||||
fs.Uint16Var(&s.GoBGPAdminPort, "gobgp-admin-port", defaultGoBGPAdminPort,
|
fs.Uint16Var(&s.GoBGPAdminPort, "gobgp-admin-port", defaultGoBGPAdminPort,
|
||||||
"Port to connect to GoBGP for administrative purposes.")
|
"Port to connect to GoBGP for administrative purposes. Setting this to 0 will disable the GoBGP gRPC server.")
|
||||||
fs.Uint16Var(&s.HealthPort, "health-port", defaultHealthCheckPort, "Health check port, 0 = Disabled")
|
fs.Uint16Var(&s.HealthPort, "health-port", defaultHealthCheckPort, "Health check port, 0 = Disabled")
|
||||||
fs.BoolVarP(&s.HelpRequested, "help", "h", false,
|
fs.BoolVarP(&s.HelpRequested, "help", "h", false,
|
||||||
"Print usage information.")
|
"Print usage information.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user