mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 13:42:02 +00:00
allow proxy to accept a listen address. fixes #1220
This commit is contained in:
@@ -33,6 +33,7 @@ var (
|
||||
configFile = flag.String("configfile", "/tmp/proxy_config", "Configuration file for the proxy")
|
||||
master = flag.String("master", "", "The address of the Kubernetes API server (optional)")
|
||||
etcdServerList util.StringList
|
||||
address = flag.String("address", "0.0.0.0", "The address for the proxy server to serve on (set to 0.0.0.0 or \"\" for all interfaces)")
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -84,7 +85,7 @@ func main() {
|
||||
glog.Infof("Using configuration file %s", *configFile)
|
||||
|
||||
loadBalancer := proxy.NewLoadBalancerRR()
|
||||
proxier := proxy.NewProxier(loadBalancer)
|
||||
proxier := proxy.NewProxier(loadBalancer, *address)
|
||||
// Wire proxier to handle changes to services
|
||||
serviceConfig.RegisterHandler(proxier)
|
||||
// And wire loadBalancer to handle changes to endpoints to services
|
||||
|
Reference in New Issue
Block a user