Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cost Functionality to Goldilocks #524

Merged
merged 14 commits into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import (
)

var (
serverPort int
showAllVPAs bool
basePath string
serverPort int
showAllVPAs bool
basePath string
insightsHost string
)

func init() {
Expand All @@ -39,6 +40,7 @@ func init() {
dashboardCmd.PersistentFlags().BoolVar(&onByDefault, "on-by-default", false, "Display every namespace that isn't explicitly excluded.")
dashboardCmd.PersistentFlags().BoolVar(&showAllVPAs, "show-all", false, "Display every VPA, even if it isn't managed by Goldilocks")
dashboardCmd.PersistentFlags().StringVar(&basePath, "base-path", "/", "Path on which the dashboard is served.")
dashboardCmd.PersistentFlags().StringVar(&insightsHost, "insights-host", "https://insights.fairwinds.com", "Insights host for retrieving optional cost data.")
}

var dashboardCmd = &cobra.Command{
Expand All @@ -53,6 +55,7 @@ var dashboardCmd = &cobra.Command{
dashboard.ExcludeContainers(sets.NewString(strings.Split(excludeContainers, ",")...)),
dashboard.OnByDefault(onByDefault),
dashboard.ShowAllVPAs(showAllVPAs),
dashboard.InsightsHost(insightsHost),
)
http.Handle("/", router)
klog.Infof("Starting goldilocks dashboard server on port %d and basePath %v", serverPort, validBasePath)
Expand Down
Loading