Skip to content

Add custom resource LIST benchmark scenario - #4160

Open
yuminn-k wants to merge 1 commit into
kubernetes:masterfrom
yuminn-k:feat/130169-cr-list-benchmark
Open

Add custom resource LIST benchmark scenario#4160
yuminn-k wants to merge 1 commit into
kubernetes:masterfrom
yuminn-k:feat/130169-cr-list-benchmark

Conversation

@yuminn-k

@yuminn-k yuminn-k commented Jun 25, 2026

Copy link
Copy Markdown

What type of PR is this?

/kind feature
/sig api-machinery

What this PR does / why we need it:

Adds an optional Custom Resource LIST scenario to the existing ClusterLoader2 testing/list benchmark.

The scenario is disabled by default and can be enabled with CL2_LIST_CUSTOM_RESOURCE_NUMBER. When enabled, it:

  • creates a namespaced ListBenchmarkResource CRD for the benchmark,
  • uses a larger, Kueue-like nested CRD schema and custom resource shape,
  • creates benchmark custom resources with configurable payload size,
  • starts a request-benchmark deployment that LISTs the custom resource endpoint,
  • runs the custom-resource LIST benchmark as a separate sequential benchmark segment,
  • cleans up the custom resources and CRD after the benchmark.

Which issue(s) this PR fixes:

Part of kubernetes/kubernetes#130169.

Special notes for your reviewer:

This focuses on the custom-resource slice of kubernetes/kubernetes#130169 and is rebased on top of the Pods LIST benchmark that is now in master.

AI disclosure: This PR was prepared in part with the assistance of an AI coding assistant. I reviewed the generated changes, understand the code being submitted, and verified it with the tests listed below.

Validation:

  • go test ./api ./pkg/config ./pkg/test from clusterloader2 passes.
  • git diff --check passes.
  • Dry-run config rendering was checked for the default path, the CR-enabled path, and the CR+Pods-enabled path.
    • The default rendered config contains no custom-resource or pod LIST steps.
    • CL2_LIST_CUSTOM_RESOURCE_NUMBER=1 renders the CRD, custom-resource, custom-resource lister, and cleanup steps.
    • CL2_LIST_CUSTOM_RESOURCE_NUMBER=1 CL2_LIST_POD_NUMBER=1 renders the custom-resource segment followed by the pod segment.
  • The rendered CRD and a sample rendered custom resource pass kubectl apply --dry-run=server against a local kind apiserver.

@kubernetes-prow kubernetes-prow Bot added kind/feature Categorizes issue or PR as related to a new feature. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Jun 25, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Welcome @yuminn-k!

It looks like this is your first PR to kubernetes/perf-tests 🎉. 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/perf-tests 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. 😃

@kubernetes-prow
kubernetes-prow Bot requested review from mborsz and wojtek-t June 25, 2026 07:35
@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 25, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yuminn-k
Once this PR has been reviewed and has the lgtm label, please assign serathius for approval. For more information see the Code Review Process.

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

Details 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

@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @yuminn-k. 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.

Details

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-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 25, 2026
@Jefftree

Copy link
Copy Markdown
Member

request: Can we make the CRD larger, like much larger. We'd like to be able to catch things like kubernetes/kubernetes#136950 (comment). Create something similar to that size

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2026
@yuminn-k
yuminn-k force-pushed the feat/130169-cr-list-benchmark branch from 40efd6a to 0dfc10a Compare June 26, 2026 02:16
@kubernetes-prow kubernetes-prow Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 26, 2026
@yuminn-k

yuminn-k commented Jun 26, 2026

Copy link
Copy Markdown
Author

Thanks for the pointer. I rebased the PR on current master and updated the custom-resource benchmark to use a larger, Kueue-like nested CRD schema and custom resource shape instead of the previous single payload string.

I also moved the custom-resource LIST load into its own sequential benchmark segment so it does not run mixed with the configmap segment.

Validation after the update:

  • go test ./api ./pkg/config ./pkg/test from clusterloader2
  • git diff --check
  • dry-run config rendering for default, CR-enabled, and CR+Pods-enabled paths
  • server-side dry-run of the rendered CRD and a sample rendered custom resource against a local kind apiserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants