Skip to content
Merged
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ var (
outOfCluster bool
version string
config spec.ControllerConfig
kubeQPS int
kubeBurst int
)

func mustParseDuration(d string) time.Duration {
Expand All @@ -35,6 +37,8 @@ func init() {
flag.BoolVar(&outOfCluster, "outofcluster", false, "Whether the operator runs in- our outside of the Kubernetes cluster.")
flag.BoolVar(&config.NoDatabaseAccess, "nodatabaseaccess", false, "Disable all access to the database from the operator side.")
flag.BoolVar(&config.NoTeamsAPI, "noteamsapi", false, "Disable all access to the teams API")
flag.IntVar(&kubeQPS, "kubeqps", 5, "Kubernetes api requests per second.")
flag.IntVar(&kubeBurst, "kubeburst", 10, "Kubernetes api requests burst limit.")
flag.Parse()

config.EnableJsonLogging = os.Getenv("ENABLE_JSON_LOGGING") == "true"
Expand Down Expand Up @@ -83,6 +87,9 @@ func main() {
log.Fatalf("couldn't get REST config: %v", err)
}

config.RestConfig.QPS = float32(kubeQPS)
config.RestConfig.Burst = kubeBurst

c := controller.NewController(&config, "")

c.Run(stop, wg)
Expand Down