diff --git a/README.md b/README.md index 483138fa..8666be4c 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ kubectl apply -f deploy/all.yaml ## Options -* `dashboard` Runs the webserver for Fairwinds dashboard. +* `config`: Specify a location for the Fairwinds config +* `dashboard`: Runs the webserver for Fairwinds dashboard. * `dashboard-port`: Port for the dashboard webserver (default 8080) * `webhook`: Runs the webhook webserver. * `webhook-port`: Port for the webhook webserver (default 9876) diff --git a/main.go b/main.go index 53353a95..12403e2b 100644 --- a/main.go +++ b/main.go @@ -51,6 +51,7 @@ func main() { dashboardPort := flag.Int("dashboard-port", 8080, "Port for the dashboard webserver") webhookPort := flag.Int("webhook-port", 9876, "Port for the webhook webserver") auditDestination := flag.String("audit-destination", "", "Destination URL to send audit results (prints to stdout if unspecified)") + configPath := flag.String("config", "config.yaml", "Location of Fairwinds configuration file") var disableWebhookConfigInstaller bool flag.BoolVar(&disableWebhookConfigInstaller, "disable-webhook-config-installer", false, @@ -58,9 +59,9 @@ func main() { flag.Parse() - c, err := conf.ParseFile("config.yaml") + c, err := conf.ParseFile(*configPath) if err != nil { - glog.Println("Error parsing config.yaml:", err) + glog.Println("Error parsing config at " + *configPath, err) os.Exit(1) }