Pipe through custom GCE config file path

This commit is contained in:
Prashanth Balasubramanian 2016-05-24 11:31:18 -07:00
parent c2696bdd36
commit 5d83fa45c2
2 changed files with 27 additions and 5 deletions

View file

@ -110,6 +110,13 @@ var (
verbose = flags.Bool("verbose", false,
`If true, logs are displayed at V(4), otherwise V(2).`)
configFilePath = flags.String("config-file-path", "",
`Path to a file containing the gce config. If left unspecified this
controller only works with default zones.`)
healthzPort = flags.Int("healthz-port", lbApiPort,
`Port to run healthz server. Must match the health check port in yaml.`)
)
func registerHandlers(lbc *controller.LoadBalancerController) {
@ -127,7 +134,7 @@ func registerHandlers(lbc *controller.LoadBalancerController) {
lbc.Stop(true)
})
glog.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", lbApiPort), nil))
glog.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", *healthzPort), nil))
}
func handleSigterm(lbc *controller.LoadBalancerController, deleteAll bool) {
@ -196,7 +203,7 @@ func main() {
if err != nil {
glog.Fatalf("%v", err)
}
clusterManager, err = controller.NewClusterManager(name, defaultBackendNodePort, *healthCheckPath)
clusterManager, err = controller.NewClusterManager(*configFilePath, name, defaultBackendNodePort, *healthCheckPath)
if err != nil {
glog.Fatalf("%v", err)
}