mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-14 13:16:54 +00:00
Merge pull request #50 from reactiveops/config-flag
add flag for config
This commit is contained in:
@@ -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)
|
||||
|
||||
5
main.go
5
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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user