Repository navigation
feat: support custom Pod labels, service accounts, and scheduler - #260
Merged
Merged
Conversation
Liyu Ma (liyu-ma)
force-pushed
the
maliyu/kperf-wi-support
branch
2 times, most recently
from
October 28, 2026 12:57
4092754 to
b7cb23c
Compare
Liyu Ma (liyu-ma)
force-pushed
the
maliyu/kperf-wi-support
branch
from
October 28, 2026 13:00
b7cb23c to
8e8e961
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Custom pod labels bypass validation, allowing invalid keys to pass Validate() and cause Kubernetes to reject every generated Pod with HTTP 422.
1 open issue
What changed in this PR
Extends kperf’s profile-driven Pod creation with custom labels, ServiceAccount selection, and scheduler selection while preserving defaults when omitted.
Changes:
- Adds optional Pod settings and allows custom labels to override the default
applabel. - Separates request builders and their tests from random-selection and payload-generation logic.
- Adds default/custom Pod tests and avoids caching created resource names in create-only runs.
| File | Description |
|---|---|
request/random.go |
Moves request builders into a dedicated file. |
request/random_test.go |
Moves builder tests alongside the extracted builders. |
request/builder.go |
Applies Pod options and skips deletion caching for create-only runs. |
request/builder_test.go |
Retains patch tests and adds Pod-option coverage. |
contrib/internal/manifests/workload/pods/templates/pod.tpl |
Renders custom Pod settings and quotes values. |
api/types/load_traffic.go |
Defines new Pod options and restricts them to core/v1 Pods. |
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
xinWeiWei24
reviewed
Oct 30, 2026
xinWeiWei24
reviewed
Oct 30, 2026
Liyu Ma (liyu-ma)
force-pushed
the
maliyu/kperf-wi-support
branch
from
October 30, 2026 13:01
008e0f7 to
085aad0
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Liyu Ma (liyu-ma)
force-pushed
the
maliyu/kperf-wi-support
branch
from
October 30, 2026 13:04
085aad0 to
38567a6
Compare
xinWeiWei24
approved these changes
Nov 3, 2026
| serviceAccountName: "{{ .Values.serviceAccountName }}" | ||
| {{- end }} | ||
| {{- if .Values.schedulerName }} | ||
| schedulerName: "{{ .Values.schedulerName }}" |
Collaborator
There was a problem hiding this comment.
Suggested change
| schedulerName: "{{ .Values.schedulerName }}" | |
| schedulerName: {{ printf "%q" .Values.schedulerName }} |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fu Wei (fuweid)
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Extend profile-driven Pod creation with optional labels, ServiceAccount, and scheduler name, preserving defaults when omitted.
Changes
labels,serviceAccountName, andschedulerNametopostDel.pod.applabel.Validation