...
1
2
3
4
19
20 package app
21
22 import (
23 "github.com/spf13/pflag"
24
25 "k8s.io/kubernetes/pkg/windows/service"
26 )
27
28 const (
29 serviceName = "kube-proxy"
30 )
31
32 func initForOS(windowsService bool) error {
33 if windowsService {
34 return service.InitService(serviceName)
35 }
36 return nil
37 }
38
39 func (o *Options) addOSFlags(fs *pflag.FlagSet) {
40 fs.BoolVar(&o.WindowsService, "windows-service", o.WindowsService, "Enable Windows Service Control Manager API integration")
41 fs.StringVar(&o.config.Winkernel.SourceVip, "source-vip", o.config.Winkernel.SourceVip, "The IP address of the source VIP for non-DSR.")
42 fs.StringVar(&o.config.Winkernel.NetworkName, "network-name", o.config.Winkernel.NetworkName, "The name of the cluster network.")
43 fs.BoolVar(&o.config.Winkernel.EnableDSR, "enable-dsr", o.config.Winkernel.EnableDSR, "If true make kube-proxy apply DSR policies for service VIP")
44 fs.StringVar(&o.config.Winkernel.RootHnsEndpointName, "root-hnsendpoint-name", "cbr0", "The name of the hns endpoint name for root namespace attached to l2bridge")
45 fs.BoolVar(&o.config.Winkernel.ForwardHealthCheckVip, "forward-healthcheck-vip", o.config.Winkernel.ForwardHealthCheckVip, "If true forward service VIP for health check port")
46 }
47
View as plain text