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

Pass Burst and QPS client params to clusterapi k8s clients #6416

Merged
merged 3 commits into from
Jan 2, 2024

Conversation

kdw174
Copy link
Contributor

@kdw174 kdw174 commented Jan 2, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Passes the kubeClientBurst and kubeClientQPS flags to the clusterapi provider k8s clients to allow tuning of client and avoid excessive client-side throttling.

Which issue(s) this PR fixes:

Fixes #6333

Does this PR introduce a user-facing change?

kubeClientBurst and kubeClientQPS flags are now passed to the clusterapi provider k8s clients

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jan 2, 2024
Copy link

linux-foundation-easycla bot commented Jan 2, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 2, 2024
@k8s-ci-robot k8s-ci-robot requested a review from arunmk January 2, 2024 16:24
@k8s-ci-robot k8s-ci-robot added the area/provider/cluster-api Issues or PRs related to Cluster API provider label Jan 2, 2024
@k8s-ci-robot k8s-ci-robot requested a review from elmiko January 2, 2024 16:24
@k8s-ci-robot
Copy link
Contributor

Welcome @kdw174!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 2, 2024
@elmiko
Copy link
Contributor

elmiko commented Jan 2, 2024

thanks for the PR @kdw174 !

i think this looks good, i wonder if we should add something to the clusterapi/README.md to let users know about this?

also, do you think we would ever need to vary these values between the management kubeconfig and the workload kubeconfig?

@elmiko
Copy link
Contributor

elmiko commented Jan 2, 2024

my second question is more speculative, i think this PR is probably good as it is for now.

@kdw174
Copy link
Contributor Author

kdw174 commented Jan 2, 2024

I don't think we should add that as part of the clusterapi readme since this parameter isn't clusterapi provider specific. The clients are going to have the same default QPS and Burst config they had before.

I could add it to the cluster-autoscaler FAQ here https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca if you think that makes sense

@elmiko
Copy link
Contributor

elmiko commented Jan 2, 2024

thanks. i feel like we should definitely have these options in the main FAQ, but it might be better to open that as another PR since it will require approvers from the core team to approve.

i'm ready to approve this, but i just thought of one other question. is it possible that a user could set the QPS and burst in the kubeconfig itself? (i'm not sure this is even possible but i want to make sure we don't overwrite a config value from the kubeconfig if it's already present)

@kdw174
Copy link
Contributor Author

kdw174 commented Jan 2, 2024

I don't believe it's possible to set the qps or burst from the kubeconfig as this is the pattern the default client follows in cluster-autoscaler. Digging through the BuildConfigFromFlags function that's called, I wasn't able to find anywhere that the qps could be set from the kubeconfig or an env var.

@elmiko
Copy link
Contributor

elmiko commented Jan 2, 2024

ack, thanks for investigating @kdw174

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elmiko, kdw174

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/cluster-autoscaler area/provider/cluster-api Issues or PRs related to Cluster API provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Excessive cient-side throttling in the clusterapi provider for cluster-autoscaler
3 participants