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

Automated cherry pick of #107131: Fix default config flags #108401

Conversation

ulucinar
Copy link
Contributor

@ulucinar ulucinar commented Feb 28, 2022

Cherry pick of #107131 on release-1.23.

#107131: Fix default config flags

For details on the cherry pick process, see the cherry pick requests page.

Fix kubectl config flags incorrectly setting burst and discovery limits

This is a follow up to kubernetes#105520 which only changed the new default config flags in the `NewKubectlCommand` function if `kubeConfigFlags == nil`. However they are not nil because they were initialized before here:
https://github.com/kubernetes/kubernetes/blob/2fe968deb6cef4feea5bd0eb435e71844e397eed/staging/src/k8s.io/kubectl/pkg/cmd/cmd.go#L97

This fix uses the same defaults for both functions

Signed-off-by: Jonny Langefeld <jonny.langefeld@gmail.com>
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Feb 28, 2022
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 28, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @ulucinar. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 28, 2022
@k8s-ci-robot k8s-ci-robot added area/kubectl sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 28, 2022
@ulucinar
Copy link
Contributor Author

ulucinar commented Mar 1, 2022

As detailed here, in kubectl@v1.23.4 discovery client uses a token bucket rate limiter (tbrl) with a burstiness of 100 and a fill rate of 5.0 qps, whereas the intended parameters are (b=300, r=50.0 qps). According to our observations reported in the aforementioned document, this greatly hinders the performance of the discovery client used by kubectl when there are a large number of API GroupVersions. For example, in a cluster with ~190 GVs, discovery client using a tbrl(b=100, r=5.0 qps) with an empty cache is throttled for a max period of ~18.4 s. However, a discovery client using a tbrl(b=300, r=50.0 qps) as intended, is throttled for a max period of ~1.8 s.

This has already been fixed in the master branch. The planned release date for kubectl@v1.24.0 is in April 2022. Thus we propose to have the fix available starting with kubectl@v1.23.5, also considering client/server version skew guidelines. Thank you very much in advance.

@eddiezane
Copy link
Member

/release-note-edit

Fix kubectl config flags incorrectly setting burst and discovery limits

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Mar 1, 2022
@eddiezane
Copy link
Member

/kind bug
/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. kind/bug Categorizes issue or PR as related to a bug. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Mar 1, 2022
@eddiezane
Copy link
Member

eddiezane commented Mar 2, 2022

This cherry pick does not impact users and fixes an incomplete library usage for community projects.

/approve

/assign @kubernetes/release-engineering

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 2, 2022
@ulucinar
Copy link
Contributor Author

ulucinar commented Mar 2, 2022

Thank you @eddiezane. I've also considered cherry-picking this fix to the other active release branches release-1.21 and release-1.22. However, it turns out that in those versions, we don't have the genericclioptions.ConfigFlags. WithDiscoveryQPS, which the fix depends on. Thus we cannot simply cherry-pick. We can still fix the issue in those branches via separate new changes/PRs but would that be allowed for those branches?

@cpanato
Copy link
Member

cpanato commented Mar 2, 2022

@ulucinar @eddiezane this is only needed for release-1.23 branch? how about 1.22 and 1.21?

also need a lgtm from the review owners

/assign @soltysh

@eddiezane
Copy link
Member

The original landed in 1.23 so I think only that branch. #105520

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 3, 2022
@soltysh
Copy link
Contributor

soltysh commented Mar 3, 2022

/priority backlog

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 3, 2022
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@saschagrunert saschagrunert added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. and removed do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Mar 4, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eddiezane, saschagrunert, soltysh, ulucinar

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

@k8s-ci-robot k8s-ci-robot merged commit 4f8f197 into kubernetes:release-1.23 Mar 4, 2022
@ulucinar ulucinar deleted the automated-cherry-pick-of-#107131-upstream-release-1.23 branch March 9, 2022 10:59
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/kubectl cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants