Add QPS and Burst kube api client parameters as CLI arguments#233
Add QPS and Burst kube api client parameters as CLI arguments#233stefanprodan merged 1 commit intofluxcd:mainfrom playertwo:main
Conversation
| 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.") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Let's go with the same defaults cert-manager uses 20/50 https://github.com/jetstack/cert-manager/blob/master/cmd/controller/app/options/options.go#L103-L104
Signed-off-by: playertwo <842517+playertwo@users.noreply.github.com>
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