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

[Access-tokens][ClusterLoader2] Add standalone test #1021

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

jprzychodzen
Copy link
Contributor

Add standalone test for ClusterLoader2 that allows benchmarking and
testing access tokens thresholds.

This test is based on Mateusz's code from github.com/mm4tt/k8s-util.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 5, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @jprzychodzen. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 5, 2020
@@ -0,0 +1,138 @@
# Stress testing access token validation
#
# Targeting 2 000 tokens with 20 000 total QPS
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, the test should scale with the cluster size (as load test does). In such case we'll be able to run it along our CI/CD tests at 100, 500 and 5k node scale.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added linear scaling of QPS. Actually, we could get more QPS for smaller clusters, but this sets reasonable requirements and expectations what can be delivered.

@jprzychodzen jprzychodzen force-pushed the at-add-config branch 2 times, most recently from 6b07414 to fa776e5 Compare February 6, 2020 10:52
@jprzychodzen
Copy link
Contributor Author

Decreased QPS target number to match real-world expectations

Copy link
Contributor

@mm4tt mm4tt left a comment

Choose a reason for hiding this comment

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

Looks good!

steps:
- name: Starting measurements
measurements:
- Identifier: APIResponsivenessPrometheus
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also start the TestMetrics measurement (you can see how it's done in density or load test).
It's a bundle measurement producing a lot of useful data (e.g. profiles, restart checks, resource usages, etc.)

# Stress testing access token validation
#
# Targeting 2 000 tokens with 5 000 total QPS for 5k node cluster, so it's 2.5 QPS per token.
# For smaller cluster, we want to scale down lineary QPS per token to 2.5 * (Number of nodes)/(5 000).
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make it more explicit that this test always creates 2K tokens and 80 pods and only the QPS depends on the cluster size?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added comment and calculations.

@mm4tt
Copy link
Contributor

mm4tt commented Feb 6, 2020

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 6, 2020
# Targeting 2 000 tokens with 5 000 total QPS for 5k node cluster, so it's 2.5 QPS per token.
#
# Number of tokens does not scale with number of nodes.
# By default, those 2 000 tokens are are assigned to 80 service accounts, with 25 tokens each.
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for nitpicking, but I'd also add a line about number of pods.
IIUC there will be always 80 pods, which means that this test can be run even on a 1 node cluster (assuming the node is big enough). If we had more pods then we'd run into 110pods/node limitation.

Add standalone test for ClusterLoader2 that allows benchmarking and
testing access tokens thresholds.

This test is based on Mateusz's code from github.com/mm4tt/k8s-util.
@mm4tt
Copy link
Contributor

mm4tt commented Feb 6, 2020

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jprzychodzen, mm4tt

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2020
@k8s-ci-robot k8s-ci-robot merged commit 950e2e3 into kubernetes:master Feb 6, 2020
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants