Skip to content

Add QPS and Burst kube api client parameters as CLI arguments#233

Merged
stefanprodan merged 1 commit intofluxcd:mainfrom
playertwo:main
Jan 13, 2021
Merged

Add QPS and Burst kube api client parameters as CLI arguments#233
stefanprodan merged 1 commit intofluxcd:mainfrom
playertwo:main

Conversation

@playertwo
Copy link
Copy Markdown
Contributor

If you have a lot of flux kustomizations you may face with getting stuck on reconciliation. Throttling errors is cause. You may increase QPS and Burst values and throttling go away

Comment thread main.go
flag.BoolVar(&watchAllNamespaces, "watch-all-namespaces", true,
"Watch for custom resources in all namespaces, if set to false it will only watch the runtime namespace.")
flag.Bool("log-json", false, "Set logging to JSON format.")
flag.Float64Var(&kubeapiQPS, "kube-api-qps", 20.0, "QPS to use while talking with kubernetes API.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values are the defaults in ctrl.GetConfigOrDie(), so why supply them as flag defaults?

In Flagger based on a several load tests, we decided to set the defaults to 100/250: https://github.com/fluxcd/flagger/blob/main/cmd/flagger/main.go#L88-L89

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My logic was not to broke something. I don't know possibly side effects of changing default values. This values worked before PR, and they will work after. If you want to change it, you could see actual values and decide how you want to increase them.

I can change it to 100/250 if you want

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: playertwo <842517+playertwo@users.noreply.github.com>
Copy link
Copy Markdown
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @playertwo

@stefanprodan stefanprodan merged commit c7f7fda into fluxcd:main Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants